UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 04:44:51";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE programsettings SET companyname = 'سنتر احمد العربي', address = 'ش الترعة البولاقيه - امام قسم شبرا - مول العتبه', specializtion = 'ملابس جملة', phone = '01064062900', faxnumber = '', email = '', website = '', logo = '4a754be7e82553f312ecf932e16cce7d.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '-1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '', commercialregistration = '', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-05',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='0',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='1',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='83b7fcbc8ec5f6680b38c85c5097af3b8f9e24beb34e300c92da2aed73200ef3508d6b04b93e1301b69bf990665657d386b98aa70faa9951dfc2289ed943c6cd',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 04:44:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:14:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 08:14:57', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3112
UPDATE programsettings SET companyname = 'سنتر احمد العربي', address = 'ش الترعة البولاقيه - امام قسم شبرا - مول العتبه', specializtion = 'ملابس جملة', phone = '01064062900', faxnumber = '', email = '', website = '', logo = '4a754be7e82553f312ecf932e16cce7d.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '-1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '', commercialregistration = '', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-06',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='0',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='1',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='83b7fcbc8ec5f6680b38c85c5097af3b8f9e24beb34e300c92da2aed73200ef3508d6b04b93e1301b69bf990665657d386b98aa70faa9951dfc2289ed943c6cd',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0' WHERE programsettingsid = '1';
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 04:44:58";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 08:14:58', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3113
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 04:53:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:23:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:23:44', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3114
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 04:54:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:24:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:24:27', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3115
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 04:59:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:29:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:29:47', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3116
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('2 موديل حوض الكاشف ','','94','270','300','300','300','2026-10-06','0','1','0','','0','0','0','0','0','270','270','270','270','270','0','11.11','0','0','.','0','0','0','270','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','270','270','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','270','0','0','0','0','0','0','','','0','0','0','0'); -- id=1455
UPDATE product SET productName = '2 موديل حوض الكاشف ', productDescription = '', productCatId = '94', productBuyPrice = '270', productSellAllPrice = '300', productSellUnitPrice = '300', productSellHalfPrice = '300', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01455',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270',lastbuyprice_withDiscount = '270',meanbuyprice = '270',meanbuyprice_withDiscount = '270' , productbuypricereal = '270' , buypricereal_precentage = '0' , buytotal_precentage = '11.11' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='270',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1455';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1455', '1', '2026-10-06', '1', '0','0145501','300','300','300','270','','0','0','0','0','0','0','0','0','0','0'); -- id=1455
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1455', '1', '0', '1', '2026-10-06'); -- id=1480
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1455', '1', '0', '0', '1455', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2247
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1455, 1,'2026-10-06 08:29:47',1)
                ON DUPLICATE KEY UPDATE productid = 1455, edited = 1, sysdate = '2026-10-06 08:29:47', userid = 1; -- id=2220
UPDATE product SET productName = '2 موديل حوض الكاشف ', productDescription = '', productCatId = '94', productBuyPrice = '270.00', productSellAllPrice = '300.00', productSellUnitPrice = '300.00', productSellHalfPrice = '300.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01455',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270',lastbuyprice_withDiscount = '270',meanbuyprice = '270',meanbuyprice_withDiscount = '270' , productbuypricereal = '270' , buypricereal_precentage = '0' , buytotal_precentage = '11.11' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='270',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1455';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('3 موديل زنط الكاشف','','94','320','360','360','360','2026-10-06','0','1','0','','0','0','0','0','0','320','320','320','320','320','0','12.5','0','0','.','0','0','0','320','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','320','320','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','320','0','0','0','0','0','0','','','0','0','0','0'); -- id=1456
UPDATE product SET productName = '3 موديل زنط الكاشف', productDescription = '', productCatId = '94', productBuyPrice = '320', productSellAllPrice = '360', productSellUnitPrice = '360', productSellHalfPrice = '360', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01456',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '12.5' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1456';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1456', '1', '2026-10-06', '1', '0','0145601','360','360','360','320','','0','0','0','0','0','0','0','0','0','0'); -- id=1456
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1456', '1', '0', '1', '2026-10-06'); -- id=1481
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1456', '1', '0', '0', '1456', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2248
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1456, 1,'2026-10-06 08:29:47',1)
                ON DUPLICATE KEY UPDATE productid = 1456, edited = 1, sysdate = '2026-10-06 08:29:47', userid = 1; -- id=2221
UPDATE product SET productName = '3 موديل زنط الكاشف', productDescription = '', productCatId = '94', productBuyPrice = '320.00', productSellAllPrice = '360.00', productSellUnitPrice = '360.00', productSellHalfPrice = '360.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01456',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '12.5' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1456';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 04:59:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:29:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:29:49', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3117
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 04:59:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:29:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:29:51', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3118
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:03:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:33:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:33:24', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3119
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:04:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:34:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:34:02', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3120
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:08:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:38:05", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 08:38:05', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3121
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:08:05";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-06 08:38:05", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 08:38:05', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3122
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:08:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:38:07", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 08:38:07', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3123
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:11:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:41:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:41:19', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3124
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:12:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:42:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:42:39', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3125
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:12:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:42:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:42:45', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3126
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:13:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:43:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:43:40', '1', 'uinuseproducts', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=uinuseproducts'); -- id=3127
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:13:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:43:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:43:41', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=sucess'); -- id=3128
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:13:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:43:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:43:42', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3129
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:15:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:45:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:45:39', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3130
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:16:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:46:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:46:07', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3131
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:16:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:46:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:46:21', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3132
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:16:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:46:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:46:41', '1', 'uinuseproducts', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=uinuseproducts'); -- id=3133
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:16:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:46:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:46:41', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=sucess'); -- id=3134
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:16:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:46:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:46:43', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3135
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:16:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:46:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:46:45', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3136
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:17:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:47:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 08:47:16', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=show'); -- id=3137
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:17:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:47:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:47:20', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3138
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:17:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:47:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:47:41', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3139
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:17:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 08:47:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 08:47:55', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3140
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:42:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 09:12:57", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 09:12:57', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3141
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:42:57";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-06 09:12:57", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 09:12:57', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3142
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 05:43:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 09:13:27", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 09:13:27', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3143
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:03:25";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:03:25";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:03:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 09:33:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 09:33:31', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3144
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:03:31";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 09:33:31', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3145
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:03:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 09:33:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 09:33:39', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3146
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:04:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 09:34:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 09:34:18', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3147
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:05:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 09:35:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 09:35:02', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3148
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:28:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 09:58:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 09:58:46', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3149
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:28:46";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 09:58:46', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3150
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:28:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 09:58:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 09:58:54', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3151
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:29:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 09:59:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 09:59:02', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3152
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:38:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:08:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-06 10:08:30', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3153
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:38:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:08:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-06 10:08:36', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3154
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:39:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:09:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-06 10:09:16', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php'); -- id=3155
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:39:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:09:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-06 10:09:21', '1', 'supplierShow2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php?do=supplierShow2'); -- id=3156
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:42:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:12:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 10:12:00', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=28'); -- id=3157
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:42:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:12:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 10:12:11', '1', 'addoneserial', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=addoneserial&id=28&type=2'); -- id=3158
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:42:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:12:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 10:12:19', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3159
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:42:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:12:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 10:12:57', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3160
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:43:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:13:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 10:13:05', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3161
UPDATE product SET productName = 'جلد ممشط الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01410',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800.00',lastbuyprice_withDiscount = '720',meanbuyprice = '800.00',meanbuyprice_withDiscount = '720' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='800',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1410';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1410, 1,'2026-10-06 10:13:19',1)
                ON DUPLICATE KEY UPDATE productid = 1410, edited = 1, sysdate = '2026-10-06 10:13:19', userid = 1; -- id=2174
UPDATE product SET productName = 'جلد سمبوكسه الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01411',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800.00',lastbuyprice_withDiscount = '720',meanbuyprice = '800.00',meanbuyprice_withDiscount = '720' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='800',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1411';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1411, 1,'2026-10-06 10:13:20',1)
                ON DUPLICATE KEY UPDATE productid = 1411, edited = 1, sysdate = '2026-10-06 10:13:20', userid = 1; -- id=2175
UPDATE product SET productName = 'جلد بيندا الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01412',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800.00',lastbuyprice_withDiscount = '720',meanbuyprice = '800.00',meanbuyprice_withDiscount = '720' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='800',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1412';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1412, 1,'2026-10-06 10:13:21',1)
                ON DUPLICATE KEY UPDATE productid = 1412, edited = 1, sysdate = '2026-10-06 10:13:21', userid = 1; -- id=2176
UPDATE product SET productName = 'جلد دبل سوسته الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01413',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800.00',lastbuyprice_withDiscount = '720',meanbuyprice = '800.00',meanbuyprice_withDiscount = '720' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='800',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1413';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1413, 1,'2026-10-06 10:13:22',1)
                ON DUPLICATE KEY UPDATE productid = 1413, edited = 1, sysdate = '2026-10-06 10:13:22', userid = 1; -- id=2177
UPDATE product SET productName = 'جلد محجر الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01414',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800.00',lastbuyprice_withDiscount = '720',meanbuyprice = '800.00',meanbuyprice_withDiscount = '720' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='800',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1414';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1414, 1,'2026-10-06 10:13:29',1)
                ON DUPLICATE KEY UPDATE productid = 1414, edited = 1, sysdate = '2026-10-06 10:13:29', userid = 1; -- id=2178
UPDATE product SET productName = 'جلد 2 جيب الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01415',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800.00',lastbuyprice_withDiscount = '720',meanbuyprice = '800.00',meanbuyprice_withDiscount = '720' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='800',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1415';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1415, 1,'2026-10-06 10:13:31',1)
                ON DUPLICATE KEY UPDATE productid = 1415, edited = 1, sysdate = '2026-10-06 10:13:31', userid = 1; -- id=2179
UPDATE product SET productName = 'جلد ساده بيزك الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01416',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800.00',lastbuyprice_withDiscount = '720',meanbuyprice = '800.00',meanbuyprice_withDiscount = '720' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='800',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1416';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1416, 1,'2026-10-06 10:13:31',1)
                ON DUPLICATE KEY UPDATE productid = 1416, edited = 1, sysdate = '2026-10-06 10:13:31', userid = 1; -- id=2180
UPDATE product SET productName = 'جاكت جوخ الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01417',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550.00',lastbuyprice_withDiscount = '495',meanbuyprice = '550.00',meanbuyprice_withDiscount = '495' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1417';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1417, 1,'2026-10-06 10:13:32',1)
                ON DUPLICATE KEY UPDATE productid = 1417, edited = 1, sysdate = '2026-10-06 10:13:32', userid = 1; -- id=2181
UPDATE product SET productName = 'جاكت وتر جلد محجر الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '620.00', productSellAllPrice = '620.00', productSellUnitPrice = '620.00', productSellHalfPrice = '620.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01418',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '620.00',lastbuyprice_withDiscount = '558',meanbuyprice = '620.00',meanbuyprice_withDiscount = '558' , productbuypricereal = '620.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='558',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='620',meanbuyprice_withTax='620',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='558',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1418';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1418, 1,'2026-10-06 10:13:33',1)
                ON DUPLICATE KEY UPDATE productid = 1418, edited = 1, sysdate = '2026-10-06 10:13:33', userid = 1; -- id=2182
UPDATE product SET productName = 'جاكت وتر جلد ال في الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01419',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550.00',lastbuyprice_withDiscount = '495',meanbuyprice = '550.00',meanbuyprice_withDiscount = '495' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1419';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1419, 1,'2026-10-06 10:13:34',1)
                ON DUPLICATE KEY UPDATE productid = 1419, edited = 1, sysdate = '2026-10-06 10:13:34', userid = 1; -- id=2183
UPDATE product SET productName = 'جاكت وتر جلد ديور الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01420',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550.00',lastbuyprice_withDiscount = '495',meanbuyprice = '550.00',meanbuyprice_withDiscount = '495' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1420';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1420, 1,'2026-10-06 10:13:38',1)
                ON DUPLICATE KEY UPDATE productid = 1420, edited = 1, sysdate = '2026-10-06 10:13:38', userid = 1; -- id=2184
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:43:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:13:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 10:13:43', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3162
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:53:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:23:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 10:23:28', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3163
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:54:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:24:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 10:24:05', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3164
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:54:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:24:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 10:24:18', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3165
UPDATE product SET productName = 'موديل زنط الكاشف', productDescription = '', productCatId = '94', productBuyPrice = '320.00', productSellAllPrice = '360.00', productSellUnitPrice = '360.00', productSellHalfPrice = '360.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01456',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320.00',lastbuyprice_withDiscount = '320',meanbuyprice = '320.00',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '12.50' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1456';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1456, 1,'2026-10-06 10:24:25',1)
                ON DUPLICATE KEY UPDATE productid = 1456, edited = 1, sysdate = '2026-10-06 10:24:25', userid = 1; -- id=2221
UPDATE product SET productName = 'موديل حوض الكاشف ', productDescription = '', productCatId = '94', productBuyPrice = '270.00', productSellAllPrice = '300.00', productSellUnitPrice = '300.00', productSellHalfPrice = '300.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01455',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270.00',lastbuyprice_withDiscount = '270',meanbuyprice = '270.00',meanbuyprice_withDiscount = '270' , productbuypricereal = '270.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '11.11' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='270',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1455';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1455, 1,'2026-10-06 10:24:33',1)
                ON DUPLICATE KEY UPDATE productid = 1455, edited = 1, sysdate = '2026-10-06 10:24:33', userid = 1; -- id=2220
UPDATE product SET productName = 'موديل حوض الكاشف ', productDescription = '', productCatId = '94', productBuyPrice = '270.00', productSellAllPrice = '300.00', productSellUnitPrice = '300.00', productSellHalfPrice = '300.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01455',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270.00',lastbuyprice_withDiscount = '270',meanbuyprice = '270.00',meanbuyprice_withDiscount = '270' , productbuypricereal = '270.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '11.11' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='270',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1455';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1455, 1,'2026-10-06 10:24:35',1)
                ON DUPLICATE KEY UPDATE productid = 1455, edited = 1, sysdate = '2026-10-06 10:24:35', userid = 1; -- id=2220
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:54:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:24:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 10:24:41', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3166
UPDATE product SET productName = 'موديلات حوض الكاشف', productDescription = '', productCatId = '94', productBuyPrice = '260.00', productSellAllPrice = '295.00', productSellUnitPrice = '295.00', productSellHalfPrice = '295.00', productDate = '2026-10-01', conditions = '0', userId = '1', limitamount = '0', parcode = '01381',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '260.00',lastbuyprice_withDiscount = '260',meanbuyprice = '260.00',meanbuyprice_withDiscount = '260' , productbuypricereal = '260.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '13.46' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='260',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='260',meanbuyprice_withTax='260',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='260',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1381';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1381, 1,'2026-10-06 10:24:54',1)
                ON DUPLICATE KEY UPDATE productid = 1381, edited = 1, sysdate = '2026-10-06 10:24:54', userid = 1; -- id=2066
UPDATE product SET productName = 'موديلات زنط الكاشف', productDescription = '', productCatId = '94', productBuyPrice = '360.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-01', conditions = '0', userId = '1', limitamount = '0', parcode = '01382',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '360.00',lastbuyprice_withDiscount = '360',meanbuyprice = '360.00',meanbuyprice_withDiscount = '360' , productbuypricereal = '360.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '11.11' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='360',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='360',meanbuyprice_withTax='360',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='360',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1382';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1382, 1,'2026-10-06 10:24:57',1)
                ON DUPLICATE KEY UPDATE productid = 1382, edited = 1, sysdate = '2026-10-06 10:24:57', userid = 1; -- id=2067
UPDATE product SET productName = 'موديلات لياقة الكاشف', productDescription = '', productCatId = '94', productBuyPrice = '270.00', productSellAllPrice = '300.00', productSellUnitPrice = '300.00', productSellHalfPrice = '300.00', productDate = '2026-10-01', conditions = '0', userId = '1', limitamount = '0', parcode = '01379',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270.00',lastbuyprice_withDiscount = '270',meanbuyprice = '270.00',meanbuyprice_withDiscount = '270' , productbuypricereal = '270.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '11.11' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='270',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1379';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1379, 1,'2026-10-06 10:25:00',1)
                ON DUPLICATE KEY UPDATE productid = 1379, edited = 1, sysdate = '2026-10-06 10:25:00', userid = 1; -- id=2064
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:55:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:25:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 10:25:15', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3167
UPDATE product SET productName = 'زنط نص سوسته الكاشف', productDescription = '', productCatId = '94', productBuyPrice = '320.00', productSellAllPrice = '360.00', productSellUnitPrice = '360.00', productSellHalfPrice = '360.00', productDate = '2026-10-01', conditions = '0', userId = '1', limitamount = '0', parcode = '01378',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320.00',lastbuyprice_withDiscount = '320',meanbuyprice = '320.00',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '12.50' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1378';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1378, 1,'2026-10-06 10:25:16',1)
                ON DUPLICATE KEY UPDATE productid = 1378, edited = 1, sysdate = '2026-10-06 10:25:16', userid = 1; -- id=2063
UPDATE product SET productName = 'زنط نص سوسته الكاشف', productDescription = '', productCatId = '94', productBuyPrice = '320.00', productSellAllPrice = '360.00', productSellUnitPrice = '360.00', productSellHalfPrice = '360.00', productDate = '2026-10-01', conditions = '0', userId = '1', limitamount = '0', parcode = '01378',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320.00',lastbuyprice_withDiscount = '320',meanbuyprice = '320.00',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '12.50' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1378';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1378, 1,'2026-10-06 10:25:26',1)
                ON DUPLICATE KEY UPDATE productid = 1378, edited = 1, sysdate = '2026-10-06 10:25:26', userid = 1; -- id=2063
UPDATE product SET productName = 'موديلات لياقة الكاشف', productDescription = '', productCatId = '94', productBuyPrice = '270.00', productSellAllPrice = '300.00', productSellUnitPrice = '300.00', productSellHalfPrice = '300.00', productDate = '2026-10-01', conditions = '0', userId = '1', limitamount = '0', parcode = '01379',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270.00',lastbuyprice_withDiscount = '270',meanbuyprice = '270.00',meanbuyprice_withDiscount = '270' , productbuypricereal = '270.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '11.11' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='270',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1379';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1379, 1,'2026-10-06 10:25:28',1)
                ON DUPLICATE KEY UPDATE productid = 1379, edited = 1, sysdate = '2026-10-06 10:25:28', userid = 1; -- id=2064
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:55:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:25:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 10:25:32', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3168
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:55:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:25:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 10:25:37', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3169
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:56:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:26:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 10:26:36', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3170
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac4a27152967', '2026-10-06 10:25:37', '78', '1049220.00', '1171860', '0', '0', '122640.00',  '122640.00', '0', '122640', '1', '2026-10-06 10:26:36', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=34
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01455', '34', '94', '1455', '120', '270', '32400.00', '0', '', '2026-10-06 10:26:36', '1455','','','0','0','0','0','0',null,'270','32400','0','0','0','0','0','0','0','0','1'); -- id=168
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 10:25:37', 1, 1455, 0, 0
                    , 270, 120, 0, 0, 1, '2026-10-06 10:26:36')
                ON DUPLICATE KEY UPDATE buyprice = 270,
                        buyQuantity =buyQuantity+120, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 10:26:36' ; -- id=234
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1455', '270', '120', '0', 'buyBillController.php', '168', '', '0', '0'); -- id=136
UPDATE product SET  productBuyPrice = "270" WHERE productId = 1455 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 168 ;
UPDATE product SET productName = 'موديل حوض الكاشف ', productDescription = '', productCatId = '94', productBuyPrice = '270.00', productSellAllPrice = '300.00', productSellUnitPrice = '300.00', productSellHalfPrice = '300.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01455',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270',lastbuyprice_withDiscount = '270',meanbuyprice = '270',meanbuyprice_withDiscount = '270' , productbuypricereal = '270.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '11.11' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='270',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1455';
UPDATE buybilldetail SET  lastbuyprice = 270 , meanbuyprice = 270, lastbuyprice_withDiscount = 270, meanbuyprice_withDiscount = 270
        , lastbuyprice_withTax = 270, meanbuyprice_withTax = 270, lastbuyprice_withDiscountAndTax = 270
                where buybilldetailid = 168;
UPDATE productunit SET proUnitBuyPrice  = 270 * productnumber WHERE productid = 1455;
UPDATE storedetail SET  productquantity = '120', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1480';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1455', '1', '120', '0', '34', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '120', '1', '2026-10-06 10:25:37','0','0'); -- id=2249
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01456', '34', '94', '1456', '282', '320', '90240.00', '0', '', '2026-10-06 10:26:36', '1456','','','0','0','0','0','0',null,'320','90240','0','0','0','0','0','0','0','0','1'); -- id=169
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 10:25:37', 1, 1456, 0, 0
                    , 320, 282, 0, 0, 1, '2026-10-06 10:26:36')
                ON DUPLICATE KEY UPDATE buyprice = 320,
                        buyQuantity =buyQuantity+282, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 10:26:36' ; -- id=235
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1456', '320', '282', '0', 'buyBillController.php', '169', '', '0', '0'); -- id=137
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1456 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 169 ;
UPDATE product SET productName = 'موديل زنط الكاشف', productDescription = '', productCatId = '94', productBuyPrice = '320.00', productSellAllPrice = '360.00', productSellUnitPrice = '360.00', productSellHalfPrice = '360.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01456',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '12.50' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1456';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 320, meanbuyprice_withDiscount = 320
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 320
                where buybilldetailid = 169;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1456;
UPDATE storedetail SET  productquantity = '282', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1481';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1456', '1', '282', '0', '34', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '282', '1', '2026-10-06 10:25:37','0','0'); -- id=2250
UPDATE supplier SET  suppliercurrentDebt = '1171860',suppliercurrentDebtInCurrency= '1171860' , userid = '1', supplierdate = '2026-10-06 10:26:36'   WHERE supplierid = '78';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('78', '1049220.00', '122640', '0', 'اضافة فاتورة مشتريات', '34', '1171860', '2026-10-06 10:25:37', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','122640','1','1049220','122640','1171860','0',''); -- id=152
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '122640', '122640', '2026-10-06', '1', '0', '0', '2026-10-06 10:26:36','اضافة فاتورة مشتريات رقم 34','1','0',null,'0','34','buyBillController.php?do=details&id=34'); -- id=1141
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1141', '382', '122640', '','0'); -- id=1145
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15313846.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1141', '504', '122640', '','0'); -- id=1141
UPDATE accountstree SET name = 'احمد الكاشف', customName = 'احمد الكاشف', customNameEn = 'احمد الكاشف', nameEn = 'احمد الكاشف', parent = '81', accountNature = '1', theValue = '1171860', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-01 19:10:02' WHERE id = '504';
update buybill set dailyentryid='1141,0' where buybillid=34;
COMMIT;
UPDATE product SET overAllAveragePrice = 270 WHERE productId = 1455;UPDATE product SET overAllAveragePrice = 320 WHERE productId = 1456;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:56:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:26:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 10:26:37', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=34'); -- id=3171
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:56:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:26:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-06 10:26:42', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php'); -- id=3172
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 06:56:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 10:26:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-06 10:26:49', '1', 'supplierShow2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php?do=supplierShow2'); -- id=3173
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 08:08:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 11:38:38", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 11:38:38', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3174

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac4893f48e89
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 11:38:38', '06ac4893f48e89', '1', '0.00', '0', '0', '1', '15840.00', '15840', '15840', '0', '1', '2026-10-06 11:38:38', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '54' ,'0','','','','','-1','0','0','0','0','0','15840','0','','0','0','15840','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=92
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','92', '0', '2026-10-06 11:38:38', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '15840', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 11:38:38','0','0','',''); -- id=174
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+18 where id = 198;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('166.5','01449', '92', '101', '1449', '18', '185', '3330', '0', '', '0', '2026-10-06 11:38:38', '1449', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','198-18,','1','1','0','0','185','3330','0','','0','0.00','0','0','0','0'); -- id=384
UPDATE sellbilldetail SET  lastbuyprice = 185.00 , meanbuyprice = 185.00, lastbuyprice_withDiscount = 166.50, meanbuyprice_withDiscount = 166.50
        , lastbuyprice_withTax = 185, meanbuyprice_withTax = 185, lastbuyprice_withDiscountAndTax = 166.5
                where sellbilldetailid = 384;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1449, '2026-10-06', 3330, 3330, 3330
                    , 3330, 2997, 2997, 2997
                    , 0, 0, 0, 0
                    , 0, 0, 0, 18, 0, 3330, 3330, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3330, sellCostBuyPrice =sellCostBuyPrice+3330
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3330, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3330
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2997, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2997
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2997
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3330
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3330
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+18
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 3330, 3330, 3330
                    , 3330, 2997, 2997, 2997
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3330, 3330, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3330, sellCostBuyPrice =sellCostBuyPrice+3330
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3330, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3330
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2997, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2997
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2997
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3330
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3330
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '144', userid = '2', storedetaildate = '2026-10-06 11:38:38' WHERE storedetailid = '1466';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1449', '1', '18', '1', '92', 'اضافة فاتورة مبيعات', 'sellbillController.php', '162', '144', '2', '2026-10-06 11:38:38','0','0'); -- id=2251
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+18 where id = 73;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('260','01381', '92', '94', '1381', '18', '295', '5310', '0', '', '0', '2026-10-06 11:38:38', '1381', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','73-18,','1','1','0','0','295','5310','0','','0','0.00','0','0','0','0'); -- id=385
UPDATE sellbilldetail SET  lastbuyprice = 260.00 , meanbuyprice = 260.00, lastbuyprice_withDiscount = 260.00, meanbuyprice_withDiscount = 260.00
        , lastbuyprice_withTax = 260, meanbuyprice_withTax = 260, lastbuyprice_withDiscountAndTax = 260
                where sellbilldetailid = 385;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1381, '2026-10-06', 5310, 4680, 4680
                    , 4680, 4680, 4680, 4680
                    , 0, 0, 0, 0
                    , 0, 0, 0, 18, 0, 4680, 4680, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5310, sellCostBuyPrice =sellCostBuyPrice+4680
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4680, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4680
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4680, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4680
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4680
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4680
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4680
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+18
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 5310, 4680, 4680
                    , 4680, 4680, 4680, 4680
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4680, 4680, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5310, sellCostBuyPrice =sellCostBuyPrice+4680
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4680, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4680
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4680, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4680
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4680
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4680
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4680
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '396', userid = '2', storedetaildate = '2026-10-06 11:38:38' WHERE storedetailid = '1381';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1381', '1', '18', '1', '92', 'اضافة فاتورة مبيعات', 'sellbillController.php', '414', '396', '2', '2026-10-06 11:38:38','0','0'); -- id=2252
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+18 where id = 74;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('360','01382', '92', '94', '1382', '18', '400', '7200', '0', '', '0', '2026-10-06 11:38:38', '1382', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','74-18,','1','1','0','0','400','7200','0','','0','0.00','0','0','0','0'); -- id=386
UPDATE sellbilldetail SET  lastbuyprice = 360.00 , meanbuyprice = 360.00, lastbuyprice_withDiscount = 360.00, meanbuyprice_withDiscount = 360.00
        , lastbuyprice_withTax = 360, meanbuyprice_withTax = 360, lastbuyprice_withDiscountAndTax = 360
                where sellbilldetailid = 386;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1382, '2026-10-06', 7200, 6480, 6480
                    , 6480, 6480, 6480, 6480
                    , 0, 0, 0, 0
                    , 0, 0, 0, 18, 0, 6480, 6480, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7200, sellCostBuyPrice =sellCostBuyPrice+6480
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6480, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6480
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6480, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6480
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6480
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6480
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6480
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+18
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 7200, 6480, 6480
                    , 6480, 6480, 6480, 6480
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6480, 6480, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7200, sellCostBuyPrice =sellCostBuyPrice+6480
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6480, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6480
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6480, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6480
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6480
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6480
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6480
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '252', userid = '2', storedetaildate = '2026-10-06 11:38:38' WHERE storedetailid = '1382';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1382', '1', '18', '1', '92', 'اضافة فاتورة مبيعات', 'sellbillController.php', '270', '252', '2', '2026-10-06 11:38:38','0','0'); -- id=2253
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '327105',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('311265','15840', '0', '2', 'اضافة فاتورة مبيعات', '92', '327105', '2026-10-06 11:38:38', '2',  'sellbillController.php','1','','0'); -- id=113
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '15840', '15840', '2026-10-06', '2', '0', '0', '2026-10-06 11:38:38','اضافة فاتورة مبيعات رقم 92','1','0',null,'0','92','sellbillController.php?do=showDetail&sellbillid=92'); -- id=1142
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1142', '419', '15840', '','0'); -- id=1146
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '327105', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1142', '143', '15840', '','0'); -- id=1142
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '953455', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '14157', '14157', '2026-10-06', '2', '0', '0', '2026-10-06 11:38:38','اضافة فاتورة مبيعات رقم 92 - صرف البضاعة من المخزن','1','0',null,'0','92','sellbillController.php?do=showDetail&sellbillid=92'); -- id=1143
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1143', '402', '14157', '','0'); -- id=1147
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '927626.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1143', '382', '14157', '','0'); -- id=1143
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15299689.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1142,0,1143' where sellbillid=92;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 15840, 14490, 14490
                    , 14490, 14157, 14157, 14157
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,14490, 14490, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+15840, sellCostBuyPrice =sellCostBuyPrice+14490
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+14490, sellCostMeanBuyPrice = sellCostMeanBuyPrice+14490
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+14157, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+14157
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+14157
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+14490
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+14490
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 15840, 14490, 14490
                    , 14490, 14157, 14157, 14157
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,14490, 14490, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+15840, sellCostBuyPrice =sellCostBuyPrice+14490
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+14490, sellCostMeanBuyPrice = sellCostMeanBuyPrice+14490
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+14157, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+14157
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+14157
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+14490
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+14490
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 15840, 14490, 14490
                    , 14490, 14157, 14157, 14157, 14490, 14490)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+15840, netSellCostBuyPrice = netSellCostBuyPrice+14490
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+14490
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+14490
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+14157
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+14157
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+14157
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+14490
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+14490;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac4893f48e89 and sellbillId = 92 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 08:08:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 11:38:39", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 11:38:39', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3175
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 08:10:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 11:40:41", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 11:40:41', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3176

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac4b38f41d59
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 11:40:41', '06ac4b38f41d59', '1', '0.00', '0', '5', '1', '1110.00', '1105', '1105', '0', '1', '2026-10-06 11:40:41', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '6' ,'0','','','','','-1','0','0','0','0','0','1105','0','','0','0','1105','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=93
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','93', '0', '2026-10-06 11:40:41', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '1105', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 11:40:41','0','0','',''); -- id=175
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 198;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('166.5','01449', '93', '101', '1449', '6', '185', '1110', '0', '', '0', '2026-10-06 11:40:41', '1449', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','198-6,','1','1','0','0','185','1110','0','','0','0.00','0','0','0','0'); -- id=387
UPDATE sellbilldetail SET  lastbuyprice = 185.00 , meanbuyprice = 185.00, lastbuyprice_withDiscount = 166.50, meanbuyprice_withDiscount = 166.50
        , lastbuyprice_withTax = 185, meanbuyprice_withTax = 185, lastbuyprice_withDiscountAndTax = 166.5
                where sellbilldetailid = 387;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1449, '2026-10-06', 1105, 1110, 1110
                    , 1110, 999, 999, 999
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 1110, 1110, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1105, sellCostBuyPrice =sellCostBuyPrice+1110
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1110, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1110
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+999, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+999
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+999
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1110
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1110
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1105, 1110, 1110
                    , 1110, 999, 999, 999
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1110, 1110, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1105, sellCostBuyPrice =sellCostBuyPrice+1110
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1110, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1110
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+999, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+999
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+999
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1110
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1110
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '138', userid = '2', storedetaildate = '2026-10-06 11:40:41' WHERE storedetailid = '1466';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1449', '1', '6', '1', '93', 'اضافة فاتورة مبيعات', 'sellbillController.php', '144', '138', '2', '2026-10-06 11:40:41','0','0'); -- id=2254
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '328210',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('327105','1105', '0', '2', 'اضافة فاتورة مبيعات', '93', '328210', '2026-10-06 11:40:41', '2',  'sellbillController.php','1','','0'); -- id=114
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1110', '1110', '2026-10-06', '2', '0', '0', '2026-10-06 11:40:41','اضافة فاتورة مبيعات رقم 93','1','0',null,'0','93','sellbillController.php?do=showDetail&sellbillid=93'); -- id=1144
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1144', '419', '1105', '','0'); -- id=1148
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '328210', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1144', '398', '5', '','0'); -- id=1149
UPDATE accountstree SET name = 'خصم مسموح به', customName = 'خصم مسموح به', customNameEn = '', nameEn = '', parent = '158', accountNature = '0', theValue = '136043', theOrder = '0', layingOrder = '51', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-08-08 17:58:26' WHERE id = '398';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1144', '143', '1110', '','0'); -- id=1144
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '954565', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '999', '999', '2026-10-06', '2', '0', '0', '2026-10-06 11:40:41','اضافة فاتورة مبيعات رقم 93 - صرف البضاعة من المخزن','1','0',null,'0','93','sellbillController.php?do=showDetail&sellbillid=93'); -- id=1145
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1145', '402', '999', '','0'); -- id=1150
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '928625.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1145', '382', '999', '','0'); -- id=1145
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15298690.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1144,0,1145' where sellbillid=93;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 1105, 1110, 1110
                    , 1110, 999, 999, 999
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1110, 1110, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1105, sellCostBuyPrice =sellCostBuyPrice+1110
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1110, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1110
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+999, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+999
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+999
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1110
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1110
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1105, 1110, 1110
                    , 1110, 999, 999, 999
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1110, 1110, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1105, sellCostBuyPrice =sellCostBuyPrice+1110
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1110, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1110
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+999, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+999
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+999
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1110
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1110
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 1105, 1110, 1110
                    , 1110, 999, 999, 999, 1110, 1110)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+1105, netSellCostBuyPrice = netSellCostBuyPrice+1110
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+1110
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+1110
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+999
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+999
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+999
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+1110
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+1110;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac4b38f41d59 and sellbillId = 93 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 08:10:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 11:40:42", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 11:40:42', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3177
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 08:13:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 11:43:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-06 11:43:13', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3178
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 08:16:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 11:46:24", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 11:46:24', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3179
update user set blockedByLimits = 0;
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 08:53:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 12:23:51", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 12:23:51', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3180
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 08:53:51";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-06 12:23:51", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 12:23:51', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3181
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 08:53:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 12:23:52", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 12:23:52', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3182
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 08:57:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 12:27:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 12:27:13', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3183

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac4be28ef28f
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 12:27:13', '06ac4be28ef28f', '1', '0.00', '0', '0', '1', '2220.00', '2220', '2220', '0', '1', '2026-10-06 12:27:13', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '12' ,'0','','','','','-1','0','0','0','0','0','2220','0','','0','0','2220','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=94
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','94', '0', '2026-10-06 12:27:13', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '2220', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 12:27:13','0','0','',''); -- id=176
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+12 where id = 198;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('166.5','01449', '94', '101', '1449', '12', '185', '2220', '0', '', '0', '2026-10-06 12:27:13', '1449', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','198-12,','1','1','0','0','185','2220','0','','0','0.00','0','0','0','0'); -- id=388
UPDATE sellbilldetail SET  lastbuyprice = 185.00 , meanbuyprice = 185.00, lastbuyprice_withDiscount = 166.50, meanbuyprice_withDiscount = 166.50
        , lastbuyprice_withTax = 185, meanbuyprice_withTax = 185, lastbuyprice_withDiscountAndTax = 166.5
                where sellbilldetailid = 388;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1449, '2026-10-06', 2220, 2220, 2220
                    , 2220, 1998, 1998, 1998
                    , 0, 0, 0, 0
                    , 0, 0, 0, 12, 0, 2220, 2220, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2220, sellCostBuyPrice =sellCostBuyPrice+2220
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2220, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2220
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1998, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1998
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1998
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2220
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2220
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+12
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2220, 2220, 2220
                    , 2220, 1998, 1998, 1998
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2220, 2220, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2220, sellCostBuyPrice =sellCostBuyPrice+2220
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2220, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2220
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1998, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1998
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1998
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2220
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2220
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '126', userid = '2', storedetaildate = '2026-10-06 12:27:13' WHERE storedetailid = '1466';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1449', '1', '12', '1', '94', 'اضافة فاتورة مبيعات', 'sellbillController.php', '138', '126', '2', '2026-10-06 12:27:13','0','0'); -- id=2255
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '330430',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('328210','2220', '0', '2', 'اضافة فاتورة مبيعات', '94', '330430', '2026-10-06 12:27:13', '2',  'sellbillController.php','1','','0'); -- id=115
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2220', '2220', '2026-10-06', '2', '0', '0', '2026-10-06 12:27:13','اضافة فاتورة مبيعات رقم 94','1','0',null,'0','94','sellbillController.php?do=showDetail&sellbillid=94'); -- id=1146
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1146', '419', '2220', '','0'); -- id=1151
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '330430', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1146', '143', '2220', '','0'); -- id=1146
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '956785', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1998', '1998', '2026-10-06', '2', '0', '0', '2026-10-06 12:27:13','اضافة فاتورة مبيعات رقم 94 - صرف البضاعة من المخزن','1','0',null,'0','94','sellbillController.php?do=showDetail&sellbillid=94'); -- id=1147
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1147', '402', '1998', '','0'); -- id=1152
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '930623.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1147', '382', '1998', '','0'); -- id=1147
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15296692.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1146,0,1147' where sellbillid=94;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 2220, 2220, 2220
                    , 2220, 1998, 1998, 1998
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,2220, 2220, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2220, sellCostBuyPrice =sellCostBuyPrice+2220
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2220, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2220
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1998, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1998
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1998
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2220
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2220
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2220, 2220, 2220
                    , 2220, 1998, 1998, 1998
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,2220, 2220, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2220, sellCostBuyPrice =sellCostBuyPrice+2220
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2220, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2220
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1998, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1998
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1998
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2220
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2220
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 2220, 2220, 2220
                    , 2220, 1998, 1998, 1998, 2220, 2220)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+2220, netSellCostBuyPrice = netSellCostBuyPrice+2220
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+2220
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+2220
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+1998
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+1998
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+1998
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+2220
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+2220;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac4be28ef28f and sellbillId = 94 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 08:57:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 12:27:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 12:27:13', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3184
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:07:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 12:37:33", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 12:37:33', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3185

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac4b560f369f
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 12:37:33', '06ac4b560f369f', '1', '0.00', '0', '0', '1', '7290.00', '7290', '7290', '0', '1', '2026-10-06 12:37:33', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '18' ,'0','','','','','-1','0','0','0','0','0','7290','0','','0','0','7290','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=95
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','95', '0', '2026-10-06 12:37:33', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '7290', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 12:37:33','0','0','',''); -- id=177
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 207;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('560','01426', '95', '100', '1426', '6', '590', '3540', '0', '', '0', '2026-10-06 12:37:33', '1426', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','207-6,','1','1','0','0','590','3540','0','','0','0.00','0','0','0','0'); -- id=389
UPDATE sellbilldetail SET  lastbuyprice = 560.00 , meanbuyprice = 560.00, lastbuyprice_withDiscount = 560.00, meanbuyprice_withDiscount = 560.00
        , lastbuyprice_withTax = 560, meanbuyprice_withTax = 560, lastbuyprice_withDiscountAndTax = 560
                where sellbilldetailid = 389;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1426, '2026-10-06', 3540, 3360, 3360
                    , 3360, 3360, 3360, 3360
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 3360, 3360, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3540, sellCostBuyPrice =sellCostBuyPrice+3360
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3360, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3360
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3360, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3360
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3360
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3360
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3360
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 3540, 3360, 3360
                    , 3360, 3360, 3360, 3360
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3360, 3360, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3540, sellCostBuyPrice =sellCostBuyPrice+3360
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3360, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3360
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3360, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3360
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3360
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3360
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3360
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '18', userid = '2', storedetaildate = '2026-10-06 12:37:33' WHERE storedetailid = '1439';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1426', '1', '6', '1', '95', 'اضافة فاتورة مبيعات', 'sellbillController.php', '24', '18', '2', '2026-10-06 12:37:33','0','0'); -- id=2256
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 216;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('410','01435', '95', '100', '1435', '6', '440', '2640', '0', '', '0', '2026-10-06 12:37:33', '1435', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','216-6,','1','1','0','0','440','2640','0','','0','0.00','0','0','0','0'); -- id=390
UPDATE sellbilldetail SET  lastbuyprice = 410.00 , meanbuyprice = 410.00, lastbuyprice_withDiscount = 410.00, meanbuyprice_withDiscount = 410.00
        , lastbuyprice_withTax = 410, meanbuyprice_withTax = 410, lastbuyprice_withDiscountAndTax = 410
                where sellbilldetailid = 390;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1435, '2026-10-06', 2640, 2460, 2460
                    , 2460, 2460, 2460, 2460
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 2460, 2460, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2640, sellCostBuyPrice =sellCostBuyPrice+2460
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2460, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2460
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2460, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2460
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2460
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2460
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2460
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2640, 2460, 2460
                    , 2460, 2460, 2460, 2460
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2460, 2460, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2640, sellCostBuyPrice =sellCostBuyPrice+2460
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2460, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2460
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2460, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2460
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2460
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2460
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2460
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-06 12:37:33' WHERE storedetailid = '1448';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1435', '1', '6', '1', '95', 'اضافة فاتورة مبيعات', 'sellbillController.php', '21', '15', '2', '2026-10-06 12:37:33','0','0'); -- id=2257
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 198;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('166.5','01449', '95', '101', '1449', '6', '185', '1110', '0', '', '0', '2026-10-06 12:37:33', '1449', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','198-6,','1','1','0','0','185','1110','0','','0','0.00','0','0','0','0'); -- id=391
UPDATE sellbilldetail SET  lastbuyprice = 185.00 , meanbuyprice = 185.00, lastbuyprice_withDiscount = 166.50, meanbuyprice_withDiscount = 166.50
        , lastbuyprice_withTax = 185, meanbuyprice_withTax = 185, lastbuyprice_withDiscountAndTax = 166.5
                where sellbilldetailid = 391;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1449, '2026-10-06', 1110, 1110, 1110
                    , 1110, 999, 999, 999
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 1110, 1110, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1110, sellCostBuyPrice =sellCostBuyPrice+1110
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1110, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1110
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+999, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+999
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+999
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1110
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1110
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1110, 1110, 1110
                    , 1110, 999, 999, 999
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1110, 1110, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1110, sellCostBuyPrice =sellCostBuyPrice+1110
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1110, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1110
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+999, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+999
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+999
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1110
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1110
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '120', userid = '2', storedetaildate = '2026-10-06 12:37:33' WHERE storedetailid = '1466';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1449', '1', '6', '1', '95', 'اضافة فاتورة مبيعات', 'sellbillController.php', '126', '120', '2', '2026-10-06 12:37:33','0','0'); -- id=2258
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '337720',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('330430','7290', '0', '2', 'اضافة فاتورة مبيعات', '95', '337720', '2026-10-06 12:37:33', '2',  'sellbillController.php','1','','0'); -- id=116
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '7290', '7290', '2026-10-06', '2', '0', '0', '2026-10-06 12:37:33','اضافة فاتورة مبيعات رقم 95','1','0',null,'0','95','sellbillController.php?do=showDetail&sellbillid=95'); -- id=1148
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1148', '419', '7290', '','0'); -- id=1153
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '337720', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1148', '143', '7290', '','0'); -- id=1148
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '964075', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '6819', '6819', '2026-10-06', '2', '0', '0', '2026-10-06 12:37:33','اضافة فاتورة مبيعات رقم 95 - صرف البضاعة من المخزن','1','0',null,'0','95','sellbillController.php?do=showDetail&sellbillid=95'); -- id=1149
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1149', '402', '6819', '','0'); -- id=1154
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '937442.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1149', '382', '6819', '','0'); -- id=1149
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15289873.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1148,0,1149' where sellbillid=95;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 7290, 6930, 6930
                    , 6930, 6819, 6819, 6819
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,6930, 6930, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7290, sellCostBuyPrice =sellCostBuyPrice+6930
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6930, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6930
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6819, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6819
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6819
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6930
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6930
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 7290, 6930, 6930
                    , 6930, 6819, 6819, 6819
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,6930, 6930, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7290, sellCostBuyPrice =sellCostBuyPrice+6930
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6930, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6930
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6819, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6819
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6819
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6930
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6930
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 7290, 6930, 6930
                    , 6930, 6819, 6819, 6819, 6930, 6930)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+7290, netSellCostBuyPrice = netSellCostBuyPrice+6930
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+6930
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+6930
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+6819
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+6819
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+6819
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+6930
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+6930;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac4b560f369f and sellbillId = 95 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:07:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 12:37:33", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 12:37:33', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3186
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:40:37";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:40:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:10:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 13:10:39', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3187
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:40:39";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 13:10:39', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3188
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:40:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:10:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 13:10:43', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3189
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:41:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:11:59", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 13:11:59', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3190

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac4c15dddb3c
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 13:11:59', '06ac4c15dddb3c', '1', '0.00', '0', '0', '1', '1110.00', '1110', '1110', '0', '1', '2026-10-06 13:11:59', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '6' ,'0','','','','','-1','0','0','0','0','0','1110','0','','0','0','1110','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=96
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','96', '0', '2026-10-06 13:11:59', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '1110', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 13:11:59','0','0','',''); -- id=178
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 198;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('166.5','01449', '96', '101', '1449', '6', '185', '1110', '0', '', '0', '2026-10-06 13:11:59', '1449', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','198-6,','1','1','0','0','185','1110','0','','0','0.00','0','0','0','0'); -- id=392
UPDATE sellbilldetail SET  lastbuyprice = 185.00 , meanbuyprice = 185.00, lastbuyprice_withDiscount = 166.50, meanbuyprice_withDiscount = 166.50
        , lastbuyprice_withTax = 185, meanbuyprice_withTax = 185, lastbuyprice_withDiscountAndTax = 166.5
                where sellbilldetailid = 392;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1449, '2026-10-06', 1110, 1110, 1110
                    , 1110, 999, 999, 999
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 1110, 1110, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1110, sellCostBuyPrice =sellCostBuyPrice+1110
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1110, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1110
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+999, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+999
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+999
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1110
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1110
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1110, 1110, 1110
                    , 1110, 999, 999, 999
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1110, 1110, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1110, sellCostBuyPrice =sellCostBuyPrice+1110
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1110, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1110
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+999, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+999
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+999
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1110
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1110
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '114', userid = '2', storedetaildate = '2026-10-06 13:11:59' WHERE storedetailid = '1466';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1449', '1', '6', '1', '96', 'اضافة فاتورة مبيعات', 'sellbillController.php', '120', '114', '2', '2026-10-06 13:11:59','0','0'); -- id=2259
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '338830',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('337720','1110', '0', '2', 'اضافة فاتورة مبيعات', '96', '338830', '2026-10-06 13:11:59', '2',  'sellbillController.php','1','','0'); -- id=117
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1110', '1110', '2026-10-06', '2', '0', '0', '2026-10-06 13:11:59','اضافة فاتورة مبيعات رقم 96','1','0',null,'0','96','sellbillController.php?do=showDetail&sellbillid=96'); -- id=1150
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1150', '419', '1110', '','0'); -- id=1155
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '338830', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1150', '143', '1110', '','0'); -- id=1150
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '965185', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '999', '999', '2026-10-06', '2', '0', '0', '2026-10-06 13:11:59','اضافة فاتورة مبيعات رقم 96 - صرف البضاعة من المخزن','1','0',null,'0','96','sellbillController.php?do=showDetail&sellbillid=96'); -- id=1151
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1151', '402', '999', '','0'); -- id=1156
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '938441.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1151', '382', '999', '','0'); -- id=1151
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15288874.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1150,0,1151' where sellbillid=96;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 1110, 1110, 1110
                    , 1110, 999, 999, 999
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1110, 1110, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1110, sellCostBuyPrice =sellCostBuyPrice+1110
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1110, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1110
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+999, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+999
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+999
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1110
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1110
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1110, 1110, 1110
                    , 1110, 999, 999, 999
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1110, 1110, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1110, sellCostBuyPrice =sellCostBuyPrice+1110
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1110, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1110
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+999, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+999
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+999
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1110
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1110
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 1110, 1110, 1110
                    , 1110, 999, 999, 999, 1110, 1110)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+1110, netSellCostBuyPrice = netSellCostBuyPrice+1110
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+1110
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+1110
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+999
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+999
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+999
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+1110
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+1110;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac4c15dddb3c and sellbillId = 96 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:41:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:11:59", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 13:11:59', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3191
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:44:27";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:44:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:14:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 13:14:29', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3192
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:44:30";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 13:14:30', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3193
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:44:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:14:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 13:14:34', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3194
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:46:02";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:46:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:16:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 13:16:04', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3195
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:46:04";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 13:16:04', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3196
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:46:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:16:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 13:16:07', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3197
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:46:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:16:50", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 13:16:50', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3198

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac4c96fe602d
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 13:16:50', '06ac4c96fe602d', '1', '0.00', '0', '0', '1', '1320.00', '1320', '1320', '0', '1', '2026-10-06 13:16:50', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '6' ,'0','','','','','-1','0','0','0','0','0','1320','0','','0','0','1320','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=97
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','97', '0', '2026-10-06 13:16:50', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '1320', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 13:16:50','0','0','',''); -- id=179
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 199;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('180','01450', '97', '101', '1450', '3', '200', '600', '0', '', '0', '2026-10-06 13:16:50', '1450', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','199-3,','1','1','0','0','200','600','0','','0','0.00','0','0','0','0'); -- id=393
UPDATE sellbilldetail SET  lastbuyprice = 200.00 , meanbuyprice = 200.00, lastbuyprice_withDiscount = 180.00, meanbuyprice_withDiscount = 180.00
        , lastbuyprice_withTax = 200, meanbuyprice_withTax = 200, lastbuyprice_withDiscountAndTax = 180
                where sellbilldetailid = 393;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1450, '2026-10-06', 600, 600, 600
                    , 600, 540, 540, 540
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 600, 600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+600, sellCostBuyPrice =sellCostBuyPrice+600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+540, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+540
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+540
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+600
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 600, 600, 600
                    , 600, 540, 540, 540
                    , 0, 0, 0, 0
                    , 0, 0, 0, 600, 600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+600, sellCostBuyPrice =sellCostBuyPrice+600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+540, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+540
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+540
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+600
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '33', userid = '2', storedetaildate = '2026-10-06 13:16:50' WHERE storedetailid = '1467';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1450', '1', '3', '1', '97', 'اضافة فاتورة مبيعات', 'sellbillController.php', '36', '33', '2', '2026-10-06 13:16:50','0','0'); -- id=2260
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 201;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('216','01452', '97', '101', '1452', '3', '240', '720', '0', '', '0', '2026-10-06 13:16:50', '1452', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','201-3,','1','1','0','0','240','720','0','','0','0.00','0','0','0','0'); -- id=394
UPDATE sellbilldetail SET  lastbuyprice = 240.00 , meanbuyprice = 240.00, lastbuyprice_withDiscount = 216.00, meanbuyprice_withDiscount = 216.00
        , lastbuyprice_withTax = 240, meanbuyprice_withTax = 240, lastbuyprice_withDiscountAndTax = 216
                where sellbilldetailid = 394;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1452, '2026-10-06', 720, 720, 720
                    , 720, 648, 648, 648
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 720, 720, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+720, sellCostBuyPrice =sellCostBuyPrice+720
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+720, sellCostMeanBuyPrice = sellCostMeanBuyPrice+720
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+648, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+648
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+648
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+720
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+720
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 720, 720, 720
                    , 720, 648, 648, 648
                    , 0, 0, 0, 0
                    , 0, 0, 0, 720, 720, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+720, sellCostBuyPrice =sellCostBuyPrice+720
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+720, sellCostMeanBuyPrice = sellCostMeanBuyPrice+720
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+648, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+648
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+648
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+720
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+720
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '69', userid = '2', storedetaildate = '2026-10-06 13:16:50' WHERE storedetailid = '1469';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1452', '1', '3', '1', '97', 'اضافة فاتورة مبيعات', 'sellbillController.php', '72', '69', '2', '2026-10-06 13:16:50','0','0'); -- id=2261
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '340150',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('338830','1320', '0', '2', 'اضافة فاتورة مبيعات', '97', '340150', '2026-10-06 13:16:50', '2',  'sellbillController.php','1','','0'); -- id=118
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1320', '1320', '2026-10-06', '2', '0', '0', '2026-10-06 13:16:50','اضافة فاتورة مبيعات رقم 97','1','0',null,'0','97','sellbillController.php?do=showDetail&sellbillid=97'); -- id=1152
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1152', '419', '1320', '','0'); -- id=1157
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '340150', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1152', '143', '1320', '','0'); -- id=1152
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '966505', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1188', '1188', '2026-10-06', '2', '0', '0', '2026-10-06 13:16:50','اضافة فاتورة مبيعات رقم 97 - صرف البضاعة من المخزن','1','0',null,'0','97','sellbillController.php?do=showDetail&sellbillid=97'); -- id=1153
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1153', '402', '1188', '','0'); -- id=1158
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '939629.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1153', '382', '1188', '','0'); -- id=1153
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15287686.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1152,0,1153' where sellbillid=97;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 1320, 1320, 1320
                    , 1320, 1188, 1188, 1188
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1320, 1320, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1320, sellCostBuyPrice =sellCostBuyPrice+1320
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1320, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1320
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1188, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1188
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1188
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1320
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1320
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1320, 1320, 1320
                    , 1320, 1188, 1188, 1188
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1320, 1320, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1320, sellCostBuyPrice =sellCostBuyPrice+1320
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1320, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1320
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1188, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1188
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1188
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1320
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1320
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 1320, 1320, 1320
                    , 1320, 1188, 1188, 1188, 1320, 1320)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+1320, netSellCostBuyPrice = netSellCostBuyPrice+1320
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+1320
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+1320
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+1188
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+1188
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+1188
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+1320
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+1320;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac4c96fe602d and sellbillId = 97 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:46:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:16:50", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 13:16:50', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3199
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:46:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:16:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 13:16:58', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3200
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:47:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:17:06", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-06 13:17:06', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3201
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:47:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:17:15", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 13:17:15', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3202
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:51:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:21:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-06 13:21:57', '1', 'supplierShow2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php?do=supplierShow2'); -- id=3203
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:58:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:28:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 13:28:04', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3204
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 09:58:04";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 13:28:04', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3205
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:01:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:31:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storereportController.php', '2026-10-06 13:31:32', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storereportController.php'); -- id=3206
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:05:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:35:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-06 13:35:34', '1', 'supplierShow2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php?do=supplierShow2'); -- id=3207
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:06:06";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-06 13:36:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 13:36:06', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3208
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:06:06";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 13:36:06', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3209
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:06:21";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-06 13:36:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-06 13:36:21', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php'); -- id=3210
update user set blockedByLimits = 0;
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:07:16";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-06 13:37:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 13:37:16', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3211
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:07:16";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 13:37:16', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3212
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:07:36";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-06 13:37:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-06 13:37:36', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/saveController.php'); -- id=3213
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:07:54";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-06 13:37:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-06 13:37:54', '1', 'add', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/saveController.php?do=add'); -- id=3214
BEGIN;
INSERT INTO save (savename, savecurrentvalue, savedetails, savedate, conditions, userid, currencyId, sortby,treeId,saveTreeParentType,webApiId,savetypeid) VALUES ('خزنة شروال', '', '', '2026-10-06 13:37:54', '0', '1', '1', '0','0','0','0','0'); -- id=4
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('0','0', '0', '4', 'تم اضافة  خزنة باسم   [ خزنة شروال ] ', '4', '0', '2026-10-06 13:37:54', '1',  'saveController.php','0','','0'); -- id=119
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('خزنة شروال', 'خزنة شروال', 'خزنة شروال', 'خزنة شروال', '40', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-06 13:37:54'); -- id=568
UPDATE save SET savename = 'خزنة شروال', savecurrentvalue = '', savedetails = '', savedate = '2026-10-06 13:37:54', conditions = '0', userid = '1', sortby= '0',treeId='568',saveTreeParentType='0',savetypeid='0' WHERE saveid = '4';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:07:55";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-06 13:37:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-06 13:37:55', '1', 'sucess', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/saveController.php?do=sucess'); -- id=3215
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:07:57";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-06 13:37:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-06 13:37:57', '1', 'show', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/saveController.php?do=show'); -- id=3216
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:08:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:38:04", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-06 13:38:04', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3217
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:08:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:38:07", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 13:38:07', '2', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=97'); -- id=3218
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:08:08";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-06 13:38:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-06 13:38:08', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php'); -- id=3219
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:08:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:38:30", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 13:38:30', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3220
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:09:43";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-06 13:39:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-06 13:39:43', '1', 'add', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=add'); -- id=3221
INSERT INTO user (username, password, usergroupid, employeename, currentdate, conditions, saveid,userstoreid ,awardrate,searchinonesave, branchId,question, answer,blockedByLimits,directSaveBills,userstoreidDef,empid,obygyDoctorId,lang,viewclients,viewbills,storeSupervisor,storeSupervisorStores,projectids,bankids,saveids,searchinonestorebalance,storeids,webApiId,closeSavid,charityids,laterNakdiUserIds,awardrategomla,awardratehalf,dellaternakdipayed,accountids) VALUES ('كاشير شروال', '123', '3', 'شروال', '2026-10-06', '0', '2', '1' ,'0' ,'0','-1','اسمك ايه','شروال','0','0','1','0','0','','1','0','0','','-1,','-1,','2,4','0','1','0','4','-1,','-1,-1','0','0','1','-1,'); -- id=6
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:09:44";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-06 13:39:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-06 13:39:44', '1', 'sucess', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=sucess'); -- id=3222
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:09:45";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-06 13:39:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-06 13:39:45', '1', 'show', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=show'); -- id=3223
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:10:05";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:10:05";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:10:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:40:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 13:40:08', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3224
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:10:08";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 13:40:08', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3225
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:10:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 13:40:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 13:40:10', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3226
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:36:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:06:08", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 14:06:08', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3227

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac4cfa61729d
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 14:06:08', '06ac4cfa61729d', '1', '0.00', '0', '0', '1', '1620.00', '1620', '1620', '0', '1', '2026-10-06 14:06:08', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '3' ,'0','','','','','-1','0','0','0','0','0','1620','0','','0','0','1620','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=98
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','98', '0', '2026-10-06 14:06:08', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '1620', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 14:06:08','0','0','',''); -- id=180
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 212;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('510','01431', '98', '100', '1431', '3', '540', '1620', '0', '', '0', '2026-10-06 14:06:08', '1431', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','212-3,','1','1','0','0','540','1620','0','','0','0.00','0','0','0','0'); -- id=395
UPDATE sellbilldetail SET  lastbuyprice = 510.00 , meanbuyprice = 510.00, lastbuyprice_withDiscount = 510.00, meanbuyprice_withDiscount = 510.00
        , lastbuyprice_withTax = 510, meanbuyprice_withTax = 510, lastbuyprice_withDiscountAndTax = 510
                where sellbilldetailid = 395;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1431, '2026-10-06', 1620, 1530, 1530
                    , 1530, 1530, 1530, 1530
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1530, 1530, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1620, sellCostBuyPrice =sellCostBuyPrice+1530
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1530, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1530
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1530, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1530
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1530
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1530
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1530
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1620, 1530, 1530
                    , 1530, 1530, 1530, 1530
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1530, 1530, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1620, sellCostBuyPrice =sellCostBuyPrice+1530
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1530, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1530
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1530, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1530
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1530
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1530
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1530
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '18', userid = '2', storedetaildate = '2026-10-06 14:06:08' WHERE storedetailid = '1444';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1431', '1', '3', '1', '98', 'اضافة فاتورة مبيعات', 'sellbillController.php', '21', '18', '2', '2026-10-06 14:06:08','0','0'); -- id=2262
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '341770',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('340150','1620', '0', '2', 'اضافة فاتورة مبيعات', '98', '341770', '2026-10-06 14:06:08', '2',  'sellbillController.php','1','','0'); -- id=120
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1620', '1620', '2026-10-06', '2', '0', '0', '2026-10-06 14:06:08','اضافة فاتورة مبيعات رقم 98','1','0',null,'0','98','sellbillController.php?do=showDetail&sellbillid=98'); -- id=1154
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1154', '419', '1620', '','0'); -- id=1159
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '341770', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1154', '143', '1620', '','0'); -- id=1154
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '968125', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1530', '1530', '2026-10-06', '2', '0', '0', '2026-10-06 14:06:08','اضافة فاتورة مبيعات رقم 98 - صرف البضاعة من المخزن','1','0',null,'0','98','sellbillController.php?do=showDetail&sellbillid=98'); -- id=1155
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1155', '402', '1530', '','0'); -- id=1160
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '941159.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1155', '382', '1530', '','0'); -- id=1155
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15286156.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1154,0,1155' where sellbillid=98;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 1620, 1530, 1530
                    , 1530, 1530, 1530, 1530
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1530, 1530, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1620, sellCostBuyPrice =sellCostBuyPrice+1530
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1530, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1530
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1530, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1530
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1530
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1530
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1530
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1620, 1530, 1530
                    , 1530, 1530, 1530, 1530
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1530, 1530, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1620, sellCostBuyPrice =sellCostBuyPrice+1530
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1530, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1530
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1530, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1530
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1530
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1530
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1530
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 1620, 1530, 1530
                    , 1530, 1530, 1530, 1530, 1530, 1530)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+1620, netSellCostBuyPrice = netSellCostBuyPrice+1530
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+1530
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+1530
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+1530
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+1530
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+1530
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+1530
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+1530;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac4cfa61729d and sellbillId = 98 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:36:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:06:08", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 14:06:08', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3228
UPDATE user SET loginip = "" WHERE userid = 1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:42:19";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:42:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:12:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 14:12:23', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3229
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:42:23";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 14:12:23', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3230
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:42:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:12:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 14:12:34', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3231
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:43:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:13:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 14:13:34', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3232
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:58:39";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:58:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:28:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 14:28:46', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3233
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:58:46";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 14:28:46', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3234
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 10:58:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:28:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 14:28:50', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3235
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:07:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:37:01", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 14:37:01', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3236
UPDATE user SET loginip = "" WHERE userid = 1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:09:30";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:09:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:39:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 14:39:32', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3237
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:09:32";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 14:39:32', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3238
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:10:46";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:10:46";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:10:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:40:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 14:40:48', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3239
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:10:48";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 14:40:48', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3240
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:10:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:40:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 14:40:54', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3241
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:13:00";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:13:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:43:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 14:43:03', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3242
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:13:04";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 14:43:04', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3243
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:14:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:44:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 14:44:31', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3244
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:17:22";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:17:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:47:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 14:47:25', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3245
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:17:26";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 14:47:26', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3246
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:17:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:47:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 14:47:28', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3247
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:29:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:59:57", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 14:59:57', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3248

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac4bef1eb3af
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 14:59:57', '06ac4bef1eb3af', '1', '0.00', '0', '0', '1', '7850.00', '7850', '7850', '0', '1', '2026-10-06 14:59:57', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '20' ,'0','','','','','-1','0','0','0','0','0','7850','0','','0','0','7850','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=99
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','99', '0', '2026-10-06 14:59:57', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '7850', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 14:59:57','0','0','',''); -- id=181
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('365','09634', '99', '24', '887', '10', '385', '3850', '0', '', '0', '2026-10-06 14:59:57', '887', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','385','3850','0','','0','0.00','0','0','0','0'); -- id=396
UPDATE sellbilldetail SET  lastbuyprice = 365.00 , meanbuyprice = 365.00, lastbuyprice_withDiscount = 365.00, meanbuyprice_withDiscount = 365.00
        , lastbuyprice_withTax = 365, meanbuyprice_withTax = 365, lastbuyprice_withDiscountAndTax = 365
                where sellbilldetailid = 396;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (887, '2026-10-06', 3850, 3650, 3650
                    , 3650, 3650, 3650, 3650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 3650, 3650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3850, sellCostBuyPrice =sellCostBuyPrice+3650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 3850, 3650, 3650
                    , 3650, 3650, 3650, 3650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3650, 3650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3850, sellCostBuyPrice =sellCostBuyPrice+3650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '45', userid = '2', storedetaildate = '2026-10-06 14:59:57' WHERE storedetailid = '887';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('887', '1', '10', '1', '99', 'اضافة فاتورة مبيعات', 'sellbillController.php', '55', '45', '2', '2026-10-06 14:59:57','0','0'); -- id=2263
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('400','09601', '99', '2', '1015', '5', '420', '2100', '0', '', '0', '2026-10-06 14:59:57', '1015', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','420','2100','0','','0','0.00','0','0','0','0'); -- id=397
UPDATE sellbilldetail SET  lastbuyprice = 400.00 , meanbuyprice = 400.00, lastbuyprice_withDiscount = 400.00, meanbuyprice_withDiscount = 400.00
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where sellbilldetailid = 397;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1015, '2026-10-06', 2100, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2100, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '25', userid = '2', storedetaildate = '2026-10-06 14:59:57' WHERE storedetailid = '1015';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1015', '1', '5', '1', '99', 'اضافة فاتورة مبيعات', 'sellbillController.php', '30', '25', '2', '2026-10-06 14:59:57','0','0'); -- id=2264
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('360','08633', '99', '31', '978', '5', '380', '1900', '0', '', '0', '2026-10-06 14:59:57', '978', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','380','1900','0','','0','0.00','0','0','0','0'); -- id=398
UPDATE sellbilldetail SET  lastbuyprice = 360.00 , meanbuyprice = 360.00, lastbuyprice_withDiscount = 360.00, meanbuyprice_withDiscount = 360.00
        , lastbuyprice_withTax = 360, meanbuyprice_withTax = 360, lastbuyprice_withDiscountAndTax = 360
                where sellbilldetailid = 398;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (978, '2026-10-06', 1900, 1800, 1800
                    , 1800, 1800, 1800, 1800
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1800, 1800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1900, sellCostBuyPrice =sellCostBuyPrice+1800
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1800, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1800
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1800, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1800
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1800
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1800
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1800
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1900, 1800, 1800
                    , 1800, 1800, 1800, 1800
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1800, 1800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1900, sellCostBuyPrice =sellCostBuyPrice+1800
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1800, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1800
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1800, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1800
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1800
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1800
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1800
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '10', userid = '2', storedetaildate = '2026-10-06 14:59:57' WHERE storedetailid = '978';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('978', '1', '5', '1', '99', 'اضافة فاتورة مبيعات', 'sellbillController.php', '15', '10', '2', '2026-10-06 14:59:57','0','0'); -- id=2265
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '349620',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('341770','7850', '0', '2', 'اضافة فاتورة مبيعات', '99', '349620', '2026-10-06 14:59:57', '2',  'sellbillController.php','1','','0'); -- id=121
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '7850', '7850', '2026-10-06', '2', '0', '0', '2026-10-06 14:59:57','اضافة فاتورة مبيعات رقم 99','1','0',null,'0','99','sellbillController.php?do=showDetail&sellbillid=99'); -- id=1156
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1156', '419', '7850', '','0'); -- id=1161
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '349620', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1156', '143', '7850', '','0'); -- id=1156
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '975975', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '7450', '7450', '2026-10-06', '2', '0', '0', '2026-10-06 14:59:57','اضافة فاتورة مبيعات رقم 99 - صرف البضاعة من المخزن','1','0',null,'0','99','sellbillController.php?do=showDetail&sellbillid=99'); -- id=1157
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1157', '402', '7450', '','0'); -- id=1162
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '948609.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1157', '382', '7450', '','0'); -- id=1157
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15278706.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1156,0,1157' where sellbillid=99;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 7850, 7450, 7450
                    , 7450, 7450, 7450, 7450
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,7450, 7450, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7850, sellCostBuyPrice =sellCostBuyPrice+7450
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7450, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7450
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7450, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7450
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7450
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7450
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7450
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 7850, 7450, 7450
                    , 7450, 7450, 7450, 7450
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,7450, 7450, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7850, sellCostBuyPrice =sellCostBuyPrice+7450
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7450, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7450
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7450, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7450
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7450
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7450
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7450
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 7850, 7450, 7450
                    , 7450, 7450, 7450, 7450, 7450, 7450)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+7850, netSellCostBuyPrice = netSellCostBuyPrice+7450
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+7450
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+7450
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+7450
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+7450
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+7450
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+7450
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+7450;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac4bef1eb3af and sellbillId = 99 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:29:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 14:59:57", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 14:59:57', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3249
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:30:13";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:30:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:00:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 15:00:15', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3250
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:30:15";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 15:00:15', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3251
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:30:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:00:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 15:00:19', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3252
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:31:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:01:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 15:01:47', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3253
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:33:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:03:28", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 15:03:28', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3254

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac4e2bd6b537
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 15:03:28', '06ac4e2bd6b537', '1', '0.00', '0', '0', '1', '1470.00', '1470', '1470', '0', '1', '2026-10-06 15:03:28', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '3' ,'0','','','','','-1','0','0','0','0','0','1470','0','','0','0','1470','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=100
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','100', '0', '2026-10-06 15:03:28', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '1470', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 15:03:28','0','0','',''); -- id=182
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 76;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('441','01384', '100', '95', '1384', '3', '490', '1470', '0', '', '0', '2026-10-06 15:03:28', '1384', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','76-3,','1','1','0','0','490','1470','0','','0','0.00','0','0','0','0'); -- id=399
UPDATE sellbilldetail SET  lastbuyprice = 490.00 , meanbuyprice = 490.00, lastbuyprice_withDiscount = 441.00, meanbuyprice_withDiscount = 465.50
        , lastbuyprice_withTax = 490, meanbuyprice_withTax = 245, lastbuyprice_withDiscountAndTax = 441
                where sellbilldetailid = 399;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1384, '2026-10-06', 1470, 1470, 1470
                    , 1470, 1323, 1396.5, 1323
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1470, 735, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1470, sellCostBuyPrice =sellCostBuyPrice+1470
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1470, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1470
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1323, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1396.5
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1323
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1470
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+735
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1470, 1470, 1470
                    , 1470, 1323, 1396.5, 1323
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1470, 735, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1470, sellCostBuyPrice =sellCostBuyPrice+1470
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1470, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1470
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1323, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1396.5
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1323
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1470
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+735
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '372', userid = '2', storedetaildate = '2026-10-06 15:03:28' WHERE storedetailid = '1384';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1384', '1', '3', '1', '100', 'اضافة فاتورة مبيعات', 'sellbillController.php', '375', '372', '2', '2026-10-06 15:03:28','0','0'); -- id=2266
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '351090',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('349620','1470', '0', '2', 'اضافة فاتورة مبيعات', '100', '351090', '2026-10-06 15:03:28', '2',  'sellbillController.php','1','','0'); -- id=122
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1470', '1470', '2026-10-06', '2', '0', '0', '2026-10-06 15:03:28','اضافة فاتورة مبيعات رقم 100','1','0',null,'0','100','sellbillController.php?do=showDetail&sellbillid=100'); -- id=1158
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1158', '419', '1470', '','0'); -- id=1163
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '351090', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1158', '143', '1470', '','0'); -- id=1158
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '977445', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1323', '1323', '2026-10-06', '2', '0', '0', '2026-10-06 15:03:28','اضافة فاتورة مبيعات رقم 100 - صرف البضاعة من المخزن','1','0',null,'0','100','sellbillController.php?do=showDetail&sellbillid=100'); -- id=1159
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1159', '402', '1323', '','0'); -- id=1164
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '949932.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1159', '382', '1323', '','0'); -- id=1159
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15277383.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1158,0,1159' where sellbillid=100;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 1470, 1470, 1470
                    , 1470, 1323, 1396.5, 1323
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1470, 735, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1470, sellCostBuyPrice =sellCostBuyPrice+1470
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1470, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1470
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1323, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1396.5
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1323
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1470
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+735
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1470, 1470, 1470
                    , 1470, 1323, 1396.5, 1323
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1470, 735, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1470, sellCostBuyPrice =sellCostBuyPrice+1470
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1470, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1470
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1323, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1396.5
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1323
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1470
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+735
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 1470, 1470, 1470
                    , 1470, 1323, 1396.5, 1323, 1470, 735)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+1470, netSellCostBuyPrice = netSellCostBuyPrice+1470
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+1470
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+1470
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+1323
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+1396.5
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+1323
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+1470
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+735;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac4e2bd6b537 and sellbillId = 100 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:33:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:03:28", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 15:03:28', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3255
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:34:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:04:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 15:04:31', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3256
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:36:17";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:36:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:06:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 15:06:19', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3257
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:36:19";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 15:06:19', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3258
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:36:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:06:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 15:06:23', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3259
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:37:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:07:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 15:07:03', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3260
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('تمبو تي شيرت','2026-10-06','','93', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=103
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (103, 1,'2026-10-06 15:07:03',1)
                ON DUPLICATE KEY UPDATE catid = 103, edited = 1, sysdate = '2026-10-06 15:07:03', userid = 1; -- id=104
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '103', '1', '2026-10-06', '1', '0'); -- id=16
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:37:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:07:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 15:07:04', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3261
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:37:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:07:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 15:07:06', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3262
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:37:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:07:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 15:07:11', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3263
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:37:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:07:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 15:07:17', '1', 'edit', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=edit&id=101&parentid=93'); -- id=3264
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:37:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:07:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 15:07:40', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=update'); -- id=3265
UPDATE productcat SET productCatName = 'زورو تي شيرت', productCatDate = '2026-10-06', productCatDescription = '', productCatParent = '93', userId = '1', conditions = '0', selldiscount = '0', buydiscount = '0', discounttype = '-1',isOptic = '0' , buytotal = '0' , buyhalf = '0' , buypart = '0' , buypricereal = '0', opticServices = '',logo = '.',inMenu='0',stopNegativeSale='0',price4='0',price5='0',price6='0',price7='0',price8='0',price9='0',price10='0',price11='0',price12='0',price13='0' WHERE productCatId = '101';
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (101, 1,'2026-10-06 15:07:40',1)
                ON DUPLICATE KEY UPDATE catid = 101, edited = 1, sysdate = '2026-10-06 15:07:40', userid = 1; -- id=102
DELETE FROM productcatunit WHERE productcatid = '101';
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '101', '1.00', '2026-10-06', '1', '0'); -- id=17
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:37:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:07:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 15:07:40', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3266
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:37:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:07:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 15:07:43', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3267
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:42:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:12:12", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-06 15:12:12', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3268
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:42:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:12:14", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 15:12:14', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3269
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:42:48";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:43:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:13:01", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 15:13:01', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3270
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:43:01";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-06 15:13:01", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 15:13:01', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3271
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:43:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:13:03", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 15:13:03', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3272
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:50:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:20:14", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 15:20:14', '4', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3273

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac4e5cff32bd
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 15:20:15', '06ac4e5cff32bd', '1', '0.00', '0', '0', '1', '12670.00', '12670', '12670', '0', '2', '2026-10-06 15:20:15', '', '4', '0', 'نقدي', '3', '0', '3', '0', 'نقدي', '30' ,'0','','','','','-1','0','0','0','0','0','12670','0','','0','0','12670','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=101
UPDATE client SET  clientdebt = '0', userid = '4' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','101', '0', '2026-10-06 15:20:15', '4', 'sellbillController.php', 'اضافة فاتورة مبيعات', '12670', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 15:20:15','0','0','',''); -- id=183
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+8 where id = 223;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('410','01442', '101', '88', '1442', '8', '440', '3520', '0', '', '0', '2026-10-06 15:20:15', '1442', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','223-8,','1','1','0','0','440','3520','0','','0','0.00','0','0','0','0'); -- id=400
UPDATE sellbilldetail SET  lastbuyprice = 410.00 , meanbuyprice = 410.00, lastbuyprice_withDiscount = 410.00, meanbuyprice_withDiscount = 410.00
        , lastbuyprice_withTax = 410, meanbuyprice_withTax = 410, lastbuyprice_withDiscountAndTax = 410
                where sellbilldetailid = 400;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1442, '2026-10-06', 3520, 3280, 3280
                    , 3280, 3280, 3280, 3280
                    , 0, 0, 0, 0
                    , 0, 0, 0, 8, 0, 3280, 3280, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3520, sellCostBuyPrice =sellCostBuyPrice+3280
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3280, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3280
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3280, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3280
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3280
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3280
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3280
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+8
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-06', 3520, 3280, 3280
                    , 3280, 3280, 3280, 3280
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3280, 3280, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3520, sellCostBuyPrice =sellCostBuyPrice+3280
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3280, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3280
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3280, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3280
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3280
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3280
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3280
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '4', storedetaildate = '2026-10-06 15:20:15' WHERE storedetailid = '1473';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1442', '2', '8', '1', '101', 'اضافة فاتورة مبيعات', 'sellbillController.php', '8', '0', '4', '2026-10-06 15:20:15','0','0'); -- id=2267
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+4 where id = 220;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('400','01439', '101', '88', '1439', '4', '430', '1720', '0', '', '0', '2026-10-06 15:20:15', '1439', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','220-4,','1','1','0','0','430','1720','0','','0','0.00','0','0','0','0'); -- id=401
UPDATE sellbilldetail SET  lastbuyprice = 400.00 , meanbuyprice = 400.00, lastbuyprice_withDiscount = 400.00, meanbuyprice_withDiscount = 400.00
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where sellbilldetailid = 401;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1439, '2026-10-06', 1720, 1600, 1600
                    , 1600, 1600, 1600, 1600
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4, 0, 1600, 1600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1720, sellCostBuyPrice =sellCostBuyPrice+1600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1600, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1600
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1600
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1600
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+4
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-06', 1720, 1600, 1600
                    , 1600, 1600, 1600, 1600
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1600, 1600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1720, sellCostBuyPrice =sellCostBuyPrice+1600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1600, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1600
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1600
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1600
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '20', userid = '4', storedetaildate = '2026-10-06 15:20:15' WHERE storedetailid = '1470';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1439', '2', '4', '1', '101', 'اضافة فاتورة مبيعات', 'sellbillController.php', '24', '20', '4', '2026-10-06 15:20:15','0','0'); -- id=2268
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 133;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('350','01325', '101', '87', '1325', '3', '390', '1170', '0', '', '0', '2026-10-06 15:20:15', '1325', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','133-3,','1','1','0','0','390','1170','0','','0','0.00','0','0','0','0'); -- id=402
UPDATE sellbilldetail SET  lastbuyprice = 350.00 , meanbuyprice = 350.00, lastbuyprice_withDiscount = 350.00, meanbuyprice_withDiscount = 350.00
        , lastbuyprice_withTax = 350, meanbuyprice_withTax = 350, lastbuyprice_withDiscountAndTax = 350
                where sellbilldetailid = 402;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1325, '2026-10-06', 1170, 1050, 1050
                    , 1050, 1050, 1050, 1050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1050, 1050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1170, sellCostBuyPrice =sellCostBuyPrice+1050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-06', 1170, 1050, 1050
                    , 1050, 1050, 1050, 1050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1050, 1050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1170, sellCostBuyPrice =sellCostBuyPrice+1050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '282', userid = '4', storedetaildate = '2026-10-06 15:20:15' WHERE storedetailid = '1406';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1325', '2', '3', '1', '101', 'اضافة فاتورة مبيعات', 'sellbillController.php', '285', '282', '4', '2026-10-06 15:20:15','0','0'); -- id=2269
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+8 where id = 147;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('400','01356', '101', '88', '1356', '8', '420', '3360', '0', '', '0', '2026-10-06 15:20:15', '1356', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','147-8,','1','1','0','0','420','3360','0','','0','0.00','0','0','0','0'); -- id=403
UPDATE sellbilldetail SET  lastbuyprice = 400.00 , meanbuyprice = 400.00, lastbuyprice_withDiscount = 400.00, meanbuyprice_withDiscount = 400.00
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where sellbilldetailid = 403;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1356, '2026-10-06', 3360, 3200, 3200
                    , 3200, 3200, 3200, 3200
                    , 0, 0, 0, 0
                    , 0, 0, 0, 8, 0, 3200, 3200, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3360, sellCostBuyPrice =sellCostBuyPrice+3200
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3200, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3200
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3200, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3200
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3200
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3200
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3200
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+8
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-06', 3360, 3200, 3200
                    , 3200, 3200, 3200, 3200
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3200, 3200, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3360, sellCostBuyPrice =sellCostBuyPrice+3200
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3200, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3200
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3200, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3200
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3200
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3200
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3200
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '88', userid = '4', storedetaildate = '2026-10-06 15:20:15' WHERE storedetailid = '1413';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1356', '2', '8', '1', '101', 'اضافة فاتورة مبيعات', 'sellbillController.php', '96', '88', '4', '2026-10-06 15:20:15','0','0'); -- id=2270
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+4 where id = 139;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('370','01362', '101', '89', '1362', '4', '410', '1640', '0', '', '0', '2026-10-06 15:20:15', '1362', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','139-4,','1','1','0','0','410','1640','0','','0','0.00','0','0','0','0'); -- id=404
UPDATE sellbilldetail SET  lastbuyprice = 370.00 , meanbuyprice = 370.00, lastbuyprice_withDiscount = 370.00, meanbuyprice_withDiscount = 370.00
        , lastbuyprice_withTax = 370, meanbuyprice_withTax = 370, lastbuyprice_withDiscountAndTax = 370
                where sellbilldetailid = 404;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1362, '2026-10-06', 1640, 1480, 1480
                    , 1480, 1480, 1480, 1480
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4, 0, 1480, 1480, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1640, sellCostBuyPrice =sellCostBuyPrice+1480
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1480, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1480
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1480, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1480
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1480
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1480
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1480
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+4
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-06', 1640, 1480, 1480
                    , 1480, 1480, 1480, 1480
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1480, 1480, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1640, sellCostBuyPrice =sellCostBuyPrice+1480
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1480, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1480
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1480, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1480
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1480
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1480
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1480
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '8', userid = '4', storedetaildate = '2026-10-06 15:20:15' WHERE storedetailid = '1409';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1362', '2', '4', '1', '101', 'اضافة فاتورة مبيعات', 'sellbillController.php', '12', '8', '4', '2026-10-06 15:20:15','0','0'); -- id=2271
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 135;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('380','01326', '101', '87', '1326', '3', '420', '1260', '0', '', '0', '2026-10-06 15:20:15', '1326', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','135-3,','1','1','0','0','420','1260','0','','0','0.00','0','0','0','0'); -- id=405
UPDATE sellbilldetail SET  lastbuyprice = 380.00 , meanbuyprice = 380.00, lastbuyprice_withDiscount = 380.00, meanbuyprice_withDiscount = 380.00
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 380
                where sellbilldetailid = 405;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1326, '2026-10-06', 1260, 1140, 1140
                    , 1140, 1140, 1140, 1140
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1140, 1140, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1260, sellCostBuyPrice =sellCostBuyPrice+1140
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1140, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1140
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1140, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1140
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1140
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1140
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1140
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-06', 1260, 1140, 1140
                    , 1140, 1140, 1140, 1140
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1140, 1140, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1260, sellCostBuyPrice =sellCostBuyPrice+1140
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1140, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1140
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1140, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1140
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1140
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1140
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1140
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '230', userid = '4', storedetaildate = '2026-10-06 15:20:15' WHERE storedetailid = '1407';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1326', '2', '3', '1', '101', 'اضافة فاتورة مبيعات', 'sellbillController.php', '233', '230', '4', '2026-10-06 15:20:15','0','0'); -- id=2272
CALL saveInUse(3,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '228410',  userid = '4' WHERE saveid = '3';
UPDATE save SET  inUse = 0 where saveid = 3;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('215740','12670', '0', '3', 'اضافة فاتورة مبيعات', '101', '228410', '2026-10-06 15:20:15', '4',  'sellbillController.php','1','','0'); -- id=123
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '12670', '12670', '2026-10-06', '4', '0', '0', '2026-10-06 15:20:15','اضافة فاتورة مبيعات رقم 101','1','0',null,'0','101','sellbillController.php?do=showDetail&sellbillid=101'); -- id=1160
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1160', '501', '12670', '','0'); -- id=1165
UPDATE accountstree SET name = 'خزينه المحل الارضي', customName = 'خزينه المحل الارضي', customNameEn = 'خزينه المحل الارضي', nameEn = 'خزينه المحل الارضي', parent = '40', accountNature = '0', theValue = '228410', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-30 21:35:47' WHERE id = '501';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1160', '143', '12670', '','0'); -- id=1160
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '990115', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '11750', '11750', '2026-10-06', '4', '0', '0', '2026-10-06 15:20:15','اضافة فاتورة مبيعات رقم 101 - صرف البضاعة من المخزن','1','0',null,'0','101','sellbillController.php?do=showDetail&sellbillid=101'); -- id=1161
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1161', '402', '11750', '','0'); -- id=1166
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '961682.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1161', '492', '11750', '','0'); -- id=1161
UPDATE accountstree SET name = 'مخزن المحل', customName = 'مخزن المحل', customNameEn = 'مخزن المحل', nameEn = 'مخزن المحل', parent = '49', accountNature = '0', theValue = '851800', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 19:38:59' WHERE id = '492';
update sellbill set dailyentryid='1160,0,1161' where sellbillid=101;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 12670, 11750, 11750
                    , 11750, 11750, 11750, 11750
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,11750, 11750, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+12670, sellCostBuyPrice =sellCostBuyPrice+11750
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+11750, sellCostMeanBuyPrice = sellCostMeanBuyPrice+11750
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+11750, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+11750
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+11750
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+11750
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+11750
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 12670, 11750, 11750
                    , 11750, 11750, 11750, 11750
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,11750, 11750, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+12670, sellCostBuyPrice =sellCostBuyPrice+11750
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+11750, sellCostMeanBuyPrice = sellCostMeanBuyPrice+11750
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+11750, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+11750
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+11750
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+11750
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+11750
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 12670, 11750, 11750
                    , 11750, 11750, 11750, 11750, 11750, 11750)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+12670, netSellCostBuyPrice = netSellCostBuyPrice+11750
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+11750
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+11750
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+11750
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+11750
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+11750
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+11750
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+11750;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac4e5cff32bd and sellbillId = 101 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:50:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:20:15", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 15:20:15', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3274
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:50:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:20:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 15:20:45', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3275
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('تي شيرت ميلتون تمبو 450','','103','430','450','450','450','2026-10-06','0','1','0','','0','0','0','0','0','430','430','430','430','430','0','4.65','0','0','.','0','0','0','430','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','430','430','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','430','0','0','0','0','0','0','','','0','0','0','0'); -- id=1457
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 450', productDescription = '', productCatId = '103', productBuyPrice = '430', productSellAllPrice = '450', productSellUnitPrice = '450', productSellHalfPrice = '450', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01457',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430' , buypricereal_precentage = '0' , buytotal_precentage = '4.65' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1457';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1457', '1.00', '2026-10-06', '1', '0','0145701','450','450','450','430','','0','0','0','0','0','0','0','0','0','0'); -- id=1457
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1457', '1', '0', '1', '2026-10-06'); -- id=1482
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1457', '1', '0', '0', '1457', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2273
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1457, 1,'2026-10-06 15:20:45',1)
                ON DUPLICATE KEY UPDATE productid = 1457, edited = 1, sysdate = '2026-10-06 15:20:45', userid = 1; -- id=2242
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 450', productDescription = '', productCatId = '103', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01457',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430' , buypricereal_precentage = '0' , buytotal_precentage = '4.65' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1457';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('تي شيرت ميلتون تمبو 320','','103','300','320','320','320','2026-10-06','0','1','0','','0','0','0','0','0','300','300','300','300','300','0','6.67','0','0','.','0','0','0','300','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','300','300','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','300','0','0','0','0','0','0','','','0','0','0','0'); -- id=1458
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 320', productDescription = '', productCatId = '103', productBuyPrice = '300', productSellAllPrice = '320', productSellUnitPrice = '320', productSellHalfPrice = '320', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01458',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '300',lastbuyprice_withDiscount = '300',meanbuyprice = '300',meanbuyprice_withDiscount = '300' , productbuypricereal = '300' , buypricereal_precentage = '0' , buytotal_precentage = '6.67' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='300',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='300',meanbuyprice_withTax='300',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='300',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1458';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1458', '1.00', '2026-10-06', '1', '0','0145801','320','320','320','300','','0','0','0','0','0','0','0','0','0','0'); -- id=1458
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1458', '1', '0', '1', '2026-10-06'); -- id=1483
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1458', '1', '0', '0', '1458', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2274
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1458, 1,'2026-10-06 15:20:45',1)
                ON DUPLICATE KEY UPDATE productid = 1458, edited = 1, sysdate = '2026-10-06 15:20:45', userid = 1; -- id=2243
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 320', productDescription = '', productCatId = '103', productBuyPrice = '300.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01458',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '300',lastbuyprice_withDiscount = '300',meanbuyprice = '300',meanbuyprice_withDiscount = '300' , productbuypricereal = '300' , buypricereal_precentage = '0' , buytotal_precentage = '6.67' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='300',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='300',meanbuyprice_withTax='300',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='300',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1458';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('تي شيرت ميلتون تمبو 330','','103','310','330','330','330','2026-10-06','0','1','0','','0','0','0','0','0','310','310','310','310','310','0','6.45','0','0','.','0','0','0','310','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','310','310','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','310','0','0','0','0','0','0','','','0','0','0','0'); -- id=1459
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 330', productDescription = '', productCatId = '103', productBuyPrice = '310', productSellAllPrice = '330', productSellUnitPrice = '330', productSellHalfPrice = '330', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01459',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '310',lastbuyprice_withDiscount = '310',meanbuyprice = '310',meanbuyprice_withDiscount = '310' , productbuypricereal = '310' , buypricereal_precentage = '0' , buytotal_precentage = '6.45' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='310',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='310',meanbuyprice_withTax='310',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='310',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1459';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1459', '1.00', '2026-10-06', '1', '0','0145901','330','330','330','310','','0','0','0','0','0','0','0','0','0','0'); -- id=1459
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1459', '1', '0', '1', '2026-10-06'); -- id=1484
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1459', '1', '0', '0', '1459', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2275
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1459, 1,'2026-10-06 15:20:45',1)
                ON DUPLICATE KEY UPDATE productid = 1459, edited = 1, sysdate = '2026-10-06 15:20:45', userid = 1; -- id=2244
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 330', productDescription = '', productCatId = '103', productBuyPrice = '310.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01459',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '310',lastbuyprice_withDiscount = '310',meanbuyprice = '310',meanbuyprice_withDiscount = '310' , productbuypricereal = '310' , buypricereal_precentage = '0' , buytotal_precentage = '6.45' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='310',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='310',meanbuyprice_withTax='310',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='310',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1459';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('تي شيرت ميلتون تمبو 380','','103','360','380','380','380','2026-10-06','0','1','0','','0','0','0','0','0','360','360','360','360','360','0','5.56','0','0','.','0','0','0','360','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','360','360','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','360','0','0','0','0','0','0','','','0','0','0','0'); -- id=1460
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 380', productDescription = '', productCatId = '103', productBuyPrice = '360', productSellAllPrice = '380', productSellUnitPrice = '380', productSellHalfPrice = '380', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01460',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '360',lastbuyprice_withDiscount = '360',meanbuyprice = '360',meanbuyprice_withDiscount = '360' , productbuypricereal = '360' , buypricereal_precentage = '0' , buytotal_precentage = '5.56' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='360',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='360',meanbuyprice_withTax='360',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='360',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1460';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1460', '1.00', '2026-10-06', '1', '0','0146001','380','380','380','360','','0','0','0','0','0','0','0','0','0','0'); -- id=1460
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1460', '1', '0', '1', '2026-10-06'); -- id=1485
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1460', '1', '0', '0', '1460', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2276
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1460, 1,'2026-10-06 15:20:45',1)
                ON DUPLICATE KEY UPDATE productid = 1460, edited = 1, sysdate = '2026-10-06 15:20:45', userid = 1; -- id=2245
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 380', productDescription = '', productCatId = '103', productBuyPrice = '360.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01460',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '360',lastbuyprice_withDiscount = '360',meanbuyprice = '360',meanbuyprice_withDiscount = '360' , productbuypricereal = '360' , buypricereal_precentage = '0' , buytotal_precentage = '5.56' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='360',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='360',meanbuyprice_withTax='360',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='360',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1460';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('تي شيرت ميلتون تمبو 550','','103','530','550','550','550','2026-10-06','0','1','0','','0','0','0','0','0','530','530','530','530','530','0','3.77','0','0','.','0','0','0','530','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','530','530','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','530','0','0','0','0','0','0','','','0','0','0','0'); -- id=1461
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 550', productDescription = '', productCatId = '103', productBuyPrice = '530', productSellAllPrice = '550', productSellUnitPrice = '550', productSellHalfPrice = '550', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01461',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '530',meanbuyprice = '530',meanbuyprice_withDiscount = '530' , productbuypricereal = '530' , buypricereal_precentage = '0' , buytotal_precentage = '3.77' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='530',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1461';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1461', '1.00', '2026-10-06', '1', '0','0146101','550','550','550','530','','0','0','0','0','0','0','0','0','0','0'); -- id=1461
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1461', '1', '0', '1', '2026-10-06'); -- id=1486
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1461', '1', '0', '0', '1461', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2277
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1461, 1,'2026-10-06 15:20:45',1)
                ON DUPLICATE KEY UPDATE productid = 1461, edited = 1, sysdate = '2026-10-06 15:20:45', userid = 1; -- id=2246
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 550', productDescription = '', productCatId = '103', productBuyPrice = '530.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01461',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '530',meanbuyprice = '530',meanbuyprice_withDiscount = '530' , productbuypricereal = '530' , buypricereal_precentage = '0' , buytotal_precentage = '3.77' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='530',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1461';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('تي شيرت ميلتون تمبو 430','','103','410','430','430','430','2026-10-06','0','1','0','','0','0','0','0','0','410','410','410','410','410','0','4.88','0','0','.','0','0','0','410','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','410','410','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','410','0','0','0','0','0','0','','','0','0','0','0'); -- id=1462
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 430', productDescription = '', productCatId = '103', productBuyPrice = '410', productSellAllPrice = '430', productSellUnitPrice = '430', productSellHalfPrice = '430', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01462',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410',meanbuyprice_withDiscount = '410' , productbuypricereal = '410' , buypricereal_precentage = '0' , buytotal_precentage = '4.88' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='410',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1462';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1462', '1.00', '2026-10-06', '1', '0','0146201','430','430','430','410','','0','0','0','0','0','0','0','0','0','0'); -- id=1462
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1462', '1', '0', '1', '2026-10-06'); -- id=1487
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1462', '1', '0', '0', '1462', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2278
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1462, 1,'2026-10-06 15:20:45',1)
                ON DUPLICATE KEY UPDATE productid = 1462, edited = 1, sysdate = '2026-10-06 15:20:45', userid = 1; -- id=2247
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 430', productDescription = '', productCatId = '103', productBuyPrice = '410.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01462',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410',meanbuyprice_withDiscount = '410' , productbuypricereal = '410' , buypricereal_precentage = '0' , buytotal_precentage = '4.88' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='410',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1462';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('تي شيرت ميلتون تمبو 470','','103','450','470','470','470','2026-10-06','0','1','0','','0','0','0','0','0','450','450','450','450','450','0','4.44','0','0','.','0','0','0','450','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','450','450','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','450','0','0','0','0','0','0','','','0','0','0','0'); -- id=1463
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 470', productDescription = '', productCatId = '103', productBuyPrice = '450', productSellAllPrice = '470', productSellUnitPrice = '470', productSellHalfPrice = '470', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01463',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '4.44' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1463';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1463', '1.00', '2026-10-06', '1', '0','0146301','470','470','470','450','','0','0','0','0','0','0','0','0','0','0'); -- id=1463
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1463', '1', '0', '1', '2026-10-06'); -- id=1488
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1463', '1', '0', '0', '1463', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2279
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1463, 1,'2026-10-06 15:20:45',1)
                ON DUPLICATE KEY UPDATE productid = 1463, edited = 1, sysdate = '2026-10-06 15:20:45', userid = 1; -- id=2248
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 470', productDescription = '', productCatId = '103', productBuyPrice = '450.00', productSellAllPrice = '470.00', productSellUnitPrice = '470.00', productSellHalfPrice = '470.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01463',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '4.44' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1463';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('تي شيرت ميلتون تمبو 600','','103','580','600','600','600','2026-10-06','0','1','0','','0','0','0','0','0','580','580','580','580','580','0','3.45','0','0','.','0','0','0','580','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','580','580','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','580','0','0','0','0','0','0','','','0','0','0','0'); -- id=1464
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 600', productDescription = '', productCatId = '103', productBuyPrice = '580', productSellAllPrice = '600', productSellUnitPrice = '600', productSellHalfPrice = '600', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01464',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '3.45' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1464';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1464', '1.00', '2026-10-06', '1', '0','0146401','600','600','600','580','','0','0','0','0','0','0','0','0','0','0'); -- id=1464
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1464', '1', '0', '1', '2026-10-06'); -- id=1489
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1464', '1', '0', '0', '1464', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2280
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1464, 1,'2026-10-06 15:20:45',1)
                ON DUPLICATE KEY UPDATE productid = 1464, edited = 1, sysdate = '2026-10-06 15:20:45', userid = 1; -- id=2249
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 600', productDescription = '', productCatId = '103', productBuyPrice = '580.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01464',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '3.45' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1464';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:50:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:20:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 15:20:47', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3276
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:50:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:20:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 15:20:49', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3277
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:51:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:21:07", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-06 15:21:07', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3278
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:55:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:25:56", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 15:25:56', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3279

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac4d620be06a
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 15:25:56', '06ac4d620be06a', '1', '0.00', '0', '15', '1', '15515.00', '15500', '15500', '0', '1', '2026-10-06 15:25:56', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '31' ,'0','','','','','-1','0','0','0','0','0','15500','0','','0','0','15500','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=102
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','102', '0', '2026-10-06 15:25:56', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '15500', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 15:25:56','0','0','',''); -- id=184
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 56;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('420','01371', '102', '91', '1371', '3', '500', '1500', '0', '', '0', '2026-10-06 15:25:56', '1371', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','56-3,','1','1','0','0','500','1500','0','','0','0.00','0','0','0','0'); -- id=406
UPDATE sellbilldetail SET  lastbuyprice = 420.00 , meanbuyprice = 420.00, lastbuyprice_withDiscount = 420.00, meanbuyprice_withDiscount = 420.00
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 420
                where sellbilldetailid = 406;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1371, '2026-10-06', 1498.5497905253, 1260, 1260
                    , 1260, 1260, 1260, 1260
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1260, 1260, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1498.5497905253, sellCostBuyPrice =sellCostBuyPrice+1260
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1260, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1260
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1260, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1260
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1260
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1260
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1260
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1498.5497905253, 1260, 1260
                    , 1260, 1260, 1260, 1260
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1260, 1260, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1498.5497905253, sellCostBuyPrice =sellCostBuyPrice+1260
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1260, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1260
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1260, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1260
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1260
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1260
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1260
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '75', userid = '2', storedetaildate = '2026-10-06 15:25:56' WHERE storedetailid = '1371';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1371', '1', '3', '1', '102', 'اضافة فاتورة مبيعات', 'sellbillController.php', '78', '75', '2', '2026-10-06 15:25:56','0','0'); -- id=2281
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 57;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('420','01372', '102', '91', '1372', '3', '480', '1440', '0', '', '0', '2026-10-06 15:25:56', '1372', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','57-3,','1','1','0','0','480','1440','0','','0','0.00','0','0','0','0'); -- id=407
UPDATE sellbilldetail SET  lastbuyprice = 420.00 , meanbuyprice = 420.00, lastbuyprice_withDiscount = 420.00, meanbuyprice_withDiscount = 420.00
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 420
                where sellbilldetailid = 407;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1372, '2026-10-06', 1438.6077989043, 1260, 1260
                    , 1260, 1260, 1260, 1260
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1260, 1260, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1438.6077989043, sellCostBuyPrice =sellCostBuyPrice+1260
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1260, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1260
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1260, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1260
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1260
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1260
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1260
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1438.6077989043, 1260, 1260
                    , 1260, 1260, 1260, 1260
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1260, 1260, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1438.6077989043, sellCostBuyPrice =sellCostBuyPrice+1260
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1260, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1260
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1260, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1260
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1260
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1260
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1260
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '57', userid = '2', storedetaildate = '2026-10-06 15:25:56' WHERE storedetailid = '1372';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1372', '1', '3', '1', '102', 'اضافة فاتورة مبيعات', 'sellbillController.php', '60', '57', '2', '2026-10-06 15:25:56','0','0'); -- id=2282
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+4 where id = 158;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('499.99','01408', '102', '99', '1408', '4', '500', '2000', '0', '', '0', '2026-10-06 15:25:56', '1408', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','158-4,','1','1','0','0','500','2000','0','','0','0.00','0','0','0','0'); -- id=408
UPDATE sellbilldetail SET  lastbuyprice = 500.00 , meanbuyprice = 500.00, lastbuyprice_withDiscount = 499.99, meanbuyprice_withDiscount = 499.99
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 499.99
                where sellbilldetailid = 408;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1408, '2026-10-06', 1998.0663873671, 2000, 2000
                    , 2000, 1999.96, 1999.96, 1999.96
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1998.0663873671, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1999.96, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1999.96
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1999.96
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+4
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1998.0663873671, 2000, 2000
                    , 2000, 1999.96, 1999.96, 1999.96
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1998.0663873671, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1999.96, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1999.96
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1999.96
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '116', userid = '2', storedetaildate = '2026-10-06 15:25:57' WHERE storedetailid = '1421';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1408', '1', '4', '1', '102', 'اضافة فاتورة مبيعات', 'sellbillController.php', '120', '116', '2', '2026-10-06 15:25:57','0','0'); -- id=2283
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 211;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('420','01430', '102', '100', '1430', '6', '450', '2700', '0', '', '0', '2026-10-06 15:25:57', '1430', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','211-6,','1','1','0','0','450','2700','0','','0','0.00','0','0','0','0'); -- id=409
UPDATE sellbilldetail SET  lastbuyprice = 420.00 , meanbuyprice = 420.00, lastbuyprice_withDiscount = 420.00, meanbuyprice_withDiscount = 420.00
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 420
                where sellbilldetailid = 409;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1430, '2026-10-06', 2697.3896229455, 2520, 2520
                    , 2520, 2520, 2520, 2520
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 2520, 2520, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2697.3896229455, sellCostBuyPrice =sellCostBuyPrice+2520
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2520, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2520
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2520, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2520
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2520
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2520
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2520
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2697.3896229455, 2520, 2520
                    , 2520, 2520, 2520, 2520
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2520, 2520, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2697.3896229455, sellCostBuyPrice =sellCostBuyPrice+2520
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2520, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2520
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2520, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2520
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2520
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2520
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2520
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '36', userid = '2', storedetaildate = '2026-10-06 15:25:57' WHERE storedetailid = '1443';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1430', '1', '6', '1', '102', 'اضافة فاتورة مبيعات', 'sellbillController.php', '42', '36', '2', '2026-10-06 15:25:57','0','0'); -- id=2284
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('435','08842', '102', '8', '715', '5', '455', '2275', '0', '', '0', '2026-10-06 15:25:57', '715', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','455','2275','0','','0','0.00','0','0','0','0'); -- id=410
UPDATE sellbilldetail SET  lastbuyprice = 435.00 , meanbuyprice = 435.00, lastbuyprice_withDiscount = 435.00, meanbuyprice_withDiscount = 435.00
        , lastbuyprice_withTax = 435, meanbuyprice_withTax = 435, lastbuyprice_withDiscountAndTax = 435
                where sellbilldetailid = 410;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (715, '2026-10-06', 2272.80051563, 2175, 2175
                    , 2175, 2175, 2175, 2175
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2175, 2175, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2272.80051563, sellCostBuyPrice =sellCostBuyPrice+2175
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2175, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2175
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2175, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2175
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2175
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2175
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2175
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2272.80051563, 2175, 2175
                    , 2175, 2175, 2175, 2175
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2175, 2175, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2272.80051563, sellCostBuyPrice =sellCostBuyPrice+2175
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2175, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2175
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2175, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2175
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2175
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2175
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2175
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '1', userid = '2', storedetaildate = '2026-10-06 15:25:57' WHERE storedetailid = '715';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('715', '1', '5', '1', '102', 'اضافة فاتورة مبيعات', 'sellbillController.php', '6', '1', '2', '2026-10-06 15:25:57','0','0'); -- id=2285
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 69;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('530','01354', '102', '26', '1354', '5', '550', '2750', '0', '', '0', '2026-10-06 15:25:57', '1354', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','69-5,','1','1','0','0','550','2750','0','','0','0.00','0','0','0','0'); -- id=411
UPDATE sellbilldetail SET  lastbuyprice = 530.00 , meanbuyprice = 530.00, lastbuyprice_withDiscount = 530.00, meanbuyprice_withDiscount = 530.00
        , lastbuyprice_withTax = 530, meanbuyprice_withTax = 530, lastbuyprice_withDiscountAndTax = 530
                where sellbilldetailid = 411;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1354, '2026-10-06', 2747.3412826297, 2650, 2650
                    , 2650, 2650, 2650, 2650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2650, 2650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2747.3412826297, sellCostBuyPrice =sellCostBuyPrice+2650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2747.3412826297, 2650, 2650
                    , 2650, 2650, 2650, 2650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2650, 2650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2747.3412826297, sellCostBuyPrice =sellCostBuyPrice+2650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '45', userid = '2', storedetaildate = '2026-10-06 15:25:57' WHERE storedetailid = '1354';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1354', '1', '5', '1', '102', 'اضافة فاتورة مبيعات', 'sellbillController.php', '50', '45', '2', '2026-10-06 15:25:57','0','0'); -- id=2286
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 33;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('550','01328', '102', '37', '1328', '5', '570', '2850', '0', '', '0', '2026-10-06 15:25:57', '1328', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','33-5,','1','1','0','0','570','2850','0','','0','0.00','0','0','0','0'); -- id=412
UPDATE sellbilldetail SET  lastbuyprice = 550.00 , meanbuyprice = 550.00, lastbuyprice_withDiscount = 550.00, meanbuyprice_withDiscount = 550.00
        , lastbuyprice_withTax = 550, meanbuyprice_withTax = 550, lastbuyprice_withDiscountAndTax = 550
                where sellbilldetailid = 412;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1328, '2026-10-06', 2847.2446019981, 2750, 2750
                    , 2750, 2750, 2750, 2750
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2750, 2750, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2847.2446019981, sellCostBuyPrice =sellCostBuyPrice+2750
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2750, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2750
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2750, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2750
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2750
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2750
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2750
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2847.2446019981, 2750, 2750
                    , 2750, 2750, 2750, 2750
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2750, 2750, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2847.2446019981, sellCostBuyPrice =sellCostBuyPrice+2750
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2750, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2750
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2750, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2750
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2750
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2750
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2750
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '20', userid = '2', storedetaildate = '2026-10-06 15:25:57' WHERE storedetailid = '1328';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1328', '1', '5', '1', '102', 'اضافة فاتورة مبيعات', 'sellbillController.php', '25', '20', '2', '2026-10-06 15:25:57','0','0'); -- id=2287
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '366590',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('351090','15500', '0', '2', 'اضافة فاتورة مبيعات', '102', '366590', '2026-10-06 15:25:57', '2',  'sellbillController.php','1','','0'); -- id=124
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '15515', '15515', '2026-10-06', '2', '0', '0', '2026-10-06 15:25:57','اضافة فاتورة مبيعات رقم 102','1','0',null,'0','102','sellbillController.php?do=showDetail&sellbillid=102'); -- id=1162
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1162', '419', '15500', '','0'); -- id=1167
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '366590', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1162', '398', '15', '','0'); -- id=1168
UPDATE accountstree SET name = 'خصم مسموح به', customName = 'خصم مسموح به', customNameEn = '', nameEn = '', parent = '158', accountNature = '0', theValue = '136058', theOrder = '0', layingOrder = '51', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-08-08 17:58:26' WHERE id = '398';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1162', '143', '15515', '','0'); -- id=1162
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1005630', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '14614.96', '14614.96', '2026-10-06', '2', '0', '0', '2026-10-06 15:25:57','اضافة فاتورة مبيعات رقم 102 - صرف البضاعة من المخزن','1','0',null,'0','102','sellbillController.php?do=showDetail&sellbillid=102'); -- id=1163
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1163', '402', '14614.96', '','0'); -- id=1169
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '976297.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1163', '382', '14614.96', '','0'); -- id=1163
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15262768.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1162,0,1163' where sellbillid=102;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 15500, 14615, 14615
                    , 14615, 14614.96, 14614.96, 14614.96
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,14615, 14615, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+15500, sellCostBuyPrice =sellCostBuyPrice+14615
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+14615, sellCostMeanBuyPrice = sellCostMeanBuyPrice+14615
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+14614.96, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+14614.96
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+14614.96
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+14615
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+14615
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 15500, 14615, 14615
                    , 14615, 14614.96, 14614.96, 14614.96
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,14615, 14615, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+15500, sellCostBuyPrice =sellCostBuyPrice+14615
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+14615, sellCostMeanBuyPrice = sellCostMeanBuyPrice+14615
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+14614.96, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+14614.96
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+14614.96
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+14615
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+14615
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 15500, 14615, 14615
                    , 14615, 14614.96, 14614.96, 14614.96, 14615, 14615)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+15500, netSellCostBuyPrice = netSellCostBuyPrice+14615
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+14615
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+14615
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+14614.96
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+14614.96
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+14614.96
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+14615
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+14615;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac4d620be06a and sellbillId = 102 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:55:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:25:57", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 15:25:57', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3280
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:58:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:28:32", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 15:28:32', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3281

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac4e390e7b63
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 15:28:32', '06ac4e390e7b63', '1', '0.00', '0', '0', '1', '3000.00', '3000', '3000', '0', '1', '2026-10-06 15:28:32', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '5' ,'0','','','','','-1','0','0','0','0','0','3000','0','','0','0','3000','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=103
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','103', '0', '2026-10-06 15:28:32', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '3000', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 15:28:32','0','0','',''); -- id=185
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 35;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('580','01330', '103', '37', '1330', '5', '600', '3000', '0', '', '0', '2026-10-06 15:28:32', '1330', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','35-5,','1','1','0','0','600','3000','0','','0','0.00','0','0','0','0'); -- id=413
UPDATE sellbilldetail SET  lastbuyprice = 580.00 , meanbuyprice = 580.00, lastbuyprice_withDiscount = 580.00, meanbuyprice_withDiscount = 580.00
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 580
                where sellbilldetailid = 413;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1330, '2026-10-06', 3000, 2900, 2900
                    , 2900, 2900, 2900, 2900
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2900, 2900, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3000, sellCostBuyPrice =sellCostBuyPrice+2900
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2900, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2900
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2900, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2900
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2900
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2900
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2900
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 3000, 2900, 2900
                    , 2900, 2900, 2900, 2900
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2900, 2900, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3000, sellCostBuyPrice =sellCostBuyPrice+2900
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2900, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2900
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2900, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2900
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2900
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2900
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2900
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '50', userid = '2', storedetaildate = '2026-10-06 15:28:32' WHERE storedetailid = '1330';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1330', '1', '5', '1', '103', 'اضافة فاتورة مبيعات', 'sellbillController.php', '55', '50', '2', '2026-10-06 15:28:32','0','0'); -- id=2288
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '369590',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('366590','3000', '0', '2', 'اضافة فاتورة مبيعات', '103', '369590', '2026-10-06 15:28:32', '2',  'sellbillController.php','1','','0'); -- id=125
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3000', '3000', '2026-10-06', '2', '0', '0', '2026-10-06 15:28:32','اضافة فاتورة مبيعات رقم 103','1','0',null,'0','103','sellbillController.php?do=showDetail&sellbillid=103'); -- id=1164
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1164', '419', '3000', '','0'); -- id=1170
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '369590', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1164', '143', '3000', '','0'); -- id=1164
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1008630', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2900', '2900', '2026-10-06', '2', '0', '0', '2026-10-06 15:28:32','اضافة فاتورة مبيعات رقم 103 - صرف البضاعة من المخزن','1','0',null,'0','103','sellbillController.php?do=showDetail&sellbillid=103'); -- id=1165
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1165', '402', '2900', '','0'); -- id=1171
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '979197.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1165', '382', '2900', '','0'); -- id=1165
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15259868.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1164,0,1165' where sellbillid=103;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 3000, 2900, 2900
                    , 2900, 2900, 2900, 2900
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,2900, 2900, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3000, sellCostBuyPrice =sellCostBuyPrice+2900
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2900, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2900
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2900, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2900
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2900
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2900
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2900
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 3000, 2900, 2900
                    , 2900, 2900, 2900, 2900
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,2900, 2900, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3000, sellCostBuyPrice =sellCostBuyPrice+2900
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2900, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2900
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2900, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2900
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2900
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2900
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2900
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 3000, 2900, 2900
                    , 2900, 2900, 2900, 2900, 2900, 2900)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+3000, netSellCostBuyPrice = netSellCostBuyPrice+2900
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+2900
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+2900
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+2900
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+2900
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+2900
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+2900
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+2900;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac4e390e7b63 and sellbillId = 103 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 11:58:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:28:32", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 15:28:32', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3282
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:01:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:31:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 15:31:29', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3283
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:05:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:35:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 15:35:47', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3284
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:19:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:49:46", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-06 15:49:46', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3285
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:19:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:49:56", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 15:49:56', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3286
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:20:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 15:50:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 15:50:13', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3287
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:33:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:03:43", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 16:03:43', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3288
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:33:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:03:54", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-06 16:03:54', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3289
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:33:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:03:56", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 16:03:56', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3290
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:34:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:04:30", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-06 16:04:30', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3291
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:34:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:04:35", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 16:04:35', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3292
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:39:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:09:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:09:57', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3293
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:41:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:11:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:11:05', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3294
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فيست تمبو 500','','103','480','500','500','500','2026-10-06','0','1','0','','0','0','0','0','0','480','480','480','480','480','0','4.17','0','0','.','0','0','0','480','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','480','480','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','480','0','0','0','0','0','0','','','0','0','0','0'); -- id=1465
UPDATE product SET productName = 'فيست تمبو 500', productDescription = '', productCatId = '103', productBuyPrice = '480', productSellAllPrice = '500', productSellUnitPrice = '500', productSellHalfPrice = '500', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01465',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1465';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1465', '1.00', '2026-10-06', '1', '0','0146501','500','500','500','480','','0','0','0','0','0','0','0','0','0','0'); -- id=1465
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1465', '1', '0', '1', '2026-10-06'); -- id=1490
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1465', '1', '0', '0', '1465', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2289
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1465, 1,'2026-10-06 16:11:05',1)
                ON DUPLICATE KEY UPDATE productid = 1465, edited = 1, sysdate = '2026-10-06 16:11:05', userid = 1; -- id=2250
UPDATE product SET productName = 'فيست تمبو 500', productDescription = '', productCatId = '103', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01465',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1465';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:41:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:11:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:11:07', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3295
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:41:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:11:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:11:12', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3296
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:41:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:11:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:11:53', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3297
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:50:54";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:50:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:20:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 16:20:57', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3298
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:50:57";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 16:20:57', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3299
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:51:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:21:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:21:10', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3300
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:52:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:22:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:22:00', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3301
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:53:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:23:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:23:09', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3302
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('تصنيع احمد العربي','2026-10-06','','93', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=104
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (104, 1,'2026-10-06 16:23:09',1)
                ON DUPLICATE KEY UPDATE catid = 104, edited = 1, sysdate = '2026-10-06 16:23:09', userid = 1; -- id=106
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '104', '1', '2026-10-06', '1', '0'); -- id=18
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:53:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:23:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:23:09', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3303
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:53:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:23:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:23:11', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3304
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:53:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:23:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:23:16', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3305
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:54:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:24:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:24:28', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3306
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('هودي ساده تصنيع 370','','104','300','370','370','370','2026-10-06','0','1','0','','0','0','0','0','0','300','300','300','300','300','0','23.33','0','0','.','0','0','0','300','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','300','300','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','300','0','0','0','0','0','0','','','0','0','0','0'); -- id=1466
UPDATE product SET productName = 'هودي ساده تصنيع 370', productDescription = '', productCatId = '104', productBuyPrice = '300', productSellAllPrice = '370', productSellUnitPrice = '370', productSellHalfPrice = '370', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01466',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '300',lastbuyprice_withDiscount = '300',meanbuyprice = '300',meanbuyprice_withDiscount = '300' , productbuypricereal = '300' , buypricereal_precentage = '0' , buytotal_precentage = '23.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='300',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='300',meanbuyprice_withTax='300',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='300',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1466';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1466', '1.00', '2026-10-06', '1', '0','0146601','370','370','370','300','','0','0','0','0','0','0','0','0','0','0'); -- id=1466
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1466', '1', '0', '1', '2026-10-06'); -- id=1491
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1466', '1', '0', '0', '1466', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2290
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1466, 1,'2026-10-06 16:24:28',1)
                ON DUPLICATE KEY UPDATE productid = 1466, edited = 1, sysdate = '2026-10-06 16:24:28', userid = 1; -- id=2251
UPDATE product SET productName = 'هودي ساده تصنيع 370', productDescription = '', productCatId = '104', productBuyPrice = '300.00', productSellAllPrice = '370.00', productSellUnitPrice = '370.00', productSellHalfPrice = '370.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01466',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '300',lastbuyprice_withDiscount = '300',meanbuyprice = '300',meanbuyprice_withDiscount = '300' , productbuypricereal = '300' , buypricereal_precentage = '0' , buytotal_precentage = '23.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='300',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='300',meanbuyprice_withTax='300',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='300',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1466';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('بيزك تصنيع 340','','104','276','340','340','340','2026-10-06','0','1','0','','0','0','0','0','0','276','276','276','276','276','0','23.19','0','0','.','0','0','0','276','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','276','276','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','276','0','0','0','0','0','0','','','0','0','0','0'); -- id=1467
UPDATE product SET productName = 'بيزك تصنيع 340', productDescription = '', productCatId = '104', productBuyPrice = '276', productSellAllPrice = '340', productSellUnitPrice = '340', productSellHalfPrice = '340', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01467',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '276',lastbuyprice_withDiscount = '276',meanbuyprice = '276',meanbuyprice_withDiscount = '276' , productbuypricereal = '276' , buypricereal_precentage = '0' , buytotal_precentage = '23.19' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='276',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='276',meanbuyprice_withTax='276',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='276',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1467';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1467', '1.00', '2026-10-06', '1', '0','0146701','340','340','340','276','','0','0','0','0','0','0','0','0','0','0'); -- id=1467
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1467', '1', '0', '1', '2026-10-06'); -- id=1492
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1467', '1', '0', '0', '1467', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2291
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1467, 1,'2026-10-06 16:24:28',1)
                ON DUPLICATE KEY UPDATE productid = 1467, edited = 1, sysdate = '2026-10-06 16:24:28', userid = 1; -- id=2252
UPDATE product SET productName = 'بيزك تصنيع 340', productDescription = '', productCatId = '104', productBuyPrice = '276.00', productSellAllPrice = '340.00', productSellUnitPrice = '340.00', productSellHalfPrice = '340.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01467',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '276',lastbuyprice_withDiscount = '276',meanbuyprice = '276',meanbuyprice_withDiscount = '276' , productbuypricereal = '276' , buypricereal_precentage = '0' , buytotal_precentage = '23.19' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='276',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='276',meanbuyprice_withTax='276',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='276',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1467';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:54:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:24:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:24:30', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3307
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:54:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:24:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:24:31', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3308
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:54:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:24:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:24:46', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3309
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:55:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:25:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:25:57', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3310
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:56:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:26:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:26:17', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3311
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:56:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:26:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:26:41', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3312
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:56:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:26:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-06 16:26:41', '1', 'supplierShow2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php?do=supplierShow2'); -- id=3313
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:56:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:26:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:26:42', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3314
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:57:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:27:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:27:00', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3315
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('بيج بوص','2026-10-06','','93', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=105
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (105, 1,'2026-10-06 16:27:00',1)
                ON DUPLICATE KEY UPDATE catid = 105, edited = 1, sysdate = '2026-10-06 16:27:00', userid = 1; -- id=107
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '105', '1', '2026-10-06', '1', '0'); -- id=19
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:57:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:27:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:27:01', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3316
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:57:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:27:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:27:02', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3317
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:57:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:27:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:27:12', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3318
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:57:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:27:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:27:16', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3319
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:57:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:27:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:27:55', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3320
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 12:57:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:27:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:27:58', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3321
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:00:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:30:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:30:56', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3322
UPDATE user SET loginip = "" WHERE userid = 4;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:04:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:34:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:34:45', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3323
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل بيج بص 380','','105','380','380','380','380','2026-10-06','0','1','0','','0','0','0','0','0','380','380','380','380','380','0','0','0','0','.','0','0','0','380','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','380','380','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','380','0','0','0','0','0','0','','','0','0','0','0'); -- id=1468
UPDATE product SET productName = 'موديل بيج بص 380', productDescription = '', productCatId = '105', productBuyPrice = '380', productSellAllPrice = '380', productSellUnitPrice = '380', productSellHalfPrice = '380', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01468',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '380',meanbuyprice = '380',meanbuyprice_withDiscount = '380' , productbuypricereal = '380' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1468';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1468', '1.00', '2026-10-06', '1', '0','0146801','380','380','380','380','','0','0','0','0','0','0','0','0','0','0'); -- id=1468
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1468', '1', '0', '1', '2026-10-06'); -- id=1493
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1468', '1', '0', '0', '1468', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2292
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1468, 1,'2026-10-06 16:34:45',1)
                ON DUPLICATE KEY UPDATE productid = 1468, edited = 1, sysdate = '2026-10-06 16:34:45', userid = 1; -- id=2253
UPDATE product SET productName = 'موديل بيج بص 380', productDescription = '', productCatId = '105', productBuyPrice = '380.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01468',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '380',meanbuyprice = '380',meanbuyprice_withDiscount = '380' , productbuypricereal = '380' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1468';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل بيج بص 420','','105','420','420','420','420','2026-10-06','0','1','0','','0','0','0','0','0','420','420','420','420','420','0','0','0','0','.','0','0','0','420','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','420','420','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','420','0','0','0','0','0','0','','','0','0','0','0'); -- id=1469
UPDATE product SET productName = 'موديل بيج بص 420', productDescription = '', productCatId = '105', productBuyPrice = '420', productSellAllPrice = '420', productSellUnitPrice = '420', productSellHalfPrice = '420', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01469',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1469';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1469', '1.00', '2026-10-06', '1', '0','0146901','420','420','420','420','','0','0','0','0','0','0','0','0','0','0'); -- id=1469
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1469', '1', '0', '1', '2026-10-06'); -- id=1494
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1469', '1', '0', '0', '1469', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2293
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1469, 1,'2026-10-06 16:34:45',1)
                ON DUPLICATE KEY UPDATE productid = 1469, edited = 1, sysdate = '2026-10-06 16:34:45', userid = 1; -- id=2254
UPDATE product SET productName = 'موديل بيج بص 420', productDescription = '', productCatId = '105', productBuyPrice = '420.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01469',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1469';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل بيج بص 390','','105','390','390','390','390','2026-10-06','0','1','0','','0','0','0','0','0','390','390','390','390','390','0','0','0','0','.','0','0','0','390','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','390','390','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','390','0','0','0','0','0','0','','','0','0','0','0'); -- id=1470
UPDATE product SET productName = 'موديل بيج بص 390', productDescription = '', productCatId = '105', productBuyPrice = '390', productSellAllPrice = '390', productSellUnitPrice = '390', productSellHalfPrice = '390', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01470',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1470';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1470', '1.00', '2026-10-06', '1', '0','0147001','390','390','390','390','','0','0','0','0','0','0','0','0','0','0'); -- id=1470
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1470', '1', '0', '1', '2026-10-06'); -- id=1495
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1470', '1', '0', '0', '1470', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2294
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1470, 1,'2026-10-06 16:34:45',1)
                ON DUPLICATE KEY UPDATE productid = 1470, edited = 1, sysdate = '2026-10-06 16:34:45', userid = 1; -- id=2255
UPDATE product SET productName = 'موديل بيج بص 390', productDescription = '', productCatId = '105', productBuyPrice = '390.00', productSellAllPrice = '390.00', productSellUnitPrice = '390.00', productSellHalfPrice = '390.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01470',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1470';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل بيج بص 460','','105','460','460','460','460','2026-10-06','0','1','0','','0','0','0','0','0','460','460','460','460','460','0','0','0','0','.','0','0','0','460','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','460','460','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','460','0','0','0','0','0','0','','','0','0','0','0'); -- id=1471
UPDATE product SET productName = 'موديل بيج بص 460', productDescription = '', productCatId = '105', productBuyPrice = '460', productSellAllPrice = '460', productSellUnitPrice = '460', productSellHalfPrice = '460', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01471',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '460',lastbuyprice_withDiscount = '460',meanbuyprice = '460',meanbuyprice_withDiscount = '460' , productbuypricereal = '460' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='460',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='460',meanbuyprice_withTax='460',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='460',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1471';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1471', '1.00', '2026-10-06', '1', '0','0147101','460','460','460','460','','0','0','0','0','0','0','0','0','0','0'); -- id=1471
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1471', '1', '0', '1', '2026-10-06'); -- id=1496
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1471', '1', '0', '0', '1471', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2295
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1471, 1,'2026-10-06 16:34:45',1)
                ON DUPLICATE KEY UPDATE productid = 1471, edited = 1, sysdate = '2026-10-06 16:34:45', userid = 1; -- id=2256
UPDATE product SET productName = 'موديل بيج بص 460', productDescription = '', productCatId = '105', productBuyPrice = '460.00', productSellAllPrice = '460.00', productSellUnitPrice = '460.00', productSellHalfPrice = '460.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01471',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '460',lastbuyprice_withDiscount = '460',meanbuyprice = '460',meanbuyprice_withDiscount = '460' , productbuypricereal = '460' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='460',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='460',meanbuyprice_withTax='460',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='460',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1471';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل بيج بص 320','','105','320','320','320','320','2026-10-06','0','1','0','','0','0','0','0','0','320','320','320','320','320','0','0','0','0','.','0','0','0','320','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','320','320','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','320','0','0','0','0','0','0','','','0','0','0','0'); -- id=1472
UPDATE product SET productName = 'موديل بيج بص 320', productDescription = '', productCatId = '105', productBuyPrice = '320', productSellAllPrice = '320', productSellUnitPrice = '320', productSellHalfPrice = '320', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01472',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1472';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1472', '1.00', '2026-10-06', '1', '0','0147201','320','320','320','320','','0','0','0','0','0','0','0','0','0','0'); -- id=1472
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1472', '1', '0', '1', '2026-10-06'); -- id=1497
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1472', '1', '0', '0', '1472', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2296
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1472, 1,'2026-10-06 16:34:45',1)
                ON DUPLICATE KEY UPDATE productid = 1472, edited = 1, sysdate = '2026-10-06 16:34:45', userid = 1; -- id=2257
UPDATE product SET productName = 'موديل بيج بص 320', productDescription = '', productCatId = '105', productBuyPrice = '320.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01472',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1472';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل بيج بص 440','','105','440','440','440','440','2026-10-06','0','1','0','','0','0','0','0','0','440','440','440','440','440','0','0','0','0','.','0','0','0','440','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','440','440','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','440','0','0','0','0','0','0','','','0','0','0','0'); -- id=1473
UPDATE product SET productName = 'موديل بيج بص 440', productDescription = '', productCatId = '105', productBuyPrice = '440', productSellAllPrice = '440', productSellUnitPrice = '440', productSellHalfPrice = '440', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01473',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '440',lastbuyprice_withDiscount = '440',meanbuyprice = '440',meanbuyprice_withDiscount = '440' , productbuypricereal = '440' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='440',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='440',meanbuyprice_withTax='440',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='440',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1473';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1473', '1.00', '2026-10-06', '1', '0','0147301','440','440','440','440','','0','0','0','0','0','0','0','0','0','0'); -- id=1473
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1473', '1', '0', '1', '2026-10-06'); -- id=1498
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1473', '1', '0', '0', '1473', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2297
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1473, 1,'2026-10-06 16:34:45',1)
                ON DUPLICATE KEY UPDATE productid = 1473, edited = 1, sysdate = '2026-10-06 16:34:45', userid = 1; -- id=2258
UPDATE product SET productName = 'موديل بيج بص 440', productDescription = '', productCatId = '105', productBuyPrice = '440.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01473',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '440',lastbuyprice_withDiscount = '440',meanbuyprice = '440',meanbuyprice_withDiscount = '440' , productbuypricereal = '440' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='440',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='440',meanbuyprice_withTax='440',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='440',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1473';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل بيج بص 430','','105','430','430','430','430','2026-10-06','0','1','0','','0','0','0','0','0','430','430','430','430','430','0','0','0','0','.','0','0','0','430','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','430','430','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','430','0','0','0','0','0','0','','','0','0','0','0'); -- id=1474
UPDATE product SET productName = 'موديل بيج بص 430', productDescription = '', productCatId = '105', productBuyPrice = '430', productSellAllPrice = '430', productSellUnitPrice = '430', productSellHalfPrice = '430', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01474',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1474';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1474', '1.00', '2026-10-06', '1', '0','0147401','430','430','430','430','','0','0','0','0','0','0','0','0','0','0'); -- id=1474
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1474', '1', '0', '1', '2026-10-06'); -- id=1499
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1474', '1', '0', '0', '1474', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2298
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1474, 1,'2026-10-06 16:34:45',1)
                ON DUPLICATE KEY UPDATE productid = 1474, edited = 1, sysdate = '2026-10-06 16:34:45', userid = 1; -- id=2259
UPDATE product SET productName = 'موديل بيج بص 430', productDescription = '', productCatId = '105', productBuyPrice = '430.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01474',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1474';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:04:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:34:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:34:47', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3324
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:04:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:34:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:34:50', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3325
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:09:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:39:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:39:16', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3326
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:09:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:39:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:39:33', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3327
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:09:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:39:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:39:45', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3328
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:09:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:39:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:39:58', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3329
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('بيدو الالماني','2026-10-06','','93', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=106
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (106, 1,'2026-10-06 16:39:58',1)
                ON DUPLICATE KEY UPDATE catid = 106, edited = 1, sysdate = '2026-10-06 16:39:58', userid = 1; -- id=108
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '106', '1', '2026-10-06', '1', '0'); -- id=20
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:09:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:39:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:39:58', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3330
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:10:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:40:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 16:40:00', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3331
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:10:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:40:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:40:07', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3332
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:10:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:40:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:40:28', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3333
UPDATE product SET productName = 'موديل بيج بوص 380', productDescription = '', productCatId = '105', productBuyPrice = '380.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01468',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380.00',lastbuyprice_withDiscount = '380',meanbuyprice = '380.00',meanbuyprice_withDiscount = '380' , productbuypricereal = '380.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1468';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1468, 1,'2026-10-06 16:40:43',1)
                ON DUPLICATE KEY UPDATE productid = 1468, edited = 1, sysdate = '2026-10-06 16:40:43', userid = 1; -- id=2253
UPDATE product SET productName = 'موديل بيج بوص 420', productDescription = '', productCatId = '105', productBuyPrice = '420.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01469',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420.00',lastbuyprice_withDiscount = '420',meanbuyprice = '420.00',meanbuyprice_withDiscount = '420' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1469';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1469, 1,'2026-10-06 16:40:47',1)
                ON DUPLICATE KEY UPDATE productid = 1469, edited = 1, sysdate = '2026-10-06 16:40:47', userid = 1; -- id=2254
UPDATE product SET productName = 'موديل بيج بوص 390', productDescription = '', productCatId = '105', productBuyPrice = '390.00', productSellAllPrice = '390.00', productSellUnitPrice = '390.00', productSellHalfPrice = '390.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01470',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390.00',lastbuyprice_withDiscount = '390',meanbuyprice = '390.00',meanbuyprice_withDiscount = '390' , productbuypricereal = '390.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1470';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1470, 1,'2026-10-06 16:40:51',1)
                ON DUPLICATE KEY UPDATE productid = 1470, edited = 1, sysdate = '2026-10-06 16:40:51', userid = 1; -- id=2255
UPDATE product SET productName = 'موديل بيج بوص 460', productDescription = '', productCatId = '105', productBuyPrice = '460.00', productSellAllPrice = '460.00', productSellUnitPrice = '460.00', productSellHalfPrice = '460.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01471',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '460.00',lastbuyprice_withDiscount = '460',meanbuyprice = '460.00',meanbuyprice_withDiscount = '460' , productbuypricereal = '460.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='460',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='460',meanbuyprice_withTax='460',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='460',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1471';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1471, 1,'2026-10-06 16:40:56',1)
                ON DUPLICATE KEY UPDATE productid = 1471, edited = 1, sysdate = '2026-10-06 16:40:56', userid = 1; -- id=2256
UPDATE product SET productName = 'موديل بيج بوص 320', productDescription = '', productCatId = '105', productBuyPrice = '320.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01472',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320.00',lastbuyprice_withDiscount = '320',meanbuyprice = '320.00',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1472';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1472, 1,'2026-10-06 16:41:00',1)
                ON DUPLICATE KEY UPDATE productid = 1472, edited = 1, sysdate = '2026-10-06 16:41:00', userid = 1; -- id=2257
UPDATE product SET productName = 'موديل بيج بوص 440', productDescription = '', productCatId = '105', productBuyPrice = '440.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01473',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '440.00',lastbuyprice_withDiscount = '440',meanbuyprice = '440.00',meanbuyprice_withDiscount = '440' , productbuypricereal = '440.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='440',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='440',meanbuyprice_withTax='440',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='440',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1473';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1473, 1,'2026-10-06 16:41:03',1)
                ON DUPLICATE KEY UPDATE productid = 1473, edited = 1, sysdate = '2026-10-06 16:41:03', userid = 1; -- id=2258
UPDATE product SET productName = 'موديل بيج بوص 430', productDescription = '', productCatId = '105', productBuyPrice = '430.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01474',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430.00',lastbuyprice_withDiscount = '430',meanbuyprice = '430.00',meanbuyprice_withDiscount = '430' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1474';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1474, 1,'2026-10-06 16:41:07',1)
                ON DUPLICATE KEY UPDATE productid = 1474, edited = 1, sysdate = '2026-10-06 16:41:07', userid = 1; -- id=2259
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:11:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:41:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:41:23', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3334
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:11:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:41:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:41:27', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3335
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:12:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:42:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:42:17', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3336
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:12:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:42:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:42:19', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3337
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:14:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:44:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:44:40', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3338
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:17:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:47:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:47:45', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3339
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:17:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:47:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:47:47', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3340
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:18:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:48:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:48:29', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3341
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:18:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:48:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:48:54', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3342
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('ترينج بيدو الالماني 1280','','106','1200','1280','1280','1280','2026-10-06','0','1','0','','0','0','0','0','0','1200','1200','1200','1200','1200','0','6.67','0','0','.','0','0','0','1200','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','1200','1200','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','1200','0','0','0','0','0','0','','','0','0','0','0'); -- id=1475
UPDATE product SET productName = 'ترينج بيدو الالماني 1280', productDescription = '', productCatId = '106', productBuyPrice = '1200', productSellAllPrice = '1280', productSellUnitPrice = '1280', productSellHalfPrice = '1280', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01475',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1200',lastbuyprice_withDiscount = '1200',meanbuyprice = '1200',meanbuyprice_withDiscount = '1200' , productbuypricereal = '1200' , buypricereal_precentage = '0' , buytotal_precentage = '6.67' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1200',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1200',meanbuyprice_withTax='1200',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1200',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1475';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1475', '1.00', '2026-10-06', '1', '0','0147501','1280','1280','1280','1200','','0','0','0','0','0','0','0','0','0','0'); -- id=1475
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1475', '1', '0', '1', '2026-10-06'); -- id=1500
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1475', '1', '0', '0', '1475', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2299
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1475, 1,'2026-10-06 16:48:54',1)
                ON DUPLICATE KEY UPDATE productid = 1475, edited = 1, sysdate = '2026-10-06 16:48:54', userid = 1; -- id=2267
UPDATE product SET productName = 'ترينج بيدو الالماني 1280', productDescription = '', productCatId = '106', productBuyPrice = '1200.00', productSellAllPrice = '1280.00', productSellUnitPrice = '1280.00', productSellHalfPrice = '1280.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01475',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1200',lastbuyprice_withDiscount = '1200',meanbuyprice = '1200',meanbuyprice_withDiscount = '1200' , productbuypricereal = '1200' , buypricereal_precentage = '0' , buytotal_precentage = '6.67' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1200',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1200',meanbuyprice_withTax='1200',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1200',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1475';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('ترينج بيدو الالماني 1080','','106','1000','1080','1080','1080','2026-10-06','0','1','0','','0','0','0','0','0','1000','1000','1000','1000','1000','0','8','0','0','.','0','0','0','1000','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','1000','1000','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','1000','0','0','0','0','0','0','','','0','0','0','0'); -- id=1476
UPDATE product SET productName = 'ترينج بيدو الالماني 1080', productDescription = '', productCatId = '106', productBuyPrice = '1000', productSellAllPrice = '1080', productSellUnitPrice = '1080', productSellHalfPrice = '1080', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01476',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1000',lastbuyprice_withDiscount = '1000',meanbuyprice = '1000',meanbuyprice_withDiscount = '1000' , productbuypricereal = '1000' , buypricereal_precentage = '0' , buytotal_precentage = '8' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1000',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1000',meanbuyprice_withTax='1000',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1000',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1476';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1476', '1.00', '2026-10-06', '1', '0','0147601','1080','1080','1080','1000','','0','0','0','0','0','0','0','0','0','0'); -- id=1476
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1476', '1', '0', '1', '2026-10-06'); -- id=1501
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1476', '1', '0', '0', '1476', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2300
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1476, 1,'2026-10-06 16:48:54',1)
                ON DUPLICATE KEY UPDATE productid = 1476, edited = 1, sysdate = '2026-10-06 16:48:54', userid = 1; -- id=2268
UPDATE product SET productName = 'ترينج بيدو الالماني 1080', productDescription = '', productCatId = '106', productBuyPrice = '1000.00', productSellAllPrice = '1080.00', productSellUnitPrice = '1080.00', productSellHalfPrice = '1080.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01476',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1000',lastbuyprice_withDiscount = '1000',meanbuyprice = '1000',meanbuyprice_withDiscount = '1000' , productbuypricereal = '1000' , buypricereal_precentage = '0' , buytotal_precentage = '8' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1000',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1000',meanbuyprice_withTax='1000',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1000',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1476';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('راوند بيدو الالماني 540','','106','500','540','540','540','2026-10-06','0','1','0','','0','0','0','0','0','500','500','500','500','500','0','8','0','0','.','0','0','0','500','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','500','500','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','500','0','0','0','0','0','0','','','0','0','0','0'); -- id=1477
UPDATE product SET productName = 'راوند بيدو الالماني 540', productDescription = '', productCatId = '106', productBuyPrice = '500', productSellAllPrice = '540', productSellUnitPrice = '540', productSellHalfPrice = '540', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01477',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500' , buypricereal_precentage = '0' , buytotal_precentage = '8' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1477';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1477', '1.00', '2026-10-06', '1', '0','0147701','540','540','540','500','','0','0','0','0','0','0','0','0','0','0'); -- id=1477
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1477', '1', '0', '1', '2026-10-06'); -- id=1502
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1477', '1', '0', '0', '1477', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2301
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1477, 1,'2026-10-06 16:48:54',1)
                ON DUPLICATE KEY UPDATE productid = 1477, edited = 1, sysdate = '2026-10-06 16:48:54', userid = 1; -- id=2269
UPDATE product SET productName = 'راوند بيدو الالماني 540', productDescription = '', productCatId = '106', productBuyPrice = '500.00', productSellAllPrice = '540.00', productSellUnitPrice = '540.00', productSellHalfPrice = '540.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01477',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500' , buypricereal_precentage = '0' , buytotal_precentage = '8' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1477';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('راوند بيدو الالماني 490','','106','450','490','490','490','2026-10-06','0','1','0','','0','0','0','0','0','450','450','450','450','450','0','8.89','0','0','.','0','0','0','450','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','450','450','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','450','0','0','0','0','0','0','','','0','0','0','0'); -- id=1478
UPDATE product SET productName = 'راوند بيدو الالماني 490', productDescription = '', productCatId = '106', productBuyPrice = '450', productSellAllPrice = '490', productSellUnitPrice = '490', productSellHalfPrice = '490', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01478',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '8.89' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1478';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1478', '1.00', '2026-10-06', '1', '0','0147801','490','490','490','450','','0','0','0','0','0','0','0','0','0','0'); -- id=1478
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1478', '1', '0', '1', '2026-10-06'); -- id=1503
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1478', '1', '0', '0', '1478', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2302
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1478, 1,'2026-10-06 16:48:54',1)
                ON DUPLICATE KEY UPDATE productid = 1478, edited = 1, sysdate = '2026-10-06 16:48:54', userid = 1; -- id=2270
UPDATE product SET productName = 'راوند بيدو الالماني 490', productDescription = '', productCatId = '106', productBuyPrice = '450.00', productSellAllPrice = '490.00', productSellUnitPrice = '490.00', productSellHalfPrice = '490.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01478',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '8.89' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1478';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('راوند بيدو الالماني 620','','106','580','620','620','620','2026-10-06','0','1','0','','0','0','0','0','0','580','580','580','580','580','0','6.9','0','0','.','0','0','0','580','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','580','580','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','580','0','0','0','0','0','0','','','0','0','0','0'); -- id=1479
UPDATE product SET productName = 'راوند بيدو الالماني 620', productDescription = '', productCatId = '106', productBuyPrice = '580', productSellAllPrice = '620', productSellUnitPrice = '620', productSellHalfPrice = '620', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01479',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '6.9' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1479';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1479', '1.00', '2026-10-06', '1', '0','0147901','620','620','620','580','','0','0','0','0','0','0','0','0','0','0'); -- id=1479
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1479', '1', '0', '1', '2026-10-06'); -- id=1504
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1479', '1', '0', '0', '1479', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2303
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1479, 1,'2026-10-06 16:48:54',1)
                ON DUPLICATE KEY UPDATE productid = 1479, edited = 1, sysdate = '2026-10-06 16:48:54', userid = 1; -- id=2271
UPDATE product SET productName = 'راوند بيدو الالماني 620', productDescription = '', productCatId = '106', productBuyPrice = '580.00', productSellAllPrice = '620.00', productSellUnitPrice = '620.00', productSellHalfPrice = '620.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01479',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '6.9' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1479';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كابيشو بيدو الالماني 670','','106','620','670','670','670','2026-10-06','0','1','0','','0','0','0','0','0','620','620','620','620','620','0','8.06','0','0','.','0','0','0','620','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','620','620','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','620','0','0','0','0','0','0','','','0','0','0','0'); -- id=1480
UPDATE product SET productName = 'كابيشو بيدو الالماني 670', productDescription = '', productCatId = '106', productBuyPrice = '620', productSellAllPrice = '670', productSellUnitPrice = '670', productSellHalfPrice = '670', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01480',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '620',lastbuyprice_withDiscount = '620',meanbuyprice = '620',meanbuyprice_withDiscount = '620' , productbuypricereal = '620' , buypricereal_precentage = '0' , buytotal_precentage = '8.06' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='620',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='620',meanbuyprice_withTax='620',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='620',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1480';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1480', '1.00', '2026-10-06', '1', '0','0148001','670','670','670','620','','0','0','0','0','0','0','0','0','0','0'); -- id=1480
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1480', '1', '0', '1', '2026-10-06'); -- id=1505
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1480', '1', '0', '0', '1480', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2304
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1480, 1,'2026-10-06 16:48:54',1)
                ON DUPLICATE KEY UPDATE productid = 1480, edited = 1, sysdate = '2026-10-06 16:48:54', userid = 1; -- id=2272
UPDATE product SET productName = 'كابيشو بيدو الالماني 670', productDescription = '', productCatId = '106', productBuyPrice = '620.00', productSellAllPrice = '670.00', productSellUnitPrice = '670.00', productSellHalfPrice = '670.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01480',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '620',lastbuyprice_withDiscount = '620',meanbuyprice = '620',meanbuyprice_withDiscount = '620' , productbuypricereal = '620' , buypricereal_precentage = '0' , buytotal_precentage = '8.06' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='620',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='620',meanbuyprice_withTax='620',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='620',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1480';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كابيشو بيدو الالماني 630','','106','580','630','630','630','2026-10-06','0','1','0','','0','0','0','0','0','580','580','580','580','580','0','8.62','0','0','.','0','0','0','580','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','580','580','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','580','0','0','0','0','0','0','','','0','0','0','0'); -- id=1481
UPDATE product SET productName = 'كابيشو بيدو الالماني 630', productDescription = '', productCatId = '106', productBuyPrice = '580', productSellAllPrice = '630', productSellUnitPrice = '630', productSellHalfPrice = '630', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01481',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '8.62' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1481';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1481', '1.00', '2026-10-06', '1', '0','0148101','630','630','630','580','','0','0','0','0','0','0','0','0','0','0'); -- id=1481
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1481', '1', '0', '1', '2026-10-06'); -- id=1506
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1481', '1', '0', '0', '1481', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2305
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1481, 1,'2026-10-06 16:48:54',1)
                ON DUPLICATE KEY UPDATE productid = 1481, edited = 1, sysdate = '2026-10-06 16:48:54', userid = 1; -- id=2273
UPDATE product SET productName = 'كابيشو بيدو الالماني 630', productDescription = '', productCatId = '106', productBuyPrice = '580.00', productSellAllPrice = '630.00', productSellUnitPrice = '630.00', productSellHalfPrice = '630.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01481',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '8.62' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1481';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كابيشو بيدو الالماني 650','','106','600','650','650','650','2026-10-06','0','1','0','','0','0','0','0','0','600','600','600','600','600','0','8.33','0','0','.','0','0','0','600','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','600','600','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','600','0','0','0','0','0','0','','','0','0','0','0'); -- id=1482
UPDATE product SET productName = 'كابيشو بيدو الالماني 650', productDescription = '', productCatId = '106', productBuyPrice = '600', productSellAllPrice = '650', productSellUnitPrice = '650', productSellHalfPrice = '650', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01482',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '8.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1482';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1482', '1.00', '2026-10-06', '1', '0','0148201','650','650','650','600','','0','0','0','0','0','0','0','0','0','0'); -- id=1482
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1482', '1', '0', '1', '2026-10-06'); -- id=1507
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1482', '1', '0', '0', '1482', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2306
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1482, 1,'2026-10-06 16:48:54',1)
                ON DUPLICATE KEY UPDATE productid = 1482, edited = 1, sysdate = '2026-10-06 16:48:54', userid = 1; -- id=2274
UPDATE product SET productName = 'كابيشو بيدو الالماني 650', productDescription = '', productCatId = '106', productBuyPrice = '600.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01482',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '8.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1482';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:18:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:48:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:48:55', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3343
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:18:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:48:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:48:57', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3344
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:19:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:49:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 16:49:00', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3345
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('بيدو الالماني', '', '', '', '', '0', '1', '2026-10-06 16:49:11', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=88
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('88', '0', '', '0', 'إضافة مورد جديد', '88', '', '2026-10-06 16:49:11', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=153
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('بيدو الالماني', 'بيدو الالماني', 'بيدو الالماني', 'بيدو الالماني', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 16:49:11'); -- id=569
UPDATE supplier SET suppliername = 'بيدو الالماني', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='569',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '88';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:23:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:53:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:53:04', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3346
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:23:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:53:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:53:07', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3347
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:23:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:53:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 16:53:54', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3348
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac4fc4c3b380', '2026-10-06 16:49:00', '88', '0.00', '172320', '0', '0', '172320.00',  '172320.00', '0', '172320', '1', '2026-10-06 16:53:54', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=35
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01475', '35', '106', '1475', '24', '1200', '28800.00', '0', '', '2026-10-06 16:53:54', '1475','','','0','0','0','0','0',null,'1200','28800','0','0','0','0','0','0','0','0','1'); -- id=170
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1475, 0, 0
                    , 1200, 24, 0, 0, 1, '2026-10-06 16:53:54')
                ON DUPLICATE KEY UPDATE buyprice = 1200,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 16:53:54' ; -- id=236
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1475', '1200', '24', '0', 'buyBillController.php', '170', '', '0', '0'); -- id=138
UPDATE product SET  productBuyPrice = "1200" WHERE productId = 1475 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 170 ;
UPDATE product SET productName = 'ترينج بيدو الالماني 1280', productDescription = '', productCatId = '106', productBuyPrice = '1200.00', productSellAllPrice = '1280.00', productSellUnitPrice = '1280.00', productSellHalfPrice = '1280.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01475',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1200',lastbuyprice_withDiscount = '1200',meanbuyprice = '1200',meanbuyprice_withDiscount = '1200' , productbuypricereal = '1200.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.67' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1200',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1200',meanbuyprice_withTax='1200',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1200',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1475';
UPDATE buybilldetail SET  lastbuyprice = 1200 , meanbuyprice = 1200, lastbuyprice_withDiscount = 1200, meanbuyprice_withDiscount = 1200
        , lastbuyprice_withTax = 1200, meanbuyprice_withTax = 1200, lastbuyprice_withDiscountAndTax = 1200
                where buybilldetailid = 170;
UPDATE productunit SET proUnitBuyPrice  = 1200 * productnumber WHERE productid = 1475;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1500';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1475', '1', '24', '0', '35', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2307
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01475', '35', '106', '1475', '24', '1200', '28800.00', '0', '', '2026-10-06 16:53:54', '1475','','','0','0','0','0','0',null,'1200','28800','0','0','0','0','0','0','0','0','1'); -- id=171
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1475, 0, 0
                    , 1200, 24, 0, 0, 1, '2026-10-06 16:53:54')
                ON DUPLICATE KEY UPDATE buyprice = 1200,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 16:53:54' ; -- id=236
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1475', '1200', '24', '0', 'buyBillController.php', '171', '', '0', '0'); -- id=139
UPDATE product SET  productBuyPrice = "1200" WHERE productId = 1475 ;
UPDATE buybilldetail SET  quantitybefore = 24 WHERE buybilldetailid = 171 ;
UPDATE product SET productName = 'ترينج بيدو الالماني 1280', productDescription = '', productCatId = '106', productBuyPrice = '1200.00', productSellAllPrice = '1280.00', productSellUnitPrice = '1280.00', productSellHalfPrice = '1280.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01475',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1200',lastbuyprice_withDiscount = '1200',meanbuyprice = '1200',meanbuyprice_withDiscount = '1200' , productbuypricereal = '1200.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.67' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1200',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1200',meanbuyprice_withTax='1200',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1200',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1475';
UPDATE buybilldetail SET  lastbuyprice = 1200 , meanbuyprice = 1200, lastbuyprice_withDiscount = 1200, meanbuyprice_withDiscount = 1200
        , lastbuyprice_withTax = 1200, meanbuyprice_withTax = 1200, lastbuyprice_withDiscountAndTax = 1200
                where buybilldetailid = 171;
UPDATE productunit SET proUnitBuyPrice  = 1200 * productnumber WHERE productid = 1475;
UPDATE storedetail SET  productquantity = '48', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1500';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1475', '1', '24', '0', '35', 'اضافة فاتورة مشتريات', 'buyBillController.php', '24', '48', '1', '2026-10-06 16:49:00','0','0'); -- id=2308
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01476', '35', '106', '1476', '24', '1000', '24000.00', '0', '', '2026-10-06 16:53:54', '1476','','','0','0','0','0','0',null,'1000','24000','0','0','0','0','0','0','0','0','1'); -- id=172
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1476, 0, 0
                    , 1000, 24, 0, 0, 1, '2026-10-06 16:53:54')
                ON DUPLICATE KEY UPDATE buyprice = 1000,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 16:53:54' ; -- id=238
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1476', '1000', '24', '0', 'buyBillController.php', '172', '', '0', '0'); -- id=140
UPDATE product SET  productBuyPrice = "1000" WHERE productId = 1476 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 172 ;
UPDATE product SET productName = 'ترينج بيدو الالماني 1080', productDescription = '', productCatId = '106', productBuyPrice = '1000.00', productSellAllPrice = '1080.00', productSellUnitPrice = '1080.00', productSellHalfPrice = '1080.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01476',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1000',lastbuyprice_withDiscount = '1000',meanbuyprice = '1000',meanbuyprice_withDiscount = '1000' , productbuypricereal = '1000.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1000',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1000',meanbuyprice_withTax='1000',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1000',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1476';
UPDATE buybilldetail SET  lastbuyprice = 1000 , meanbuyprice = 1000, lastbuyprice_withDiscount = 1000, meanbuyprice_withDiscount = 1000
        , lastbuyprice_withTax = 1000, meanbuyprice_withTax = 1000, lastbuyprice_withDiscountAndTax = 1000
                where buybilldetailid = 172;
UPDATE productunit SET proUnitBuyPrice  = 1000 * productnumber WHERE productid = 1476;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1501';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1476', '1', '24', '0', '35', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2309
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01477', '35', '106', '1477', '24', '500', '12000.00', '0', '', '2026-10-06 16:53:54', '1477','','','0','0','0','0','0',null,'500','12000','0','0','0','0','0','0','0','0','1'); -- id=173
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1477, 0, 0
                    , 500, 24, 0, 0, 1, '2026-10-06 16:53:54')
                ON DUPLICATE KEY UPDATE buyprice = 500,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 16:53:54' ; -- id=239
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1477', '500', '24', '0', 'buyBillController.php', '173', '', '0', '0'); -- id=141
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1477 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 173 ;
UPDATE product SET productName = 'راوند بيدو الالماني 540', productDescription = '', productCatId = '106', productBuyPrice = '500.00', productSellAllPrice = '540.00', productSellUnitPrice = '540.00', productSellHalfPrice = '540.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01477',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1477';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 500, meanbuyprice_withDiscount = 500
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where buybilldetailid = 173;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1477;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1502';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1477', '1', '24', '0', '35', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2310
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01478', '35', '106', '1478', '24', '450', '10800.00', '0', '', '2026-10-06 16:53:54', '1478','','','0','0','0','0','0',null,'450','10800','0','0','0','0','0','0','0','0','1'); -- id=174
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1478, 0, 0
                    , 450, 24, 0, 0, 1, '2026-10-06 16:53:54')
                ON DUPLICATE KEY UPDATE buyprice = 450,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 16:53:54' ; -- id=240
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1478', '450', '24', '0', 'buyBillController.php', '174', '', '0', '0'); -- id=142
UPDATE product SET  productBuyPrice = "450" WHERE productId = 1478 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 174 ;
UPDATE product SET productName = 'راوند بيدو الالماني 490', productDescription = '', productCatId = '106', productBuyPrice = '450.00', productSellAllPrice = '490.00', productSellUnitPrice = '490.00', productSellHalfPrice = '490.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01478',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.89' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1478';
UPDATE buybilldetail SET  lastbuyprice = 450 , meanbuyprice = 450, lastbuyprice_withDiscount = 450, meanbuyprice_withDiscount = 450
        , lastbuyprice_withTax = 450, meanbuyprice_withTax = 450, lastbuyprice_withDiscountAndTax = 450
                where buybilldetailid = 174;
UPDATE productunit SET proUnitBuyPrice  = 450 * productnumber WHERE productid = 1478;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1503';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1478', '1', '24', '0', '35', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2311
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01478', '35', '106', '1478', '24', '450', '10800.00', '0', '', '2026-10-06 16:53:54', '1478','','','0','0','0','0','0',null,'450','10800','0','0','0','0','0','0','0','0','1'); -- id=175
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1478, 0, 0
                    , 450, 24, 0, 0, 1, '2026-10-06 16:53:54')
                ON DUPLICATE KEY UPDATE buyprice = 450,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 16:53:54' ; -- id=240
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1478', '450', '24', '0', 'buyBillController.php', '175', '', '0', '0'); -- id=143
UPDATE product SET  productBuyPrice = "450" WHERE productId = 1478 ;
UPDATE buybilldetail SET  quantitybefore = 24 WHERE buybilldetailid = 175 ;
UPDATE product SET productName = 'راوند بيدو الالماني 490', productDescription = '', productCatId = '106', productBuyPrice = '450.00', productSellAllPrice = '490.00', productSellUnitPrice = '490.00', productSellHalfPrice = '490.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01478',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.89' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1478';
UPDATE buybilldetail SET  lastbuyprice = 450 , meanbuyprice = 450, lastbuyprice_withDiscount = 450, meanbuyprice_withDiscount = 450
        , lastbuyprice_withTax = 450, meanbuyprice_withTax = 450, lastbuyprice_withDiscountAndTax = 450
                where buybilldetailid = 175;
UPDATE productunit SET proUnitBuyPrice  = 450 * productnumber WHERE productid = 1478;
UPDATE storedetail SET  productquantity = '48', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1503';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1478', '1', '24', '0', '35', 'اضافة فاتورة مشتريات', 'buyBillController.php', '24', '48', '1', '2026-10-06 16:49:00','0','0'); -- id=2312
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01480', '35', '106', '1480', '24', '620', '14880.00', '0', '', '2026-10-06 16:53:54', '1480','','','0','0','0','0','0',null,'620','14880','0','0','0','0','0','0','0','0','1'); -- id=176
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1480, 0, 0
                    , 620, 24, 0, 0, 1, '2026-10-06 16:53:54')
                ON DUPLICATE KEY UPDATE buyprice = 620,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 16:53:54' ; -- id=242
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1480', '620', '24', '0', 'buyBillController.php', '176', '', '0', '0'); -- id=144
UPDATE product SET  productBuyPrice = "620" WHERE productId = 1480 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 176 ;
UPDATE product SET productName = 'كابيشو بيدو الالماني 670', productDescription = '', productCatId = '106', productBuyPrice = '620.00', productSellAllPrice = '670.00', productSellUnitPrice = '670.00', productSellHalfPrice = '670.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01480',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '620',lastbuyprice_withDiscount = '620',meanbuyprice = '620',meanbuyprice_withDiscount = '620' , productbuypricereal = '620.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.06' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='620',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='620',meanbuyprice_withTax='620',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='620',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1480';
UPDATE buybilldetail SET  lastbuyprice = 620 , meanbuyprice = 620, lastbuyprice_withDiscount = 620, meanbuyprice_withDiscount = 620
        , lastbuyprice_withTax = 620, meanbuyprice_withTax = 620, lastbuyprice_withDiscountAndTax = 620
                where buybilldetailid = 176;
UPDATE productunit SET proUnitBuyPrice  = 620 * productnumber WHERE productid = 1480;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1505';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1480', '1', '24', '0', '35', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2313
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01481', '35', '106', '1481', '24', '580', '13920.00', '0', '', '2026-10-06 16:53:54', '1481','','','0','0','0','0','0',null,'580','13920','0','0','0','0','0','0','0','0','1'); -- id=177
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1481, 0, 0
                    , 580, 24, 0, 0, 1, '2026-10-06 16:53:54')
                ON DUPLICATE KEY UPDATE buyprice = 580,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 16:53:54' ; -- id=243
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1481', '580', '24', '0', 'buyBillController.php', '177', '', '0', '0'); -- id=145
UPDATE product SET  productBuyPrice = "580" WHERE productId = 1481 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 177 ;
UPDATE product SET productName = 'كابيشو بيدو الالماني 630', productDescription = '', productCatId = '106', productBuyPrice = '580.00', productSellAllPrice = '630.00', productSellUnitPrice = '630.00', productSellHalfPrice = '630.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01481',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.62' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1481';
UPDATE buybilldetail SET  lastbuyprice = 580 , meanbuyprice = 580, lastbuyprice_withDiscount = 580, meanbuyprice_withDiscount = 580
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 580
                where buybilldetailid = 177;
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1481;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1506';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1481', '1', '24', '0', '35', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2314
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01482', '35', '106', '1482', '24', '600', '14400.00', '0', '', '2026-10-06 16:53:54', '1482','','','0','0','0','0','0',null,'600','14400','0','0','0','0','0','0','0','0','1'); -- id=178
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1482, 0, 0
                    , 600, 24, 0, 0, 1, '2026-10-06 16:53:54')
                ON DUPLICATE KEY UPDATE buyprice = 600,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 16:53:54' ; -- id=244
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1482', '600', '24', '0', 'buyBillController.php', '178', '', '0', '0'); -- id=146
UPDATE product SET  productBuyPrice = "600" WHERE productId = 1482 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 178 ;
UPDATE product SET productName = 'كابيشو بيدو الالماني 650', productDescription = '', productCatId = '106', productBuyPrice = '600.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01482',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.33' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1482';
UPDATE buybilldetail SET  lastbuyprice = 600 , meanbuyprice = 600, lastbuyprice_withDiscount = 600, meanbuyprice_withDiscount = 600
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where buybilldetailid = 178;
UPDATE productunit SET proUnitBuyPrice  = 600 * productnumber WHERE productid = 1482;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1507';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1482', '1', '24', '0', '35', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2315
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01479', '35', '106', '1479', '24', '580', '13920.00', '0', '', '2026-10-06 16:53:54', '1479','','','0','0','0','0','0',null,'580','13920','0','0','0','0','0','0','0','0','1'); -- id=179
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1479, 0, 0
                    , 580, 24, 0, 0, 1, '2026-10-06 16:53:54')
                ON DUPLICATE KEY UPDATE buyprice = 580,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 16:53:54' ; -- id=245
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1479', '580', '24', '0', 'buyBillController.php', '179', '', '0', '0'); -- id=147
UPDATE product SET  productBuyPrice = "580" WHERE productId = 1479 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 179 ;
UPDATE product SET productName = 'راوند بيدو الالماني 620', productDescription = '', productCatId = '106', productBuyPrice = '580.00', productSellAllPrice = '620.00', productSellUnitPrice = '620.00', productSellHalfPrice = '620.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01479',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.90' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1479';
UPDATE buybilldetail SET  lastbuyprice = 580 , meanbuyprice = 580, lastbuyprice_withDiscount = 580, meanbuyprice_withDiscount = 580
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 580
                where buybilldetailid = 179;
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1479;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1504';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1479', '1', '24', '0', '35', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2316
UPDATE supplier SET  suppliercurrentDebt = '172320',suppliercurrentDebtInCurrency= '172320' , userid = '1', supplierdate = '2026-10-06 16:53:54'   WHERE supplierid = '88';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('88', '0.00', '172320', '0', 'اضافة فاتورة مشتريات', '35', '172320', '2026-10-06 16:49:00', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','172320','1','0','172320','172320','0',''); -- id=154
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '172320', '172320', '2026-10-06', '1', '0', '0', '2026-10-06 16:53:54','اضافة فاتورة مشتريات رقم 35','1','0',null,'0','35','buyBillController.php?do=details&id=35'); -- id=1166
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1166', '382', '172320', '','0'); -- id=1172
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15432188.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1166', '569', '172320', '','0'); -- id=1166
UPDATE accountstree SET name = 'بيدو الالماني', customName = 'بيدو الالماني', customNameEn = 'بيدو الالماني', nameEn = 'بيدو الالماني', parent = '81', accountNature = '1', theValue = '172320', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-06 16:49:11' WHERE id = '569';
update buybill set dailyentryid='1166,0' where buybillid=35;
COMMIT;
UPDATE product SET overAllAveragePrice = 1200 WHERE productId = 1475;UPDATE product SET overAllAveragePrice = 1000 WHERE productId = 1476;UPDATE product SET overAllAveragePrice = 500 WHERE productId = 1477;UPDATE product SET overAllAveragePrice = 450 WHERE productId = 1478;UPDATE product SET overAllAveragePrice = 580 WHERE productId = 1479;UPDATE product SET overAllAveragePrice = 620 WHERE productId = 1480;UPDATE product SET overAllAveragePrice = 580 WHERE productId = 1481;UPDATE product SET overAllAveragePrice = 600 WHERE productId = 1482;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:23:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:53:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 16:53:55', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=35'); -- id=3349
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:23:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:53:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:53:58', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=35&type=2'); -- id=3350
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:29:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 16:59:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 16:59:53', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3351
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:31:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:01:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:01:23', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3352
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:33:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:03:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:03:48', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3353
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:38:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:08:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:08:05', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3354
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:38:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:08:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:08:07', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3355
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:39:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:09:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:09:41', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3356
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:40:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:10:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:10:27', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3357
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:40:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:10:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:10:31', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3358
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:41:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:11:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:11:39', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3359
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:42:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:12:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:12:24', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3360
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:42:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:12:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:12:31', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3361
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:43:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:13:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:13:23', '1', 'uinuseproducts', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=uinuseproducts'); -- id=3362
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:43:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:13:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:13:24', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=sucess'); -- id=3363
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:43:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:13:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:13:25', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3364
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:43:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:13:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:13:29', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3365
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:43:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:13:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:13:45', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3366
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:43:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:13:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:13:48', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3367
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:45:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:15:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:15:39', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3368
UPDATE product SET productName = 'جاكت جلد قميص عبد العال ', productDescription = '', productCatId = '91', productBuyPrice = '270.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-01', conditions = '0', userId = '1', limitamount = '0', parcode = '01368',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270.00',lastbuyprice_withDiscount = '270',meanbuyprice = '382.33',meanbuyprice_withDiscount = '382.33' , productbuypricereal = '270.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '11.11' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='382.33',meanbuyprice_withTax='382.33',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1368';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1368, 1,'2026-10-06 17:16:08',1)
                ON DUPLICATE KEY UPDATE productid = 1368, edited = 1, sysdate = '2026-10-06 17:16:08', userid = 1; -- id=2043
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:46:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:16:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:16:24', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3369
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:46:50";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:47:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:17:02", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 17:17:02', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3370
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:47:02";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-06 17:17:02", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 17:17:02', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3371
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:47:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:17:04", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 17:17:04', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3372
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:47:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:17:08", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-06 17:17:08', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3373
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:47:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:17:11", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 17:17:11', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3374
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:47:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:17:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:17:26', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3375
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:47:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:17:27", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 17:17:27', '4', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3376

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac502e7ae9cf
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 17:17:27', '06ac502e7ae9cf', '1', '0.00', '0', '0', '1', '3440.00', '3440', '3440', '0', '2', '2026-10-06 17:17:27', '', '4', '0', 'نقدي', '3', '0', '3', '0', 'نقدي', '8' ,'0','','','','','-1','0','0','0','0','0','3440','0','','0','0','3440','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=104
UPDATE client SET  clientdebt = '0', userid = '4' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','104', '0', '2026-10-06 17:17:27', '4', 'sellbillController.php', 'اضافة فاتورة مبيعات', '3440', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 17:17:27','0','0','',''); -- id=186
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+8 where id = 141;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('390','01363', '104', '89', '1363', '8', '430', '3440', '0', '', '0', '2026-10-06 17:17:27', '1363', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','141-8,','1','1','0','0','430','3440','0','','0','0.00','0','0','0','0'); -- id=414
UPDATE sellbilldetail SET  lastbuyprice = 390.00 , meanbuyprice = 390.00, lastbuyprice_withDiscount = 390.00, meanbuyprice_withDiscount = 390.00
        , lastbuyprice_withTax = 390, meanbuyprice_withTax = 390, lastbuyprice_withDiscountAndTax = 390
                where sellbilldetailid = 414;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1363, '2026-10-06', 3440, 3120, 3120
                    , 3120, 3120, 3120, 3120
                    , 0, 0, 0, 0
                    , 0, 0, 0, 8, 0, 3120, 3120, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3440, sellCostBuyPrice =sellCostBuyPrice+3120
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3120, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3120
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3120, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3120
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3120
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3120
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3120
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+8
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-06', 3440, 3120, 3120
                    , 3120, 3120, 3120, 3120
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3120, 3120, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3440, sellCostBuyPrice =sellCostBuyPrice+3120
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3120, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3120
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3120, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3120
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3120
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3120
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3120
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '4', userid = '4', storedetaildate = '2026-10-06 17:17:27' WHERE storedetailid = '1410';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1363', '2', '8', '1', '104', 'اضافة فاتورة مبيعات', 'sellbillController.php', '12', '4', '4', '2026-10-06 17:17:27','0','0'); -- id=2317
CALL saveInUse(3,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '231850',  userid = '4' WHERE saveid = '3';
UPDATE save SET  inUse = 0 where saveid = 3;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('228410','3440', '0', '3', 'اضافة فاتورة مبيعات', '104', '231850', '2026-10-06 17:17:27', '4',  'sellbillController.php','1','','0'); -- id=126
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3440', '3440', '2026-10-06', '4', '0', '0', '2026-10-06 17:17:27','اضافة فاتورة مبيعات رقم 104','1','0',null,'0','104','sellbillController.php?do=showDetail&sellbillid=104'); -- id=1167
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1167', '501', '3440', '','0'); -- id=1173
UPDATE accountstree SET name = 'خزينه المحل الارضي', customName = 'خزينه المحل الارضي', customNameEn = 'خزينه المحل الارضي', nameEn = 'خزينه المحل الارضي', parent = '40', accountNature = '0', theValue = '231850', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-30 21:35:47' WHERE id = '501';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1167', '143', '3440', '','0'); -- id=1167
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1012070', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3120', '3120', '2026-10-06', '4', '0', '0', '2026-10-06 17:17:27','اضافة فاتورة مبيعات رقم 104 - صرف البضاعة من المخزن','1','0',null,'0','104','sellbillController.php?do=showDetail&sellbillid=104'); -- id=1168
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1168', '402', '3120', '','0'); -- id=1174
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '982317.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1168', '492', '3120', '','0'); -- id=1168
UPDATE accountstree SET name = 'مخزن المحل', customName = 'مخزن المحل', customNameEn = 'مخزن المحل', nameEn = 'مخزن المحل', parent = '49', accountNature = '0', theValue = '848680', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 19:38:59' WHERE id = '492';
update sellbill set dailyentryid='1167,0,1168' where sellbillid=104;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 3440, 3120, 3120
                    , 3120, 3120, 3120, 3120
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3120, 3120, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3440, sellCostBuyPrice =sellCostBuyPrice+3120
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3120, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3120
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3120, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3120
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3120
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3120
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3120
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 3440, 3120, 3120
                    , 3120, 3120, 3120, 3120
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3120, 3120, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3440, sellCostBuyPrice =sellCostBuyPrice+3120
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3120, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3120
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3120, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3120
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3120
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3120
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3120
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 3440, 3120, 3120
                    , 3120, 3120, 3120, 3120, 3120, 3120)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+3440, netSellCostBuyPrice = netSellCostBuyPrice+3120
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+3120
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+3120
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+3120
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+3120
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+3120
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+3120
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+3120;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac502e7ae9cf and sellbillId = 104 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:47:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:17:27", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 17:17:27', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3377
UPDATE product SET productName = 'جاكت بوكس هارلي عبد العال', productDescription = '', productCatId = '91', productBuyPrice = '430.00', productSellAllPrice = '490.00', productSellUnitPrice = '490.00', productSellHalfPrice = '490.00', productDate = '2026-10-01', conditions = '0', userId = '1', limitamount = '0', parcode = '01369',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430.00',lastbuyprice_withDiscount = '430',meanbuyprice = '430.00',meanbuyprice_withDiscount = '430' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '9.30' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1369';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1369, 1,'2026-10-06 17:17:39',1)
                ON DUPLICATE KEY UPDATE productid = 1369, edited = 1, sysdate = '2026-10-06 17:17:39', userid = 1; -- id=2044
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:48:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:18:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:18:02', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3378
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:48:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:18:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:18:04', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3379
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:49:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:19:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:19:02', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3380
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:49:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:19:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:19:04', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3381
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:49:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:19:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:19:22', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3382
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:49:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:19:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:19:28', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3383
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:49:52";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:50:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:20:02", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 17:20:02', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3384
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:50:02";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-06 17:20:02", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 17:20:02', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3385
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 13:50:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:20:04", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 17:20:04', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3386
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:01:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:31:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:31:01', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=35&type=2'); -- id=3387
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:01:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:31:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 17:31:03', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=35'); -- id=3388
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:01:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:31:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 17:31:27', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3389
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:01:27";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 17:31:27', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3390
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:01:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:31:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:31:34', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3391
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:08:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:38:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 17:38:26', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3392
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:09:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:39:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 17:39:29', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3393
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('تيتو بولاق','2026-10-06','','93', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=107
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (107, 1,'2026-10-06 17:39:29',1)
                ON DUPLICATE KEY UPDATE catid = 107, edited = 1, sysdate = '2026-10-06 17:39:29', userid = 1; -- id=109
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '107', '1', '2026-10-06', '1', '0'); -- id=21
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:09:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:39:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 17:39:29', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3394
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:09:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:39:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 17:39:31', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3395
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:09:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:39:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:39:35', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3396
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:12:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:42:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:42:56', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3397
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل الديور','','107','500','540','540','540','2026-10-06','0','1','0','','0','0','0','0','0','500','500','500','500','500','0','8','0','0','.','0','0','0','500','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','500','500','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','500','0','0','0','0','0','0','','','0','0','0','0'); -- id=1483
UPDATE product SET productName = 'موديل الديور', productDescription = '', productCatId = '107', productBuyPrice = '500', productSellAllPrice = '540', productSellUnitPrice = '540', productSellHalfPrice = '540', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01483',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500' , buypricereal_precentage = '0' , buytotal_precentage = '8' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1483';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1483', '1.00', '2026-10-06', '1', '0','0148301','540','540','540','500','','0','0','0','0','0','0','0','0','0','0'); -- id=1483
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1483', '1', '0', '1', '2026-10-06'); -- id=1508
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1483', '1', '0', '0', '1483', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2318
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1483, 1,'2026-10-06 17:42:56',1)
                ON DUPLICATE KEY UPDATE productid = 1483, edited = 1, sysdate = '2026-10-06 17:42:56', userid = 1; -- id=2277
UPDATE product SET productName = 'موديل الديور', productDescription = '', productCatId = '107', productBuyPrice = '500.00', productSellAllPrice = '540.00', productSellUnitPrice = '540.00', productSellHalfPrice = '540.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01483',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500' , buypricereal_precentage = '0' , buytotal_precentage = '8' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1483';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل البوابه','','107','550','590','590','590','2026-10-06','0','1','0','','0','0','0','0','0','550','550','550','550','550','0','7.27','0','0','.','0','0','0','550','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','550','550','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','550','0','0','0','0','0','0','','','0','0','0','0'); -- id=1484
UPDATE product SET productName = 'موديل البوابه', productDescription = '', productCatId = '107', productBuyPrice = '550', productSellAllPrice = '590', productSellUnitPrice = '590', productSellHalfPrice = '590', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01484',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550' , buypricereal_precentage = '0' , buytotal_precentage = '7.27' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1484';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1484', '1.00', '2026-10-06', '1', '0','0148401','590','590','590','550','','0','0','0','0','0','0','0','0','0','0'); -- id=1484
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1484', '1', '0', '1', '2026-10-06'); -- id=1509
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1484', '1', '0', '0', '1484', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2319
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1484, 1,'2026-10-06 17:42:56',1)
                ON DUPLICATE KEY UPDATE productid = 1484, edited = 1, sysdate = '2026-10-06 17:42:56', userid = 1; -- id=2278
UPDATE product SET productName = 'موديل البوابه', productDescription = '', productCatId = '107', productBuyPrice = '550.00', productSellAllPrice = '590.00', productSellUnitPrice = '590.00', productSellHalfPrice = '590.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01484',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550' , buypricereal_precentage = '0' , buytotal_precentage = '7.27' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1484';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل جينس','','107','570','610','610','610','2026-10-06','0','1','0','','0','0','0','0','0','570','570','570','570','570','0','7.02','0','0','.','0','0','0','570','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','570','570','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','570','0','0','0','0','0','0','','','0','0','0','0'); -- id=1485
UPDATE product SET productName = 'موديل جينس', productDescription = '', productCatId = '107', productBuyPrice = '570', productSellAllPrice = '610', productSellUnitPrice = '610', productSellHalfPrice = '610', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01485',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '570',lastbuyprice_withDiscount = '570',meanbuyprice = '570',meanbuyprice_withDiscount = '570' , productbuypricereal = '570' , buypricereal_precentage = '0' , buytotal_precentage = '7.02' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='570',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='570',meanbuyprice_withTax='570',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='570',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1485';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1485', '1.00', '2026-10-06', '1', '0','0148501','610','610','610','570','','0','0','0','0','0','0','0','0','0','0'); -- id=1485
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1485', '1', '0', '1', '2026-10-06'); -- id=1510
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1485', '1', '0', '0', '1485', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2320
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1485, 1,'2026-10-06 17:42:56',1)
                ON DUPLICATE KEY UPDATE productid = 1485, edited = 1, sysdate = '2026-10-06 17:42:56', userid = 1; -- id=2279
UPDATE product SET productName = 'موديل جينس', productDescription = '', productCatId = '107', productBuyPrice = '570.00', productSellAllPrice = '610.00', productSellUnitPrice = '610.00', productSellHalfPrice = '610.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01485',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '570',lastbuyprice_withDiscount = '570',meanbuyprice = '570',meanbuyprice_withDiscount = '570' , productbuypricereal = '570' , buypricereal_precentage = '0' , buytotal_precentage = '7.02' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='570',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='570',meanbuyprice_withTax='570',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='570',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1485';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل طابعه فوم','','107','500','540','540','540','2026-10-06','0','1','0','','0','0','0','0','0','500','500','500','500','500','0','8','0','0','.','0','0','0','500','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','500','500','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','500','0','0','0','0','0','0','','','0','0','0','0'); -- id=1486
UPDATE product SET productName = 'موديل طابعه فوم', productDescription = '', productCatId = '107', productBuyPrice = '500', productSellAllPrice = '540', productSellUnitPrice = '540', productSellHalfPrice = '540', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01486',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500' , buypricereal_precentage = '0' , buytotal_precentage = '8' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1486';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1486', '1.00', '2026-10-06', '1', '0','0148601','540','540','540','500','','0','0','0','0','0','0','0','0','0','0'); -- id=1486
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1486', '1', '0', '1', '2026-10-06'); -- id=1511
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1486', '1', '0', '0', '1486', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2321
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1486, 1,'2026-10-06 17:42:56',1)
                ON DUPLICATE KEY UPDATE productid = 1486, edited = 1, sysdate = '2026-10-06 17:42:56', userid = 1; -- id=2280
UPDATE product SET productName = 'موديل طابعه فوم', productDescription = '', productCatId = '107', productBuyPrice = '500.00', productSellAllPrice = '540.00', productSellUnitPrice = '540.00', productSellHalfPrice = '540.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01486',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500' , buypricereal_precentage = '0' , buytotal_precentage = '8' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1486';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل رواند','','107','480','520','520','520','2026-10-06','0','1','0','','0','0','0','0','0','480','480','480','480','480','0','8.33','0','0','.','0','0','0','480','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','480','480','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','480','0','0','0','0','0','0','','','0','0','0','0'); -- id=1487
UPDATE product SET productName = 'موديل رواند', productDescription = '', productCatId = '107', productBuyPrice = '480', productSellAllPrice = '520', productSellUnitPrice = '520', productSellHalfPrice = '520', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01487',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480' , buypricereal_precentage = '0' , buytotal_precentage = '8.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1487';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1487', '1.00', '2026-10-06', '1', '0','0148701','520','520','520','480','','0','0','0','0','0','0','0','0','0','0'); -- id=1487
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1487', '1', '0', '1', '2026-10-06'); -- id=1512
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1487', '1', '0', '0', '1487', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2322
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1487, 1,'2026-10-06 17:42:56',1)
                ON DUPLICATE KEY UPDATE productid = 1487, edited = 1, sysdate = '2026-10-06 17:42:56', userid = 1; -- id=2281
UPDATE product SET productName = 'موديل رواند', productDescription = '', productCatId = '107', productBuyPrice = '480.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01487',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480' , buypricereal_precentage = '0' , buytotal_precentage = '8.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1487';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل قطفيه صدر','','107','550','590','590','590','2026-10-06','0','1','0','','0','0','0','0','0','550','550','550','550','550','0','7.27','0','0','.','0','0','0','550','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','550','550','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','550','0','0','0','0','0','0','','','0','0','0','0'); -- id=1488
UPDATE product SET productName = 'موديل قطفيه صدر', productDescription = '', productCatId = '107', productBuyPrice = '550', productSellAllPrice = '590', productSellUnitPrice = '590', productSellHalfPrice = '590', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01488',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550' , buypricereal_precentage = '0' , buytotal_precentage = '7.27' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1488';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1488', '1.00', '2026-10-06', '1', '0','0148801','590','590','590','550','','0','0','0','0','0','0','0','0','0','0'); -- id=1488
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1488', '1', '0', '1', '2026-10-06'); -- id=1513
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1488', '1', '0', '0', '1488', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2323
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1488, 1,'2026-10-06 17:42:56',1)
                ON DUPLICATE KEY UPDATE productid = 1488, edited = 1, sysdate = '2026-10-06 17:42:56', userid = 1; -- id=2282
UPDATE product SET productName = 'موديل قطفيه صدر', productDescription = '', productCatId = '107', productBuyPrice = '550.00', productSellAllPrice = '590.00', productSellUnitPrice = '590.00', productSellHalfPrice = '590.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01488',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550' , buypricereal_precentage = '0' , buytotal_precentage = '7.27' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1488';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل اميري','','107','550','590','590','590','2026-10-06','0','1','0','','0','0','0','0','0','550','550','550','550','550','0','7.27','0','0','.','0','0','0','550','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','550','550','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','550','0','0','0','0','0','0','','','0','0','0','0'); -- id=1489
UPDATE product SET productName = 'موديل اميري', productDescription = '', productCatId = '107', productBuyPrice = '550', productSellAllPrice = '590', productSellUnitPrice = '590', productSellHalfPrice = '590', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01489',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550' , buypricereal_precentage = '0' , buytotal_precentage = '7.27' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1489';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1489', '1.00', '2026-10-06', '1', '0','0148901','590','590','590','550','','0','0','0','0','0','0','0','0','0','0'); -- id=1489
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1489', '1', '0', '1', '2026-10-06'); -- id=1514
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1489', '1', '0', '0', '1489', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2324
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1489, 1,'2026-10-06 17:42:56',1)
                ON DUPLICATE KEY UPDATE productid = 1489, edited = 1, sysdate = '2026-10-06 17:42:56', userid = 1; -- id=2283
UPDATE product SET productName = 'موديل اميري', productDescription = '', productCatId = '107', productBuyPrice = '550.00', productSellAllPrice = '590.00', productSellUnitPrice = '590.00', productSellHalfPrice = '590.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01489',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550' , buypricereal_precentage = '0' , buytotal_precentage = '7.27' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1489';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل بلنسيج','','107','600','640','640','640','2026-10-06','0','1','0','','0','0','0','0','0','600','600','600','600','600','0','6.67','0','0','.','0','0','0','600','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','600','600','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','600','0','0','0','0','0','0','','','0','0','0','0'); -- id=1490
UPDATE product SET productName = 'موديل بلنسيج', productDescription = '', productCatId = '107', productBuyPrice = '600', productSellAllPrice = '640', productSellUnitPrice = '640', productSellHalfPrice = '640', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01490',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '6.67' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1490';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1490', '1.00', '2026-10-06', '1', '0','0149001','640','640','640','600','','0','0','0','0','0','0','0','0','0','0'); -- id=1490
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1490', '1', '0', '1', '2026-10-06'); -- id=1515
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1490', '1', '0', '0', '1490', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2325
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1490, 1,'2026-10-06 17:42:56',1)
                ON DUPLICATE KEY UPDATE productid = 1490, edited = 1, sysdate = '2026-10-06 17:42:56', userid = 1; -- id=2284
UPDATE product SET productName = 'موديل بلنسيج', productDescription = '', productCatId = '107', productBuyPrice = '600.00', productSellAllPrice = '640.00', productSellUnitPrice = '640.00', productSellHalfPrice = '640.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01490',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '6.67' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1490';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:12:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:42:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:42:58', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3398
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:13:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:43:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 17:43:12', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3399
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('تيتو بولاق', '', '', '', '', '0', '1', '2026-10-06 17:44:52', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=89
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('89', '0', '', '0', 'إضافة مورد جديد', '89', '', '2026-10-06 17:44:52', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=155
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('تيتو بولاق', 'تيتو بولاق', 'تيتو بولاق', 'تيتو بولاق', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 17:44:52'); -- id=570
UPDATE supplier SET suppliername = 'تيتو بولاق', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='570',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '89';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:15:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:45:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 17:45:04', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3400
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac509003e417', '2026-10-06 17:43:12', '89', '0.00', '108000', '0', '0', '108000.00',  '108000.00', '0', '108000', '1', '2026-10-06 17:45:04', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=36
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01483', '36', '107', '1483', '24', '500', '12000.00', '0', '', '2026-10-06 17:45:04', '1483','','','0','0','0','0','0',null,'500','12000','0','0','0','0','0','0','0','0','1'); -- id=180
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 17:43:12', 1, 1483, 0, 0
                    , 500, 24, 0, 0, 1, '2026-10-06 17:45:04')
                ON DUPLICATE KEY UPDATE buyprice = 500,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 17:45:04' ; -- id=246
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1483', '500', '24', '0', 'buyBillController.php', '180', '', '0', '0'); -- id=148
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1483 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 180 ;
UPDATE product SET productName = 'موديل الديور', productDescription = '', productCatId = '107', productBuyPrice = '500.00', productSellAllPrice = '540.00', productSellUnitPrice = '540.00', productSellHalfPrice = '540.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01483',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1483';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 500, meanbuyprice_withDiscount = 500
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where buybilldetailid = 180;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1483;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1508';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1483', '1', '24', '0', '36', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 17:43:12','0','0'); -- id=2326
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01484', '36', '107', '1484', '24', '550', '13200.00', '0', '', '2026-10-06 17:45:04', '1484','','','0','0','0','0','0',null,'550','13200','0','0','0','0','0','0','0','0','1'); -- id=181
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 17:43:12', 1, 1484, 0, 0
                    , 550, 24, 0, 0, 1, '2026-10-06 17:45:04')
                ON DUPLICATE KEY UPDATE buyprice = 550,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 17:45:04' ; -- id=247
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1484', '550', '24', '0', 'buyBillController.php', '181', '', '0', '0'); -- id=149
UPDATE product SET  productBuyPrice = "550" WHERE productId = 1484 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 181 ;
UPDATE product SET productName = 'موديل البوابه', productDescription = '', productCatId = '107', productBuyPrice = '550.00', productSellAllPrice = '590.00', productSellUnitPrice = '590.00', productSellHalfPrice = '590.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01484',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '7.27' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1484';
UPDATE buybilldetail SET  lastbuyprice = 550 , meanbuyprice = 550, lastbuyprice_withDiscount = 550, meanbuyprice_withDiscount = 550
        , lastbuyprice_withTax = 550, meanbuyprice_withTax = 550, lastbuyprice_withDiscountAndTax = 550
                where buybilldetailid = 181;
UPDATE productunit SET proUnitBuyPrice  = 550 * productnumber WHERE productid = 1484;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1509';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1484', '1', '24', '0', '36', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 17:43:12','0','0'); -- id=2327
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01485', '36', '107', '1485', '24', '570', '13680.00', '0', '', '2026-10-06 17:45:04', '1485','','','0','0','0','0','0',null,'570','13680','0','0','0','0','0','0','0','0','1'); -- id=182
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 17:43:12', 1, 1485, 0, 0
                    , 570, 24, 0, 0, 1, '2026-10-06 17:45:04')
                ON DUPLICATE KEY UPDATE buyprice = 570,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 17:45:04' ; -- id=248
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1485', '570', '24', '0', 'buyBillController.php', '182', '', '0', '0'); -- id=150
UPDATE product SET  productBuyPrice = "570" WHERE productId = 1485 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 182 ;
UPDATE product SET productName = 'موديل جينس', productDescription = '', productCatId = '107', productBuyPrice = '570.00', productSellAllPrice = '610.00', productSellUnitPrice = '610.00', productSellHalfPrice = '610.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01485',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '570',lastbuyprice_withDiscount = '570',meanbuyprice = '570',meanbuyprice_withDiscount = '570' , productbuypricereal = '570.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '7.02' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='570',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='570',meanbuyprice_withTax='570',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='570',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1485';
UPDATE buybilldetail SET  lastbuyprice = 570 , meanbuyprice = 570, lastbuyprice_withDiscount = 570, meanbuyprice_withDiscount = 570
        , lastbuyprice_withTax = 570, meanbuyprice_withTax = 570, lastbuyprice_withDiscountAndTax = 570
                where buybilldetailid = 182;
UPDATE productunit SET proUnitBuyPrice  = 570 * productnumber WHERE productid = 1485;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1510';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1485', '1', '24', '0', '36', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 17:43:12','0','0'); -- id=2328
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01486', '36', '107', '1486', '24', '500', '12000.00', '0', '', '2026-10-06 17:45:04', '1486','','','0','0','0','0','0',null,'500','12000','0','0','0','0','0','0','0','0','1'); -- id=183
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 17:43:12', 1, 1486, 0, 0
                    , 500, 24, 0, 0, 1, '2026-10-06 17:45:04')
                ON DUPLICATE KEY UPDATE buyprice = 500,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 17:45:04' ; -- id=249
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1486', '500', '24', '0', 'buyBillController.php', '183', '', '0', '0'); -- id=151
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1486 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 183 ;
UPDATE product SET productName = 'موديل طابعه فوم', productDescription = '', productCatId = '107', productBuyPrice = '500.00', productSellAllPrice = '540.00', productSellUnitPrice = '540.00', productSellHalfPrice = '540.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01486',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1486';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 500, meanbuyprice_withDiscount = 500
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where buybilldetailid = 183;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1486;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1511';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1486', '1', '24', '0', '36', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 17:43:12','0','0'); -- id=2329
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01487', '36', '107', '1487', '24', '480', '11520.00', '0', '', '2026-10-06 17:45:04', '1487','','','0','0','0','0','0',null,'480','11520','0','0','0','0','0','0','0','0','1'); -- id=184
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 17:43:12', 1, 1487, 0, 0
                    , 480, 24, 0, 0, 1, '2026-10-06 17:45:04')
                ON DUPLICATE KEY UPDATE buyprice = 480,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 17:45:04' ; -- id=250
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1487', '480', '24', '0', 'buyBillController.php', '184', '', '0', '0'); -- id=152
UPDATE product SET  productBuyPrice = "480" WHERE productId = 1487 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 184 ;
UPDATE product SET productName = 'موديل رواند', productDescription = '', productCatId = '107', productBuyPrice = '480.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01487',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.33' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1487';
UPDATE buybilldetail SET  lastbuyprice = 480 , meanbuyprice = 480, lastbuyprice_withDiscount = 480, meanbuyprice_withDiscount = 480
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 480, lastbuyprice_withDiscountAndTax = 480
                where buybilldetailid = 184;
UPDATE productunit SET proUnitBuyPrice  = 480 * productnumber WHERE productid = 1487;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1512';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1487', '1', '24', '0', '36', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 17:43:12','0','0'); -- id=2330
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01488', '36', '107', '1488', '24', '550', '13200.00', '0', '', '2026-10-06 17:45:04', '1488','','','0','0','0','0','0',null,'550','13200','0','0','0','0','0','0','0','0','1'); -- id=185
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 17:43:12', 1, 1488, 0, 0
                    , 550, 24, 0, 0, 1, '2026-10-06 17:45:04')
                ON DUPLICATE KEY UPDATE buyprice = 550,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 17:45:04' ; -- id=251
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1488', '550', '24', '0', 'buyBillController.php', '185', '', '0', '0'); -- id=153
UPDATE product SET  productBuyPrice = "550" WHERE productId = 1488 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 185 ;
UPDATE product SET productName = 'موديل قطفيه صدر', productDescription = '', productCatId = '107', productBuyPrice = '550.00', productSellAllPrice = '590.00', productSellUnitPrice = '590.00', productSellHalfPrice = '590.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01488',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '7.27' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1488';
UPDATE buybilldetail SET  lastbuyprice = 550 , meanbuyprice = 550, lastbuyprice_withDiscount = 550, meanbuyprice_withDiscount = 550
        , lastbuyprice_withTax = 550, meanbuyprice_withTax = 550, lastbuyprice_withDiscountAndTax = 550
                where buybilldetailid = 185;
UPDATE productunit SET proUnitBuyPrice  = 550 * productnumber WHERE productid = 1488;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1513';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1488', '1', '24', '0', '36', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 17:43:12','0','0'); -- id=2331
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01489', '36', '107', '1489', '24', '550', '13200.00', '0', '', '2026-10-06 17:45:04', '1489','','','0','0','0','0','0',null,'550','13200','0','0','0','0','0','0','0','0','1'); -- id=186
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 17:43:12', 1, 1489, 0, 0
                    , 550, 24, 0, 0, 1, '2026-10-06 17:45:04')
                ON DUPLICATE KEY UPDATE buyprice = 550,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 17:45:04' ; -- id=252
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1489', '550', '24', '0', 'buyBillController.php', '186', '', '0', '0'); -- id=154
UPDATE product SET  productBuyPrice = "550" WHERE productId = 1489 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 186 ;
UPDATE product SET productName = 'موديل اميري', productDescription = '', productCatId = '107', productBuyPrice = '550.00', productSellAllPrice = '590.00', productSellUnitPrice = '590.00', productSellHalfPrice = '590.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01489',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '7.27' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1489';
UPDATE buybilldetail SET  lastbuyprice = 550 , meanbuyprice = 550, lastbuyprice_withDiscount = 550, meanbuyprice_withDiscount = 550
        , lastbuyprice_withTax = 550, meanbuyprice_withTax = 550, lastbuyprice_withDiscountAndTax = 550
                where buybilldetailid = 186;
UPDATE productunit SET proUnitBuyPrice  = 550 * productnumber WHERE productid = 1489;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1514';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1489', '1', '24', '0', '36', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 17:43:12','0','0'); -- id=2332
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01490', '36', '107', '1490', '32', '600', '19200.00', '0', '', '2026-10-06 17:45:04', '1490','','','0','0','0','0','0',null,'600','19200','0','0','0','0','0','0','0','0','1'); -- id=187
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 17:43:12', 1, 1490, 0, 0
                    , 600, 32, 0, 0, 1, '2026-10-06 17:45:04')
                ON DUPLICATE KEY UPDATE buyprice = 600,
                        buyQuantity =buyQuantity+32, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 17:45:04' ; -- id=253
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1490', '600', '32', '0', 'buyBillController.php', '187', '', '0', '0'); -- id=155
UPDATE product SET  productBuyPrice = "600" WHERE productId = 1490 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 187 ;
UPDATE product SET productName = 'موديل بلنسيج', productDescription = '', productCatId = '107', productBuyPrice = '600.00', productSellAllPrice = '640.00', productSellUnitPrice = '640.00', productSellHalfPrice = '640.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01490',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.67' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1490';
UPDATE buybilldetail SET  lastbuyprice = 600 , meanbuyprice = 600, lastbuyprice_withDiscount = 600, meanbuyprice_withDiscount = 600
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where buybilldetailid = 187;
UPDATE productunit SET proUnitBuyPrice  = 600 * productnumber WHERE productid = 1490;
UPDATE storedetail SET  productquantity = '32', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1515';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1490', '1', '32', '0', '36', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '32', '1', '2026-10-06 17:43:12','0','0'); -- id=2333
UPDATE supplier SET  suppliercurrentDebt = '108000',suppliercurrentDebtInCurrency= '108000' , userid = '1', supplierdate = '2026-10-06 17:45:04'   WHERE supplierid = '89';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('89', '0.00', '108000', '0', 'اضافة فاتورة مشتريات', '36', '108000', '2026-10-06 17:43:12', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','108000','1','0','108000','108000','0',''); -- id=156
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '108000', '108000', '2026-10-06', '1', '0', '0', '2026-10-06 17:45:04','اضافة فاتورة مشتريات رقم 36','1','0',null,'0','36','buyBillController.php?do=details&id=36'); -- id=1169
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1169', '382', '108000', '','0'); -- id=1175
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15540188.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1169', '570', '108000', '','0'); -- id=1169
UPDATE accountstree SET name = 'تيتو بولاق', customName = 'تيتو بولاق', customNameEn = 'تيتو بولاق', nameEn = 'تيتو بولاق', parent = '81', accountNature = '1', theValue = '108000', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-06 17:44:52' WHERE id = '570';
update buybill set dailyentryid='1169,0' where buybillid=36;
COMMIT;
UPDATE product SET overAllAveragePrice = 500 WHERE productId = 1483;UPDATE product SET overAllAveragePrice = 550 WHERE productId = 1484;UPDATE product SET overAllAveragePrice = 570 WHERE productId = 1485;UPDATE product SET overAllAveragePrice = 500 WHERE productId = 1486;UPDATE product SET overAllAveragePrice = 480 WHERE productId = 1487;UPDATE product SET overAllAveragePrice = 550 WHERE productId = 1488;UPDATE product SET overAllAveragePrice = 550 WHERE productId = 1489;UPDATE product SET overAllAveragePrice = 600 WHERE productId = 1490;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:15:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:45:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 17:45:05', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=36'); -- id=3401
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:15:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:45:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:45:08', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=36&type=2'); -- id=3402
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:19:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:49:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:49:41', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=36&type=2'); -- id=3403
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:19:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:49:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:49:50', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3404
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:19:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:49:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 17:49:55', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3405
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:20:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:50:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:50:21', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3406
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:20:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:50:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-06 17:50:34', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=3407
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:21:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:51:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-06 17:51:13', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=3408
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:21:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:51:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 17:51:34', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3409
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:22:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:52:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 17:52:16', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3410
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:22:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:52:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 17:52:52', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3411
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('جاكت تمبو','2026-10-06','','90', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=108
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (108, 1,'2026-10-06 17:52:52',1)
                ON DUPLICATE KEY UPDATE catid = 108, edited = 1, sysdate = '2026-10-06 17:52:52', userid = 1; -- id=110
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '108', '1', '2026-10-06', '1', '0'); -- id=22
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:22:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:52:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 17:52:53', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3412
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:22:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:52:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 17:52:54', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3413
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:22:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:52:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:52:57', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3414
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:26:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:56:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:56:12', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3415
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4914','','108','675','700','700','700','2026-10-06','0','1','0','','0','0','0','0','0','675','675','675','675','675','0','3.7','0','0','.','0','0','0','675','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','675','675','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','675','0','0','0','0','0','0','','','0','0','0','0'); -- id=1491
UPDATE product SET productName = 'جاكت 4914', productDescription = '', productCatId = '108', productBuyPrice = '675', productSellAllPrice = '700', productSellUnitPrice = '700', productSellHalfPrice = '700', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01491',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675',lastbuyprice_withDiscount = '675',meanbuyprice = '675',meanbuyprice_withDiscount = '675' , productbuypricereal = '675' , buypricereal_precentage = '0' , buytotal_precentage = '3.7' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1491';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1491', '1.00', '2026-10-06', '1', '0','0149101','700','700','700','675','','0','0','0','0','0','0','0','0','0','0'); -- id=1491
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1491', '1', '0', '1', '2026-10-06'); -- id=1516
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1491', '1', '0', '0', '1491', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2334
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1491, 1,'2026-10-06 17:56:12',1)
                ON DUPLICATE KEY UPDATE productid = 1491, edited = 1, sysdate = '2026-10-06 17:56:12', userid = 1; -- id=2285
UPDATE product SET productName = 'جاكت 4914', productDescription = '', productCatId = '108', productBuyPrice = '675.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01491',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675',lastbuyprice_withDiscount = '675',meanbuyprice = '675',meanbuyprice_withDiscount = '675' , productbuypricereal = '675' , buypricereal_precentage = '0' , buytotal_precentage = '3.7' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1491';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4301','','108','600','625','625','625','2026-10-06','0','1','0','','0','0','0','0','0','600','600','600','600','600','0','4.17','0','0','.','0','0','0','600','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','600','600','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','600','0','0','0','0','0','0','','','0','0','0','0'); -- id=1492
UPDATE product SET productName = 'جاكت 4301', productDescription = '', productCatId = '108', productBuyPrice = '600', productSellAllPrice = '625', productSellUnitPrice = '625', productSellHalfPrice = '625', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01492',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1492';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1492', '1.00', '2026-10-06', '1', '0','0149201','625','625','625','600','','0','0','0','0','0','0','0','0','0','0'); -- id=1492
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1492', '1', '0', '1', '2026-10-06'); -- id=1517
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1492', '1', '0', '0', '1492', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2335
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1492, 1,'2026-10-06 17:56:12',1)
                ON DUPLICATE KEY UPDATE productid = 1492, edited = 1, sysdate = '2026-10-06 17:56:12', userid = 1; -- id=2286
UPDATE product SET productName = 'جاكت 4301', productDescription = '', productCatId = '108', productBuyPrice = '600.00', productSellAllPrice = '625.00', productSellUnitPrice = '625.00', productSellHalfPrice = '625.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01492',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1492';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4300','','108','600','625','625','625','2026-10-06','0','1','0','','0','0','0','0','0','600','600','600','600','600','0','4.17','0','0','.','0','0','0','600','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','600','600','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','600','0','0','0','0','0','0','','','0','0','0','0'); -- id=1493
UPDATE product SET productName = 'جاكت 4300', productDescription = '', productCatId = '108', productBuyPrice = '600', productSellAllPrice = '625', productSellUnitPrice = '625', productSellHalfPrice = '625', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01493',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1493';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1493', '1.00', '2026-10-06', '1', '0','0149301','625','625','625','600','','0','0','0','0','0','0','0','0','0','0'); -- id=1493
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1493', '1', '0', '1', '2026-10-06'); -- id=1518
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1493', '1', '0', '0', '1493', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2336
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1493, 1,'2026-10-06 17:56:12',1)
                ON DUPLICATE KEY UPDATE productid = 1493, edited = 1, sysdate = '2026-10-06 17:56:12', userid = 1; -- id=2287
UPDATE product SET productName = 'جاكت 4300', productDescription = '', productCatId = '108', productBuyPrice = '600.00', productSellAllPrice = '625.00', productSellUnitPrice = '625.00', productSellHalfPrice = '625.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01493',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1493';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4303','','108','480','500','500','500','2026-10-06','0','1','0','','0','0','0','0','0','480','480','480','480','480','0','4.17','0','0','.','0','0','0','480','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','480','480','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','480','0','0','0','0','0','0','','','0','0','0','0'); -- id=1494
UPDATE product SET productName = 'جاكت 4303', productDescription = '', productCatId = '108', productBuyPrice = '480', productSellAllPrice = '500', productSellUnitPrice = '500', productSellHalfPrice = '500', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01494',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1494';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1494', '1.00', '2026-10-06', '1', '0','0149401','500','500','500','480','','0','0','0','0','0','0','0','0','0','0'); -- id=1494
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1494', '1', '0', '1', '2026-10-06'); -- id=1519
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1494', '1', '0', '0', '1494', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2337
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1494, 1,'2026-10-06 17:56:12',1)
                ON DUPLICATE KEY UPDATE productid = 1494, edited = 1, sysdate = '2026-10-06 17:56:12', userid = 1; -- id=2288
UPDATE product SET productName = 'جاكت 4303', productDescription = '', productCatId = '108', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01494',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1494';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4008','','108','625','650','650','650','2026-10-06','0','1','0','','0','0','0','0','0','625','625','625','625','625','0','4','0','0','.','0','0','0','625','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','625','625','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','625','0','0','0','0','0','0','','','0','0','0','0'); -- id=1495
UPDATE product SET productName = 'جاكت 4008', productDescription = '', productCatId = '108', productBuyPrice = '625', productSellAllPrice = '650', productSellUnitPrice = '650', productSellHalfPrice = '650', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01495',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '625',lastbuyprice_withDiscount = '625',meanbuyprice = '625',meanbuyprice_withDiscount = '625' , productbuypricereal = '625' , buypricereal_precentage = '0' , buytotal_precentage = '4' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='625',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='625',meanbuyprice_withTax='625',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='625',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1495';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1495', '1.00', '2026-10-06', '1', '0','0149501','650','650','650','625','','0','0','0','0','0','0','0','0','0','0'); -- id=1495
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1495', '1', '0', '1', '2026-10-06'); -- id=1520
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1495', '1', '0', '0', '1495', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2338
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1495, 1,'2026-10-06 17:56:12',1)
                ON DUPLICATE KEY UPDATE productid = 1495, edited = 1, sysdate = '2026-10-06 17:56:12', userid = 1; -- id=2289
UPDATE product SET productName = 'جاكت 4008', productDescription = '', productCatId = '108', productBuyPrice = '625.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01495',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '625',lastbuyprice_withDiscount = '625',meanbuyprice = '625',meanbuyprice_withDiscount = '625' , productbuypricereal = '625' , buypricereal_precentage = '0' , buytotal_precentage = '4' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='625',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='625',meanbuyprice_withTax='625',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='625',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1495';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4912','','108','530','550','550','550','2026-10-06','0','1','0','','0','0','0','0','0','530','530','530','530','530','0','3.77','0','0','.','0','0','0','530','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','530','530','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','530','0','0','0','0','0','0','','','0','0','0','0'); -- id=1496
UPDATE product SET productName = 'جاكت 4912', productDescription = '', productCatId = '108', productBuyPrice = '530', productSellAllPrice = '550', productSellUnitPrice = '550', productSellHalfPrice = '550', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01496',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '530',meanbuyprice = '530',meanbuyprice_withDiscount = '530' , productbuypricereal = '530' , buypricereal_precentage = '0' , buytotal_precentage = '3.77' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='530',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1496';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1496', '1.00', '2026-10-06', '1', '0','0149601','550','550','550','530','','0','0','0','0','0','0','0','0','0','0'); -- id=1496
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1496', '1', '0', '1', '2026-10-06'); -- id=1521
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1496', '1', '0', '0', '1496', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2339
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1496, 1,'2026-10-06 17:56:12',1)
                ON DUPLICATE KEY UPDATE productid = 1496, edited = 1, sysdate = '2026-10-06 17:56:12', userid = 1; -- id=2290
UPDATE product SET productName = 'جاكت 4912', productDescription = '', productCatId = '108', productBuyPrice = '530.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01496',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '530',meanbuyprice = '530',meanbuyprice_withDiscount = '530' , productbuypricereal = '530' , buypricereal_precentage = '0' , buytotal_precentage = '3.77' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='530',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1496';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4903','','108','430','450','450','450','2026-10-06','0','1','0','','0','0','0','0','0','430','430','430','430','430','0','4.65','0','0','.','0','0','0','430','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','430','430','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','430','0','0','0','0','0','0','','','0','0','0','0'); -- id=1497
UPDATE product SET productName = 'جاكت 4903', productDescription = '', productCatId = '108', productBuyPrice = '430', productSellAllPrice = '450', productSellUnitPrice = '450', productSellHalfPrice = '450', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01497',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430' , buypricereal_precentage = '0' , buytotal_precentage = '4.65' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1497';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1497', '1.00', '2026-10-06', '1', '0','0149701','450','450','450','430','','0','0','0','0','0','0','0','0','0','0'); -- id=1497
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1497', '1', '0', '1', '2026-10-06'); -- id=1522
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1497', '1', '0', '0', '1497', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2340
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1497, 1,'2026-10-06 17:56:12',1)
                ON DUPLICATE KEY UPDATE productid = 1497, edited = 1, sysdate = '2026-10-06 17:56:12', userid = 1; -- id=2291
UPDATE product SET productName = 'جاكت 4903', productDescription = '', productCatId = '108', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01497',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430' , buypricereal_precentage = '0' , buytotal_precentage = '4.65' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1497';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4905','','108','480','500','500','500','2026-10-06','0','1','0','','0','0','0','0','0','480','480','480','480','480','0','4.17','0','0','.','0','0','0','480','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','480','480','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','480','0','0','0','0','0','0','','','0','0','0','0'); -- id=1498
UPDATE product SET productName = 'جاكت 4905', productDescription = '', productCatId = '108', productBuyPrice = '480', productSellAllPrice = '500', productSellUnitPrice = '500', productSellHalfPrice = '500', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01498',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1498';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1498', '1.00', '2026-10-06', '1', '0','0149801','500','500','500','480','','0','0','0','0','0','0','0','0','0','0'); -- id=1498
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1498', '1', '0', '1', '2026-10-06'); -- id=1523
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1498', '1', '0', '0', '1498', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2341
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1498, 1,'2026-10-06 17:56:13',1)
                ON DUPLICATE KEY UPDATE productid = 1498, edited = 1, sysdate = '2026-10-06 17:56:13', userid = 1; -- id=2292
UPDATE product SET productName = 'جاكت 4905', productDescription = '', productCatId = '108', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01498',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1498';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:26:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 17:56:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 17:56:14', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3416
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:31:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:01:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:01:26', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3417
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4918','','108','675','700','700','700','2026-10-06','0','1','0','','0','0','0','0','0','675','675','675','675','675','0','3.7','0','0','.','0','0','0','675','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','675','675','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','675','0','0','0','0','0','0','','','0','0','0','0'); -- id=1499
UPDATE product SET productName = 'جاكت 4918', productDescription = '', productCatId = '108', productBuyPrice = '675', productSellAllPrice = '700', productSellUnitPrice = '700', productSellHalfPrice = '700', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01499',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675',lastbuyprice_withDiscount = '675',meanbuyprice = '675',meanbuyprice_withDiscount = '675' , productbuypricereal = '675' , buypricereal_precentage = '0' , buytotal_precentage = '3.7' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1499';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1499', '1.00', '2026-10-06', '1', '0','0149901','700','700','700','675','','0','0','0','0','0','0','0','0','0','0'); -- id=1499
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1499', '1', '0', '1', '2026-10-06'); -- id=1524
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1499', '1', '0', '0', '1499', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2342
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1499, 1,'2026-10-06 18:01:26',1)
                ON DUPLICATE KEY UPDATE productid = 1499, edited = 1, sysdate = '2026-10-06 18:01:26', userid = 1; -- id=2293
UPDATE product SET productName = 'جاكت 4918', productDescription = '', productCatId = '108', productBuyPrice = '675.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01499',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675',lastbuyprice_withDiscount = '675',meanbuyprice = '675',meanbuyprice_withDiscount = '675' , productbuypricereal = '675' , buypricereal_precentage = '0' , buytotal_precentage = '3.7' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1499';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4919','','108','675','700','700','700','2026-10-06','0','1','0','','0','0','0','0','0','675','675','675','675','675','0','3.7','0','0','.','0','0','0','675','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','675','675','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','675','0','0','0','0','0','0','','','0','0','0','0'); -- id=1500
UPDATE product SET productName = 'جاكت 4919', productDescription = '', productCatId = '108', productBuyPrice = '675', productSellAllPrice = '700', productSellUnitPrice = '700', productSellHalfPrice = '700', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01500',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675',lastbuyprice_withDiscount = '675',meanbuyprice = '675',meanbuyprice_withDiscount = '675' , productbuypricereal = '675' , buypricereal_precentage = '0' , buytotal_precentage = '3.7' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1500';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1500', '1.00', '2026-10-06', '1', '0','0150001','700','700','700','675','','0','0','0','0','0','0','0','0','0','0'); -- id=1500
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1500', '1', '0', '1', '2026-10-06'); -- id=1525
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1500', '1', '0', '0', '1500', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2343
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1500, 1,'2026-10-06 18:01:26',1)
                ON DUPLICATE KEY UPDATE productid = 1500, edited = 1, sysdate = '2026-10-06 18:01:26', userid = 1; -- id=2294
UPDATE product SET productName = 'جاكت 4919', productDescription = '', productCatId = '108', productBuyPrice = '675.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01500',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675',lastbuyprice_withDiscount = '675',meanbuyprice = '675',meanbuyprice_withDiscount = '675' , productbuypricereal = '675' , buypricereal_precentage = '0' , buytotal_precentage = '3.7' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1500';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4005','','108','650','675','675','675','2026-10-06','0','1','0','','0','0','0','0','0','650','650','650','650','650','0','3.85','0','0','.','0','0','0','650','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','650','650','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','650','0','0','0','0','0','0','','','0','0','0','0'); -- id=1501
UPDATE product SET productName = 'جاكت 4005', productDescription = '', productCatId = '108', productBuyPrice = '650', productSellAllPrice = '675', productSellUnitPrice = '675', productSellHalfPrice = '675', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01501',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650',lastbuyprice_withDiscount = '650',meanbuyprice = '650',meanbuyprice_withDiscount = '650' , productbuypricereal = '650' , buypricereal_precentage = '0' , buytotal_precentage = '3.85' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1501';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1501', '1.00', '2026-10-06', '1', '0','0150101','675','675','675','650','','0','0','0','0','0','0','0','0','0','0'); -- id=1501
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1501', '1', '0', '1', '2026-10-06'); -- id=1526
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1501', '1', '0', '0', '1501', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2344
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1501, 1,'2026-10-06 18:01:26',1)
                ON DUPLICATE KEY UPDATE productid = 1501, edited = 1, sysdate = '2026-10-06 18:01:26', userid = 1; -- id=2295
UPDATE product SET productName = 'جاكت 4005', productDescription = '', productCatId = '108', productBuyPrice = '650.00', productSellAllPrice = '675.00', productSellUnitPrice = '675.00', productSellHalfPrice = '675.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01501',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650',lastbuyprice_withDiscount = '650',meanbuyprice = '650',meanbuyprice_withDiscount = '650' , productbuypricereal = '650' , buypricereal_precentage = '0' , buytotal_precentage = '3.85' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1501';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4017','','108','675','700','700','700','2026-10-06','0','1','0','','0','0','0','0','0','675','675','675','675','675','0','3.7','0','0','.','0','0','0','675','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','675','675','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','675','0','0','0','0','0','0','','','0','0','0','0'); -- id=1502
UPDATE product SET productName = 'جاكت 4017', productDescription = '', productCatId = '108', productBuyPrice = '675', productSellAllPrice = '700', productSellUnitPrice = '700', productSellHalfPrice = '700', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01502',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675',lastbuyprice_withDiscount = '675',meanbuyprice = '675',meanbuyprice_withDiscount = '675' , productbuypricereal = '675' , buypricereal_precentage = '0' , buytotal_precentage = '3.7' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1502';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1502', '1.00', '2026-10-06', '1', '0','0150201','700','700','700','675','','0','0','0','0','0','0','0','0','0','0'); -- id=1502
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1502', '1', '0', '1', '2026-10-06'); -- id=1527
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1502', '1', '0', '0', '1502', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2345
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1502, 1,'2026-10-06 18:01:26',1)
                ON DUPLICATE KEY UPDATE productid = 1502, edited = 1, sysdate = '2026-10-06 18:01:26', userid = 1; -- id=2296
UPDATE product SET productName = 'جاكت 4017', productDescription = '', productCatId = '108', productBuyPrice = '675.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01502',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675',lastbuyprice_withDiscount = '675',meanbuyprice = '675',meanbuyprice_withDiscount = '675' , productbuypricereal = '675' , buypricereal_precentage = '0' , buytotal_precentage = '3.7' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1502';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 2957','','108','580','600','600','600','2026-10-06','0','1','0','','0','0','0','0','0','580','580','580','580','580','0','3.45','0','0','.','0','0','0','580','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','580','580','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','580','0','0','0','0','0','0','','','0','0','0','0'); -- id=1503
UPDATE product SET productName = 'جاكت 2957', productDescription = '', productCatId = '108', productBuyPrice = '580', productSellAllPrice = '600', productSellUnitPrice = '600', productSellHalfPrice = '600', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01503',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '3.45' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1503';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1503', '1.00', '2026-10-06', '1', '0','0150301','600','600','600','580','','0','0','0','0','0','0','0','0','0','0'); -- id=1503
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1503', '1', '0', '1', '2026-10-06'); -- id=1528
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1503', '1', '0', '0', '1503', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2346
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1503, 1,'2026-10-06 18:01:26',1)
                ON DUPLICATE KEY UPDATE productid = 1503, edited = 1, sysdate = '2026-10-06 18:01:26', userid = 1; -- id=2297
UPDATE product SET productName = 'جاكت 2957', productDescription = '', productCatId = '108', productBuyPrice = '580.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01503',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '3.45' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1503';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4302','','108','580','600','600','600','2026-10-06','0','1','0','','0','0','0','0','0','580','580','580','580','580','0','3.45','0','0','.','0','0','0','580','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','580','580','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','580','0','0','0','0','0','0','','','0','0','0','0'); -- id=1504
UPDATE product SET productName = 'جاكت 4302', productDescription = '', productCatId = '108', productBuyPrice = '580', productSellAllPrice = '600', productSellUnitPrice = '600', productSellHalfPrice = '600', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01504',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '3.45' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1504';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1504', '1.00', '2026-10-06', '1', '0','0150401','600','600','600','580','','0','0','0','0','0','0','0','0','0','0'); -- id=1504
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1504', '1', '0', '1', '2026-10-06'); -- id=1529
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1504', '1', '0', '0', '1504', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2347
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1504, 1,'2026-10-06 18:01:26',1)
                ON DUPLICATE KEY UPDATE productid = 1504, edited = 1, sysdate = '2026-10-06 18:01:26', userid = 1; -- id=2298
UPDATE product SET productName = 'جاكت 4302', productDescription = '', productCatId = '108', productBuyPrice = '580.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01504',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '3.45' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1504';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4304','','108','600','625','625','625','2026-10-06','0','1','0','','0','0','0','0','0','600','600','600','600','600','0','4.17','0','0','.','0','0','0','600','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','600','600','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','600','0','0','0','0','0','0','','','0','0','0','0'); -- id=1505
UPDATE product SET productName = 'جاكت 4304', productDescription = '', productCatId = '108', productBuyPrice = '600', productSellAllPrice = '625', productSellUnitPrice = '625', productSellHalfPrice = '625', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01505',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1505';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1505', '1.00', '2026-10-06', '1', '0','0150501','625','625','625','600','','0','0','0','0','0','0','0','0','0','0'); -- id=1505
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1505', '1', '0', '1', '2026-10-06'); -- id=1530
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1505', '1', '0', '0', '1505', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2348
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1505, 1,'2026-10-06 18:01:26',1)
                ON DUPLICATE KEY UPDATE productid = 1505, edited = 1, sysdate = '2026-10-06 18:01:26', userid = 1; -- id=2299
UPDATE product SET productName = 'جاكت 4304', productDescription = '', productCatId = '108', productBuyPrice = '600.00', productSellAllPrice = '625.00', productSellUnitPrice = '625.00', productSellHalfPrice = '625.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01505',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1505';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4911','','108','480','500','500','500','2026-10-06','0','1','0','','0','0','0','0','0','480','480','480','480','480','0','4.17','0','0','.','0','0','0','480','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','480','480','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','480','0','0','0','0','0','0','','','0','0','0','0'); -- id=1506
UPDATE product SET productName = 'جاكت 4911', productDescription = '', productCatId = '108', productBuyPrice = '480', productSellAllPrice = '500', productSellUnitPrice = '500', productSellHalfPrice = '500', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01506',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1506';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1506', '1.00', '2026-10-06', '1', '0','0150601','500','500','500','480','','0','0','0','0','0','0','0','0','0','0'); -- id=1506
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1506', '1', '0', '1', '2026-10-06'); -- id=1531
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1506', '1', '0', '0', '1506', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2349
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1506, 1,'2026-10-06 18:01:26',1)
                ON DUPLICATE KEY UPDATE productid = 1506, edited = 1, sysdate = '2026-10-06 18:01:26', userid = 1; -- id=2300
UPDATE product SET productName = 'جاكت 4911', productDescription = '', productCatId = '108', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01506',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1506';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4915','','108','650','675','675','675','2026-10-06','0','1','0','','0','0','0','0','0','650','650','650','650','650','0','3.85','0','0','.','0','0','0','650','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','650','650','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','650','0','0','0','0','0','0','','','0','0','0','0'); -- id=1507
UPDATE product SET productName = 'جاكت 4915', productDescription = '', productCatId = '108', productBuyPrice = '650', productSellAllPrice = '675', productSellUnitPrice = '675', productSellHalfPrice = '675', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01507',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650',lastbuyprice_withDiscount = '650',meanbuyprice = '650',meanbuyprice_withDiscount = '650' , productbuypricereal = '650' , buypricereal_precentage = '0' , buytotal_precentage = '3.85' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1507';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1507', '1.00', '2026-10-06', '1', '0','0150701','675','675','675','650','','0','0','0','0','0','0','0','0','0','0'); -- id=1507
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1507', '1', '0', '1', '2026-10-06'); -- id=1532
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1507', '1', '0', '0', '1507', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2350
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1507, 1,'2026-10-06 18:01:26',1)
                ON DUPLICATE KEY UPDATE productid = 1507, edited = 1, sysdate = '2026-10-06 18:01:26', userid = 1; -- id=2301
UPDATE product SET productName = 'جاكت 4915', productDescription = '', productCatId = '108', productBuyPrice = '650.00', productSellAllPrice = '675.00', productSellUnitPrice = '675.00', productSellHalfPrice = '675.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01507',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650',lastbuyprice_withDiscount = '650',meanbuyprice = '650',meanbuyprice_withDiscount = '650' , productbuypricereal = '650' , buypricereal_precentage = '0' , buytotal_precentage = '3.85' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1507';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:31:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:01:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:01:28', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3418
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:31:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:01:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:01:29', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3419
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:31:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:01:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:01:55', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3420
UPDATE user SET loginip = "" WHERE userid = 1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:33:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:03:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:03:10', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3421
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:33:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:03:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:03:27', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3422
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:33:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:03:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 18:03:37', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php'); -- id=3423
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:33:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:03:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 18:03:37', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=3424
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:34:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:04:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 18:04:03', '1', 'details', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=details&id=35'); -- id=3425
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:35:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:05:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:05:06', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=3426
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:35:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:05:06", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-06 18:05:06', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3427
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:35:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:05:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:05:12', '1', 'editbill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editbill&id=35'); -- id=3428
UPDATE productunit SET unitid = '1', productid = '1479', productnumber = '1.00', productunitdate = '2026-10-06', userid = '1', conditions = '0',proUnitParcode='0147901',proUnitSellAllPrice='620',proUnitSellHalfPrice='620',proUnitSellUnitPrice ='620',proUnitBuyPrice='580',unitInTax='',proUnitPrice4='0',proUnitPrice5='0',proUnitPrice6='0',proUnitPrice7='0',proUnitPrice8='0',proUnitPrice9='0',proUnitPrice10='0',proUnitPrice11='0',proUnitPrice12='0',proUnitPrice13='0' WHERE productunitid = '1479';
UPDATE product SET productName = 'راوند بيدو الالماني 620', productDescription = '', productCatId = '106', productBuyPrice = '500', productSellAllPrice = '620', productSellUnitPrice = '620', productSellHalfPrice = '620', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01479',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580.00',lastbuyprice_withDiscount = '580',meanbuyprice = '580.00',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '6.9' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1479';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:35:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:05:23", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 18:05:23', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3429
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:35:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:05:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:05:23', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=update'); -- id=3430
BEGIN;
UPDATE costcenterdetail SET del = 1 WHERE type in( 3) and  modelid = 35;
UPDATE buybill SET  buybillsysdate = '2026-10-06 18:05:23', userid = '1',delbyuserid = '1', conditions = '1' WHERE buybillid = '35';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1475, 0, 0
                    , 1200, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=236
UPDATE buybilldetail SET  lastbuyprice = 1200.00 , meanbuyprice = 1200.00, lastbuyprice_withDiscount = 1200.00, meanbuyprice_withDiscount = 1200.00
        , lastbuyprice_withTax = 1200.00, meanbuyprice_withTax = 1200.00, lastbuyprice_withDiscountAndTax = 1200.00
                where buybilldetailid = 170;
UPDATE product SET productName = 'ترينج بيدو الالماني 1280', productDescription = '', productCatId = '106', productBuyPrice = '1200.00', productSellAllPrice = '1280.00', productSellUnitPrice = '1280.00', productSellHalfPrice = '1280.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01475',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1200',lastbuyprice_withDiscount = '0',meanbuyprice = '1200',meanbuyprice_withDiscount = '1200' , productbuypricereal = '1200.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.67' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1200',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1200',meanbuyprice_withTax='1200',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1475';
UPDATE productunit SET proUnitBuyPrice  = 1200 * productnumber WHERE productid = 1475;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1500';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1475', '1', '24', '1', '35', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '48', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2351
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1475, 0, 0
                    , 1200, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=236
UPDATE buybilldetail SET  lastbuyprice = 1200.00 , meanbuyprice = 1200.00, lastbuyprice_withDiscount = 0.00, meanbuyprice_withDiscount = 1200.00
        , lastbuyprice_withTax = 1200.00, meanbuyprice_withTax = 1200.00, lastbuyprice_withDiscountAndTax = 0.00
                where buybilldetailid = 171;
UPDATE product SET productName = 'ترينج بيدو الالماني 1280', productDescription = '', productCatId = '106', productBuyPrice = '1200.00', productSellAllPrice = '1280.00', productSellUnitPrice = '1280.00', productSellHalfPrice = '1280.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01475',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1200',lastbuyprice_withDiscount = '0',meanbuyprice = '1200',meanbuyprice_withDiscount = '1200' , productbuypricereal = '1200.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.67' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1200',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1200',meanbuyprice_withTax='1200',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1475';
UPDATE productunit SET proUnitBuyPrice  = 1200 * productnumber WHERE productid = 1475;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1500';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1475', '1', '24', '1', '35', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '24', '0', '1', '2026-10-06 16:49:00','0','0'); -- id=2352
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1476, 0, 0
                    , 1000, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=238
UPDATE buybilldetail SET  lastbuyprice = 1000.00 , meanbuyprice = 1000.00, lastbuyprice_withDiscount = 1000.00, meanbuyprice_withDiscount = 1000.00
        , lastbuyprice_withTax = 1000.00, meanbuyprice_withTax = 1000.00, lastbuyprice_withDiscountAndTax = 1000.00
                where buybilldetailid = 172;
UPDATE product SET productName = 'ترينج بيدو الالماني 1080', productDescription = '', productCatId = '106', productBuyPrice = '1000.00', productSellAllPrice = '1080.00', productSellUnitPrice = '1080.00', productSellHalfPrice = '1080.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01476',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1000',lastbuyprice_withDiscount = '0',meanbuyprice = '1000.00',meanbuyprice_withDiscount = '1000' , productbuypricereal = '1000.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1000',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1000',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1476';
UPDATE productunit SET proUnitBuyPrice  = 1000 * productnumber WHERE productid = 1476;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1501';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1476', '1', '24', '1', '35', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '24', '0', '1', '2026-10-06 16:49:00','0','0'); -- id=2353
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1477, 0, 0
                    , 500, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=239
UPDATE buybilldetail SET  lastbuyprice = 500.00 , meanbuyprice = 500.00, lastbuyprice_withDiscount = 500.00, meanbuyprice_withDiscount = 500.00
        , lastbuyprice_withTax = 500.00, meanbuyprice_withTax = 500.00, lastbuyprice_withDiscountAndTax = 500.00
                where buybilldetailid = 173;
UPDATE product SET productName = 'راوند بيدو الالماني 540', productDescription = '', productCatId = '106', productBuyPrice = '500.00', productSellAllPrice = '540.00', productSellUnitPrice = '540.00', productSellHalfPrice = '540.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01477',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '0',meanbuyprice = '500.00',meanbuyprice_withDiscount = '500' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1477';
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1477;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1502';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1477', '1', '24', '1', '35', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '24', '0', '1', '2026-10-06 16:49:00','0','0'); -- id=2354
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1478, 0, 0
                    , 450, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=240
UPDATE buybilldetail SET  lastbuyprice = 450.00 , meanbuyprice = 450.00, lastbuyprice_withDiscount = 450.00, meanbuyprice_withDiscount = 450.00
        , lastbuyprice_withTax = 450.00, meanbuyprice_withTax = 450.00, lastbuyprice_withDiscountAndTax = 450.00
                where buybilldetailid = 174;
UPDATE product SET productName = 'راوند بيدو الالماني 490', productDescription = '', productCatId = '106', productBuyPrice = '450.00', productSellAllPrice = '490.00', productSellUnitPrice = '490.00', productSellHalfPrice = '490.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01478',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '0',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.89' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1478';
UPDATE productunit SET proUnitBuyPrice  = 450 * productnumber WHERE productid = 1478;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1503';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1478', '1', '24', '1', '35', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '48', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2355
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1478, 0, 0
                    , 450, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=240
UPDATE buybilldetail SET  lastbuyprice = 450.00 , meanbuyprice = 450.00, lastbuyprice_withDiscount = 0.00, meanbuyprice_withDiscount = 450.00
        , lastbuyprice_withTax = 450.00, meanbuyprice_withTax = 450.00, lastbuyprice_withDiscountAndTax = 0.00
                where buybilldetailid = 175;
UPDATE product SET productName = 'راوند بيدو الالماني 490', productDescription = '', productCatId = '106', productBuyPrice = '450.00', productSellAllPrice = '490.00', productSellUnitPrice = '490.00', productSellHalfPrice = '490.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01478',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '0',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.89' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1478';
UPDATE productunit SET proUnitBuyPrice  = 450 * productnumber WHERE productid = 1478;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1503';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1478', '1', '24', '1', '35', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '24', '0', '1', '2026-10-06 16:49:00','0','0'); -- id=2356
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1480, 0, 0
                    , 620, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=242
UPDATE buybilldetail SET  lastbuyprice = 620.00 , meanbuyprice = 620.00, lastbuyprice_withDiscount = 620.00, meanbuyprice_withDiscount = 620.00
        , lastbuyprice_withTax = 620.00, meanbuyprice_withTax = 620.00, lastbuyprice_withDiscountAndTax = 620.00
                where buybilldetailid = 176;
UPDATE product SET productName = 'كابيشو بيدو الالماني 670', productDescription = '', productCatId = '106', productBuyPrice = '620.00', productSellAllPrice = '670.00', productSellUnitPrice = '670.00', productSellHalfPrice = '670.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01480',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '620',lastbuyprice_withDiscount = '0',meanbuyprice = '620.00',meanbuyprice_withDiscount = '620' , productbuypricereal = '620.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.06' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='620',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='620',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1480';
UPDATE productunit SET proUnitBuyPrice  = 620 * productnumber WHERE productid = 1480;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1505';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1480', '1', '24', '1', '35', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '24', '0', '1', '2026-10-06 16:49:00','0','0'); -- id=2357
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1481, 0, 0
                    , 580, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=243
UPDATE buybilldetail SET  lastbuyprice = 580.00 , meanbuyprice = 580.00, lastbuyprice_withDiscount = 580.00, meanbuyprice_withDiscount = 580.00
        , lastbuyprice_withTax = 580.00, meanbuyprice_withTax = 580.00, lastbuyprice_withDiscountAndTax = 580.00
                where buybilldetailid = 177;
UPDATE product SET productName = 'كابيشو بيدو الالماني 630', productDescription = '', productCatId = '106', productBuyPrice = '580.00', productSellAllPrice = '630.00', productSellUnitPrice = '630.00', productSellHalfPrice = '630.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01481',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '0',meanbuyprice = '580.00',meanbuyprice_withDiscount = '580' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.62' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1481';
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1481;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1506';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1481', '1', '24', '1', '35', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '24', '0', '1', '2026-10-06 16:49:00','0','0'); -- id=2358
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1482, 0, 0
                    , 600, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=244
UPDATE buybilldetail SET  lastbuyprice = 600.00 , meanbuyprice = 600.00, lastbuyprice_withDiscount = 600.00, meanbuyprice_withDiscount = 600.00
        , lastbuyprice_withTax = 600.00, meanbuyprice_withTax = 600.00, lastbuyprice_withDiscountAndTax = 600.00
                where buybilldetailid = 178;
UPDATE product SET productName = 'كابيشو بيدو الالماني 650', productDescription = '', productCatId = '106', productBuyPrice = '600.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01482',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '0',meanbuyprice = '600.00',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.33' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1482';
UPDATE productunit SET proUnitBuyPrice  = 600 * productnumber WHERE productid = 1482;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1507';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1482', '1', '24', '1', '35', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '24', '0', '1', '2026-10-06 16:49:00','0','0'); -- id=2359
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1479, 0, 0
                    , 580, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=245
UPDATE buybilldetail SET  lastbuyprice = 580.00 , meanbuyprice = 580.00, lastbuyprice_withDiscount = 580.00, meanbuyprice_withDiscount = 580.00
        , lastbuyprice_withTax = 580.00, meanbuyprice_withTax = 580.00, lastbuyprice_withDiscountAndTax = 580.00
                where buybilldetailid = 179;
UPDATE product SET productName = 'راوند بيدو الالماني 620', productDescription = '', productCatId = '106', productBuyPrice = '500.00', productSellAllPrice = '620.00', productSellUnitPrice = '620.00', productSellHalfPrice = '620.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01479',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '0',meanbuyprice = '500.00',meanbuyprice_withDiscount = '500' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.90' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1479';
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1479;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1504';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1479', '1', '24', '1', '35', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '24', '0', '1', '2026-10-06 16:49:00','0','0'); -- id=2360
UPDATE supplier SET  suppliercurrentDebt = '0',suppliercurrentDebtInCurrency= '0' , userid = '1', supplierdate = '2026-10-06 18:05:23'   WHERE supplierid = '88';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('88', '172320.00', '172320.00', '1', 'حذف فاتورة مشتريات - للتعديل', '35', '0', '2026-10-06 16:49:00', '1', 'buyBillController.php', 'حذف فاتورة مشتريات - للتعديل', '0','', '0','1','1','172320','1','172320','172320','0','0',''); -- id=157
UPDATE productserial SET del = 1
		 WHERE billid = 35;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,deletedbuyid,controlname,payedtax,costcenterid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac4fc4c3b380', '2026-10-06 16:49:00', '88', '0.00', '170400', '0', '0', '170400.00', '170400.00', '0.00', '170400', '1', '2026-10-06 18:05:23', '', '1', '0', '', '1', '1','1','35','buyBillController.php','0.00','-1','1','0','0','.','0','0','0','0','0','0'); -- id=37
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01475', '37', '106', '1475', '24.00', '1200', '28800.00', '0.00', '', '2026-10-06 18:05:23', '1475','','','0','0','0','0','0',null,'1200','28800','0','0','0','0','0','0','0','0','1'); -- id=188
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1475, 0, 0
                    , 1200, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyprice = 1200,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=236
UPDATE product SET  productBuyPrice = "1200" WHERE productId = 1475 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 188 ;
UPDATE product SET productName = 'ترينج بيدو الالماني 1280', productDescription = '', productCatId = '106', productBuyPrice = '1200.00', productSellAllPrice = '1280.00', productSellUnitPrice = '1280.00', productSellHalfPrice = '1280.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01475',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1200',lastbuyprice_withDiscount = '1200',meanbuyprice = '1200',meanbuyprice_withDiscount = '1200' , productbuypricereal = '1200.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.67' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1200',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1200',meanbuyprice_withTax='1200',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1200',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1475';
UPDATE buybilldetail SET  lastbuyprice = 1200 , meanbuyprice = 1200, lastbuyprice_withDiscount = 1200, meanbuyprice_withDiscount = 1200
        , lastbuyprice_withTax = 1200, meanbuyprice_withTax = 1200, lastbuyprice_withDiscountAndTax = 1200
                where buybilldetailid = 188;
UPDATE productunit SET proUnitBuyPrice  = 1200 * productnumber WHERE productid = 1475;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1500';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1475', '1', '24', '0', '37', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2361
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01475', '37', '106', '1475', '24.00', '1200', '28800.00', '0.00', '', '2026-10-06 18:05:23', '1475','','','0','0','0','0','0',null,'1200','28800','0','0','0','0','0','0','0','0','1'); -- id=189
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1475, 0, 0
                    , 1200, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyprice = 1200,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=236
UPDATE product SET  productBuyPrice = "1200" WHERE productId = 1475 ;
UPDATE buybilldetail SET  quantitybefore = 24 WHERE buybilldetailid = 189 ;
UPDATE product SET productName = 'ترينج بيدو الالماني 1280', productDescription = '', productCatId = '106', productBuyPrice = '1200.00', productSellAllPrice = '1280.00', productSellUnitPrice = '1280.00', productSellHalfPrice = '1280.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01475',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1200',lastbuyprice_withDiscount = '1200',meanbuyprice = '1200',meanbuyprice_withDiscount = '1200' , productbuypricereal = '1200.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.67' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1200',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1200',meanbuyprice_withTax='1200',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1200',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1475';
UPDATE buybilldetail SET  lastbuyprice = 1200 , meanbuyprice = 1200, lastbuyprice_withDiscount = 1200, meanbuyprice_withDiscount = 1200
        , lastbuyprice_withTax = 1200, meanbuyprice_withTax = 1200, lastbuyprice_withDiscountAndTax = 1200
                where buybilldetailid = 189;
UPDATE productunit SET proUnitBuyPrice  = 1200 * productnumber WHERE productid = 1475;
UPDATE storedetail SET  productquantity = '48', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1500';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1475', '1', '24', '0', '37', 'اضافة فاتورة مشتريات', 'buyBillController.php', '24', '48', '1', '2026-10-06 16:49:00','0','0'); -- id=2362
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01476', '37', '106', '1476', '24.00', '1000', '24000.00', '0.00', '', '2026-10-06 18:05:23', '1476','','','0','0','0','0','0',null,'1000','24000','0','0','0','0','0','0','0','0','1'); -- id=190
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1476, 0, 0
                    , 1000, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyprice = 1000,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=238
UPDATE product SET  productBuyPrice = "1000" WHERE productId = 1476 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 190 ;
UPDATE product SET productName = 'ترينج بيدو الالماني 1080', productDescription = '', productCatId = '106', productBuyPrice = '1000.00', productSellAllPrice = '1080.00', productSellUnitPrice = '1080.00', productSellHalfPrice = '1080.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01476',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1000',lastbuyprice_withDiscount = '1000',meanbuyprice = '1000',meanbuyprice_withDiscount = '1000' , productbuypricereal = '1000.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1000',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1000',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1000',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1476';
UPDATE buybilldetail SET  lastbuyprice = 1000 , meanbuyprice = 1000, lastbuyprice_withDiscount = 1000, meanbuyprice_withDiscount = 1000
        , lastbuyprice_withTax = 1000, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 1000
                where buybilldetailid = 190;
UPDATE productunit SET proUnitBuyPrice  = 1000 * productnumber WHERE productid = 1476;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1501';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1476', '1', '24', '0', '37', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2363
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01477', '37', '106', '1477', '24.00', '500', '12000.00', '0.00', '', '2026-10-06 18:05:23', '1477','','','0','0','0','0','0',null,'500','12000','0','0','0','0','0','0','0','0','1'); -- id=191
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1477, 0, 0
                    , 500, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyprice = 500,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=239
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1477 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 191 ;
UPDATE product SET productName = 'راوند بيدو الالماني 540', productDescription = '', productCatId = '106', productBuyPrice = '500.00', productSellAllPrice = '540.00', productSellUnitPrice = '540.00', productSellHalfPrice = '540.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01477',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='250',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1477';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 500, meanbuyprice_withDiscount = 500
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 250, lastbuyprice_withDiscountAndTax = 500
                where buybilldetailid = 191;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1477;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1502';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1477', '1', '24', '0', '37', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2364
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01478', '37', '106', '1478', '24.00', '450', '10800.00', '0.00', '', '2026-10-06 18:05:23', '1478','','','0','0','0','0','0',null,'450','10800','0','0','0','0','0','0','0','0','1'); -- id=192
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1478, 0, 0
                    , 450, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyprice = 450,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=240
UPDATE product SET  productBuyPrice = "450" WHERE productId = 1478 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 192 ;
UPDATE product SET productName = 'راوند بيدو الالماني 490', productDescription = '', productCatId = '106', productBuyPrice = '450.00', productSellAllPrice = '490.00', productSellUnitPrice = '490.00', productSellHalfPrice = '490.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01478',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.89' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1478';
UPDATE buybilldetail SET  lastbuyprice = 450 , meanbuyprice = 450, lastbuyprice_withDiscount = 450, meanbuyprice_withDiscount = 450
        , lastbuyprice_withTax = 450, meanbuyprice_withTax = 450, lastbuyprice_withDiscountAndTax = 450
                where buybilldetailid = 192;
UPDATE productunit SET proUnitBuyPrice  = 450 * productnumber WHERE productid = 1478;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1503';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1478', '1', '24', '0', '37', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2365
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01478', '37', '106', '1478', '24.00', '450', '10800.00', '0.00', '', '2026-10-06 18:05:23', '1478','','','0','0','0','0','0',null,'450','10800','0','0','0','0','0','0','0','0','1'); -- id=193
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1478, 0, 0
                    , 450, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyprice = 450,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=240
UPDATE product SET  productBuyPrice = "450" WHERE productId = 1478 ;
UPDATE buybilldetail SET  quantitybefore = 24 WHERE buybilldetailid = 193 ;
UPDATE product SET productName = 'راوند بيدو الالماني 490', productDescription = '', productCatId = '106', productBuyPrice = '450.00', productSellAllPrice = '490.00', productSellUnitPrice = '490.00', productSellHalfPrice = '490.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01478',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.89' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1478';
UPDATE buybilldetail SET  lastbuyprice = 450 , meanbuyprice = 450, lastbuyprice_withDiscount = 450, meanbuyprice_withDiscount = 450
        , lastbuyprice_withTax = 450, meanbuyprice_withTax = 450, lastbuyprice_withDiscountAndTax = 450
                where buybilldetailid = 193;
UPDATE productunit SET proUnitBuyPrice  = 450 * productnumber WHERE productid = 1478;
UPDATE storedetail SET  productquantity = '48', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1503';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1478', '1', '24', '0', '37', 'اضافة فاتورة مشتريات', 'buyBillController.php', '24', '48', '1', '2026-10-06 16:49:00','0','0'); -- id=2366
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01480', '37', '106', '1480', '24.00', '620', '14880.00', '0.00', '', '2026-10-06 18:05:23', '1480','','','0','0','0','0','0',null,'620','14880','0','0','0','0','0','0','0','0','1'); -- id=194
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1480, 0, 0
                    , 620, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyprice = 620,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=242
UPDATE product SET  productBuyPrice = "620" WHERE productId = 1480 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 194 ;
UPDATE product SET productName = 'كابيشو بيدو الالماني 670', productDescription = '', productCatId = '106', productBuyPrice = '620.00', productSellAllPrice = '670.00', productSellUnitPrice = '670.00', productSellHalfPrice = '670.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01480',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '620',lastbuyprice_withDiscount = '620',meanbuyprice = '620',meanbuyprice_withDiscount = '620' , productbuypricereal = '620.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.06' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='620',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='620',meanbuyprice_withTax='310',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='620',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1480';
UPDATE buybilldetail SET  lastbuyprice = 620 , meanbuyprice = 620, lastbuyprice_withDiscount = 620, meanbuyprice_withDiscount = 620
        , lastbuyprice_withTax = 620, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 620
                where buybilldetailid = 194;
UPDATE productunit SET proUnitBuyPrice  = 620 * productnumber WHERE productid = 1480;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1505';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1480', '1', '24', '0', '37', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2367
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01481', '37', '106', '1481', '24.00', '580', '13920.00', '0.00', '', '2026-10-06 18:05:23', '1481','','','0','0','0','0','0',null,'580','13920','0','0','0','0','0','0','0','0','1'); -- id=195
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1481, 0, 0
                    , 580, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyprice = 580,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=243
UPDATE product SET  productBuyPrice = "580" WHERE productId = 1481 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 195 ;
UPDATE product SET productName = 'كابيشو بيدو الالماني 630', productDescription = '', productCatId = '106', productBuyPrice = '580.00', productSellAllPrice = '630.00', productSellUnitPrice = '630.00', productSellHalfPrice = '630.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01481',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.62' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='290',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1481';
UPDATE buybilldetail SET  lastbuyprice = 580 , meanbuyprice = 580, lastbuyprice_withDiscount = 580, meanbuyprice_withDiscount = 580
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 290, lastbuyprice_withDiscountAndTax = 580
                where buybilldetailid = 195;
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1481;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1506';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1481', '1', '24', '0', '37', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2368
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01482', '37', '106', '1482', '24.00', '600', '14400.00', '0.00', '', '2026-10-06 18:05:23', '1482','','','0','0','0','0','0',null,'600','14400','0','0','0','0','0','0','0','0','1'); -- id=196
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1482, 0, 0
                    , 600, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyprice = 600,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=244
UPDATE product SET  productBuyPrice = "600" WHERE productId = 1482 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 196 ;
UPDATE product SET productName = 'كابيشو بيدو الالماني 650', productDescription = '', productCatId = '106', productBuyPrice = '600.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01482',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.33' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='300',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1482';
UPDATE buybilldetail SET  lastbuyprice = 600 , meanbuyprice = 600, lastbuyprice_withDiscount = 600, meanbuyprice_withDiscount = 600
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 300, lastbuyprice_withDiscountAndTax = 600
                where buybilldetailid = 196;
UPDATE productunit SET proUnitBuyPrice  = 600 * productnumber WHERE productid = 1482;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1507';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1482', '1', '24', '0', '37', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2369
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01479', '37', '106', '1479', '24.00', '500', '12000.00', '0.00', '', '2026-10-06 18:05:23', '1479','','','0','0','0','0','0',null,'500','12000','0','0','0','0','0','0','0','0','1'); -- id=197
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 16:49:00', 1, 1479, 0, 0
                    , 500, 24, 0, 0, 1, '2026-10-06 18:05:23')
                ON DUPLICATE KEY UPDATE buyprice = 500,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:05:23' ; -- id=245
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1479 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 197 ;
UPDATE product SET productName = 'راوند بيدو الالماني 620', productDescription = '', productCatId = '106', productBuyPrice = '500.00', productSellAllPrice = '620.00', productSellUnitPrice = '620.00', productSellHalfPrice = '620.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01479',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.90' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='250',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1479';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 500, meanbuyprice_withDiscount = 500
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 250, lastbuyprice_withDiscountAndTax = 500
                where buybilldetailid = 197;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1479;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1504';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1479', '1', '24', '0', '37', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 16:49:00','0','0'); -- id=2370
DELETE FROM productserial WHERE billid = 35
		and type =0 
		;
UPDATE supplier SET  suppliercurrentDebt = '170400',suppliercurrentDebtInCurrency= '170400' , userid = '1', supplierdate = '2026-10-06 18:05:23'   WHERE supplierid = '88';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('88', '0.00', '170400', '0', 'اضافة فاتورة مشتريات', '37', '170400', '2026-10-06 18:05:23', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','172320','1','0','170400','170400','0',''); -- id=158
UPDATE dailyentry SET totalcreditor = '172320.00', totaldebtor = '172320.00', thedate = '2026-10-06', userid = '1', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-06 16:53:54', entryComment = 'اضافة فاتورة مشتريات رقم 35', fromFlag = '1',related='0',isopeningentry='0',operationId='35',operationDetailLink='buyBillController.php?do=details&id=35' WHERE id = '1166';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '172320.00', '172320.00', '2026-10-06', '1', '0', '1166', '2026-10-06 18:05:23','تم عكس القيد رقم 1166 ','1','0','0','0','0',''); -- id=1170
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1170', '382', '172320.00', '','0'); -- id=1170
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15367868.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1170', '569', '172320.00', '','0'); -- id=1176
UPDATE accountstree SET name = 'بيدو الالماني', customName = 'بيدو الالماني', customNameEn = 'بيدو الالماني', nameEn = 'بيدو الالماني', parent = '81', accountNature = '1', theValue = '0', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-06 16:49:11' WHERE id = '569';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '170400', '170400', '2026-10-06', '1', '0', '0', '2026-10-06 18:05:23','اضافة فاتورة مشتريات رقم 37','1','0',null,'0','37','buyBillController.php?do=details&id=37'); -- id=1171
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1171', '382', '170400', '','0'); -- id=1177
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15538268.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1171', '569', '170400', '','0'); -- id=1171
UPDATE accountstree SET name = 'بيدو الالماني', customName = 'بيدو الالماني', customNameEn = 'بيدو الالماني', nameEn = 'بيدو الالماني', parent = '81', accountNature = '1', theValue = '170400', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-06 16:49:11' WHERE id = '569';
update buybill set dailyentryid='1171,0' where buybillid=37;
UPDATE product SET overAllAveragePrice = 1200 WHERE productId = 1475;UPDATE product SET overAllAveragePrice = 1000 WHERE productId = 1476;UPDATE product SET overAllAveragePrice = 500 WHERE productId = 1477;UPDATE product SET overAllAveragePrice = 450 WHERE productId = 1478;UPDATE product SET overAllAveragePrice = 500 WHERE productId = 1479;UPDATE product SET overAllAveragePrice = 620 WHERE productId = 1480;UPDATE product SET overAllAveragePrice = 580 WHERE productId = 1481;UPDATE product SET overAllAveragePrice = 600 WHERE productId = 1482;;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:35:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:05:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:05:23', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=37'); -- id=3431
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:37:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:07:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 18:07:03', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php'); -- id=3432
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:37:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:07:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 18:07:03', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=3433
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:37:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:07:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 18:07:12', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=3434
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:37:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:07:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 18:07:22', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=3435
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:38:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:08:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 18:08:32', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=3436
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:44:06";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:44:06";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:44:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:14:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 18:14:08', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3437
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:44:08";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 18:14:08', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3438
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:44:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:14:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientdebt.php', '2026-10-06 18:14:23', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientdebt.php'); -- id=3439
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:44:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:14:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientdebt.php', '2026-10-06 18:14:23', '1', 'showallajax', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientdebt.php?do=showallajax'); -- id=3440
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:45:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:15:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientReportsController.php', '2026-10-06 18:15:03', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientReportsController.php?do=show'); -- id=3441
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:45:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:15:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientController.php', '2026-10-06 18:15:16', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientController.php?do=show'); -- id=3442
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:51:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:21:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:21:17', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3443
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:51:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:21:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:21:46', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3444
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:52:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:22:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:22:01', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3445
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:52:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:22:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:22:58', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3446
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:53:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:23:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:23:51', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3447
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:55:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:25:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:25:00', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3448
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:55:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:25:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:25:41', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3449
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:56:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:26:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:26:20', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3450
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:57:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:27:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:27:03', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3451
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:57:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:27:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:27:35', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3452
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:58:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:28:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:28:14', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3453
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:58:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:28:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:28:54', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3454
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:59:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:29:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 18:29:13', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3455
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:59:13";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 18:29:13', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3456
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:59:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:29:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:29:16', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3457
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:59:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:29:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:29:49', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3458
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 4900','','108','600','625','625','625','2026-10-06','0','1','0','','0','0','0','0','0','600','600','600','600','600','0','4.17','0','0','.','0','0','0','600','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','600','600','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','600','0','0','0','0','0','0','','','0','0','0','0'); -- id=1508
UPDATE product SET productName = 'جاكت 4900', productDescription = '', productCatId = '108', productBuyPrice = '600', productSellAllPrice = '625', productSellUnitPrice = '625', productSellHalfPrice = '625', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01508',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1508';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1508', '1.00', '2026-10-06', '1', '0','0150801','625','625','625','600','','0','0','0','0','0','0','0','0','0','0'); -- id=1508
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1508', '1', '0', '1', '2026-10-06'); -- id=1533
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1508', '1', '0', '0', '1508', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2371
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1508, 1,'2026-10-06 18:29:49',1)
                ON DUPLICATE KEY UPDATE productid = 1508, edited = 1, sysdate = '2026-10-06 18:29:49', userid = 1; -- id=2302
UPDATE product SET productName = 'جاكت 4900', productDescription = '', productCatId = '108', productBuyPrice = '600.00', productSellAllPrice = '625.00', productSellUnitPrice = '625.00', productSellHalfPrice = '625.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01508',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1508';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 14:59:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:29:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:29:50', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3459
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:00:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:30:08", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-06 18:30:08', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3460
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:00:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:30:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:30:28', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3461
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:00:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:30:41", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 18:30:41', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3462
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:01:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:31:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:31:36', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3463
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:02:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:32:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:32:21', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3464
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:03:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:33:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:33:11', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3465
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:05:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:35:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:35:49', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3466
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:06:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:36:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:36:27', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3467
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:07:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:37:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:37:25', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3468
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:08:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:38:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:38:02', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3469
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:09:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:39:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:39:03', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3470
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:11:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:41:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 18:41:50', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php'); -- id=3471
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:11:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:41:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 18:41:50', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=3472
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:11:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:41:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:41:54', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3473
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('بيج بوص', '', '', '', '', '0', '1', '2026-10-06 18:42:10', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=90
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('90', '0', '', '0', 'إضافة مورد جديد', '90', '', '2026-10-06 18:42:10', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=159
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('بيج بوص', 'بيج بوص', 'بيج بوص', 'بيج بوص', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 18:42:10'); -- id=571
UPDATE supplier SET suppliername = 'بيج بوص', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='571',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '90';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:16:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:46:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:46:14', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3474
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac516c266824', '2026-10-06 18:41:54', '90', '0.00', '162540', '10', '1', '180600.00',  '162540.00', '0', '162540', '1', '2026-10-06 18:46:14', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=38
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01468', '38', '105', '1468', '36', '380', '13680.00', '0', '', '2026-10-06 18:46:14', '1468','','','0','0','0','0','0',null,'380','13680','0','0','0','0','0','0','0','0','1'); -- id=198
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1468, 0, 0
                    , 342, 36, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 342,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=274
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1468', '380', '36', '0', 'buyBillController.php', '198', '', '0', '0'); -- id=156
UPDATE product SET  productBuyPrice = "380" WHERE productId = 1468 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 198 ;
UPDATE product SET productName = 'موديل بيج بوص 380', productDescription = '', productCatId = '105', productBuyPrice = '380.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01468',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '342',meanbuyprice = '380',meanbuyprice_withDiscount = '342' , productbuypricereal = '380.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='342',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1468';
UPDATE buybilldetail SET  lastbuyprice = 380 , meanbuyprice = 380, lastbuyprice_withDiscount = 342, meanbuyprice_withDiscount = 342
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 342
                where buybilldetailid = 198;
UPDATE productunit SET proUnitBuyPrice  = 380 * productnumber WHERE productid = 1468;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1493';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1468', '1', '36', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-06 18:41:54','0','0'); -- id=2372
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01469', '38', '105', '1469', '36', '420', '15120.00', '0', '', '2026-10-06 18:46:14', '1469','','','0','0','0','0','0',null,'420','15120','0','0','0','0','0','0','0','0','1'); -- id=199
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1469, 0, 0
                    , 378, 36, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 378,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=275
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1469', '420', '36', '0', 'buyBillController.php', '199', '', '0', '0'); -- id=157
UPDATE product SET  productBuyPrice = "420" WHERE productId = 1469 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 199 ;
UPDATE product SET productName = 'موديل بيج بوص 420', productDescription = '', productCatId = '105', productBuyPrice = '420.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01469',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '378',meanbuyprice = '420',meanbuyprice_withDiscount = '378' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='378',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1469';
UPDATE buybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 378, meanbuyprice_withDiscount = 378
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 378
                where buybilldetailid = 199;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1469;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1494';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1469', '1', '36', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-06 18:41:54','0','0'); -- id=2373
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01468', '38', '105', '1468', '36', '380', '13680.00', '0', '', '2026-10-06 18:46:14', '1468','','','0','0','0','0','0',null,'380','13680','0','0','0','0','0','0','0','0','1'); -- id=200
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1468, 0, 0
                    , 342, 36, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 342,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=274
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1468', '380', '36', '0', 'buyBillController.php', '200', '', '0', '0'); -- id=158
UPDATE product SET  productBuyPrice = "380" WHERE productId = 1468 ;
UPDATE buybilldetail SET  quantitybefore = 36 WHERE buybilldetailid = 200 ;
UPDATE product SET productName = 'موديل بيج بوص 380', productDescription = '', productCatId = '105', productBuyPrice = '380.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01468',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '342',meanbuyprice = '380',meanbuyprice_withDiscount = '342' , productbuypricereal = '380.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='342',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1468';
UPDATE buybilldetail SET  lastbuyprice = 380 , meanbuyprice = 380, lastbuyprice_withDiscount = 342, meanbuyprice_withDiscount = 342
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 342
                where buybilldetailid = 200;
UPDATE productunit SET proUnitBuyPrice  = 380 * productnumber WHERE productid = 1468;
UPDATE storedetail SET  productquantity = '72', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1493';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1468', '1', '36', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '36', '72', '1', '2026-10-06 18:41:54','0','0'); -- id=2374
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01469', '38', '105', '1469', '36', '420', '15120.00', '0', '', '2026-10-06 18:46:14', '1469','','','0','0','0','0','0',null,'420','15120','0','0','0','0','0','0','0','0','1'); -- id=201
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1469, 0, 0
                    , 378, 36, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 378,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=275
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1469', '420', '36', '0', 'buyBillController.php', '201', '', '0', '0'); -- id=159
UPDATE product SET  productBuyPrice = "420" WHERE productId = 1469 ;
UPDATE buybilldetail SET  quantitybefore = 36 WHERE buybilldetailid = 201 ;
UPDATE product SET productName = 'موديل بيج بوص 420', productDescription = '', productCatId = '105', productBuyPrice = '420.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01469',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '378',meanbuyprice = '420',meanbuyprice_withDiscount = '378' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='378',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1469';
UPDATE buybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 378, meanbuyprice_withDiscount = 378
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 378
                where buybilldetailid = 201;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1469;
UPDATE storedetail SET  productquantity = '72', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1494';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1469', '1', '36', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '36', '72', '1', '2026-10-06 18:41:54','0','0'); -- id=2375
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01470', '38', '105', '1470', '36', '390', '14040.00', '0', '', '2026-10-06 18:46:14', '1470','','','0','0','0','0','0',null,'390','14040','0','0','0','0','0','0','0','0','1'); -- id=202
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1470, 0, 0
                    , 351, 36, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 351,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=278
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1470', '390', '36', '0', 'buyBillController.php', '202', '', '0', '0'); -- id=160
UPDATE product SET  productBuyPrice = "390" WHERE productId = 1470 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 202 ;
UPDATE product SET productName = 'موديل بيج بوص 390', productDescription = '', productCatId = '105', productBuyPrice = '390.00', productSellAllPrice = '390.00', productSellUnitPrice = '390.00', productSellHalfPrice = '390.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01470',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '351',meanbuyprice = '390',meanbuyprice_withDiscount = '351' , productbuypricereal = '390.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='351',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1470';
UPDATE buybilldetail SET  lastbuyprice = 390 , meanbuyprice = 390, lastbuyprice_withDiscount = 351, meanbuyprice_withDiscount = 351
        , lastbuyprice_withTax = 390, meanbuyprice_withTax = 390, lastbuyprice_withDiscountAndTax = 351
                where buybilldetailid = 202;
UPDATE productunit SET proUnitBuyPrice  = 390 * productnumber WHERE productid = 1470;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1495';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1470', '1', '36', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-06 18:41:54','0','0'); -- id=2376
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01471', '38', '105', '1471', '36', '460', '16560.00', '0', '', '2026-10-06 18:46:14', '1471','','','0','0','0','0','0',null,'460','16560','0','0','0','0','0','0','0','0','1'); -- id=203
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1471, 0, 0
                    , 414, 36, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 414,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=279
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1471', '460', '36', '0', 'buyBillController.php', '203', '', '0', '0'); -- id=161
UPDATE product SET  productBuyPrice = "460" WHERE productId = 1471 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 203 ;
UPDATE product SET productName = 'موديل بيج بوص 460', productDescription = '', productCatId = '105', productBuyPrice = '460.00', productSellAllPrice = '460.00', productSellUnitPrice = '460.00', productSellHalfPrice = '460.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01471',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '460',lastbuyprice_withDiscount = '414',meanbuyprice = '460',meanbuyprice_withDiscount = '414' , productbuypricereal = '460.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='460',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='460',meanbuyprice_withTax='460',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='414',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1471';
UPDATE buybilldetail SET  lastbuyprice = 460 , meanbuyprice = 460, lastbuyprice_withDiscount = 414, meanbuyprice_withDiscount = 414
        , lastbuyprice_withTax = 460, meanbuyprice_withTax = 460, lastbuyprice_withDiscountAndTax = 414
                where buybilldetailid = 203;
UPDATE productunit SET proUnitBuyPrice  = 460 * productnumber WHERE productid = 1471;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1496';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1471', '1', '36', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-06 18:41:54','0','0'); -- id=2377
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01469', '38', '105', '1469', '36', '420', '15120.00', '0', '', '2026-10-06 18:46:14', '1469','','','0','0','0','0','0',null,'420','15120','0','0','0','0','0','0','0','0','1'); -- id=204
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1469, 0, 0
                    , 378, 36, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 378,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=275
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1469', '420', '36', '0', 'buyBillController.php', '204', '', '0', '0'); -- id=162
UPDATE product SET  productBuyPrice = "420" WHERE productId = 1469 ;
UPDATE buybilldetail SET  quantitybefore = 72 WHERE buybilldetailid = 204 ;
UPDATE product SET productName = 'موديل بيج بوص 420', productDescription = '', productCatId = '105', productBuyPrice = '420.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01469',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '378',meanbuyprice = '420',meanbuyprice_withDiscount = '378' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='378',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1469';
UPDATE buybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 378, meanbuyprice_withDiscount = 378
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 378
                where buybilldetailid = 204;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1469;
UPDATE storedetail SET  productquantity = '108', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1494';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1469', '1', '36', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '72', '108', '1', '2026-10-06 18:41:54','0','0'); -- id=2378
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01468', '38', '105', '1468', '30', '380', '11400.00', '0', '', '2026-10-06 18:46:14', '1468','','','0','0','0','0','0',null,'380','11400','0','0','0','0','0','0','0','0','1'); -- id=205
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1468, 0, 0
                    , 342, 30, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 342,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=274
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1468', '380', '30', '0', 'buyBillController.php', '205', '', '0', '0'); -- id=163
UPDATE product SET  productBuyPrice = "380" WHERE productId = 1468 ;
UPDATE buybilldetail SET  quantitybefore = 72 WHERE buybilldetailid = 205 ;
UPDATE product SET productName = 'موديل بيج بوص 380', productDescription = '', productCatId = '105', productBuyPrice = '380.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01468',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '342',meanbuyprice = '380',meanbuyprice_withDiscount = '342' , productbuypricereal = '380.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='342',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1468';
UPDATE buybilldetail SET  lastbuyprice = 380 , meanbuyprice = 380, lastbuyprice_withDiscount = 342, meanbuyprice_withDiscount = 342
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 342
                where buybilldetailid = 205;
UPDATE productunit SET proUnitBuyPrice  = 380 * productnumber WHERE productid = 1468;
UPDATE storedetail SET  productquantity = '102', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1493';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1468', '1', '30', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '72', '102', '1', '2026-10-06 18:41:54','0','0'); -- id=2379
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01472', '38', '105', '1472', '36', '320', '11520.00', '0', '', '2026-10-06 18:46:14', '1472','','','0','0','0','0','0',null,'320','11520','0','0','0','0','0','0','0','0','1'); -- id=206
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1472, 0, 0
                    , 288, 36, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 288,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=282
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1472', '320', '36', '0', 'buyBillController.php', '206', '', '0', '0'); -- id=164
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1472 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 206 ;
UPDATE product SET productName = 'موديل بيج بوص 320', productDescription = '', productCatId = '105', productBuyPrice = '320.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01472',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '288',meanbuyprice = '320',meanbuyprice_withDiscount = '288' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='288',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1472';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 288, meanbuyprice_withDiscount = 288
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 288
                where buybilldetailid = 206;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1472;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1497';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1472', '1', '36', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-06 18:41:54','0','0'); -- id=2380
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01472', '38', '105', '1472', '36', '320', '11520.00', '0', '', '2026-10-06 18:46:14', '1472','','','0','0','0','0','0',null,'320','11520','0','0','0','0','0','0','0','0','1'); -- id=207
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1472, 0, 0
                    , 288, 36, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 288,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=282
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1472', '320', '36', '0', 'buyBillController.php', '207', '', '0', '0'); -- id=165
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1472 ;
UPDATE buybilldetail SET  quantitybefore = 36 WHERE buybilldetailid = 207 ;
UPDATE product SET productName = 'موديل بيج بوص 320', productDescription = '', productCatId = '105', productBuyPrice = '320.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01472',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '288',meanbuyprice = '320',meanbuyprice_withDiscount = '288' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='288',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1472';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 288, meanbuyprice_withDiscount = 288
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 288
                where buybilldetailid = 207;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1472;
UPDATE storedetail SET  productquantity = '72', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1497';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1472', '1', '36', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '36', '72', '1', '2026-10-06 18:41:54','0','0'); -- id=2381
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01472', '38', '105', '1472', '36', '320', '11520.00', '0', '', '2026-10-06 18:46:14', '1472','','','0','0','0','0','0',null,'320','11520','0','0','0','0','0','0','0','0','1'); -- id=208
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1472, 0, 0
                    , 288, 36, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 288,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=282
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1472', '320', '36', '0', 'buyBillController.php', '208', '', '0', '0'); -- id=166
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1472 ;
UPDATE buybilldetail SET  quantitybefore = 72 WHERE buybilldetailid = 208 ;
UPDATE product SET productName = 'موديل بيج بوص 320', productDescription = '', productCatId = '105', productBuyPrice = '320.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01472',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '288',meanbuyprice = '320',meanbuyprice_withDiscount = '288' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='288',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1472';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 288, meanbuyprice_withDiscount = 288
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 288
                where buybilldetailid = 208;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1472;
UPDATE storedetail SET  productquantity = '108', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1497';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1472', '1', '36', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '72', '108', '1', '2026-10-06 18:41:54','0','0'); -- id=2382
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01473', '38', '105', '1473', '36', '440', '15840.00', '0', '', '2026-10-06 18:46:14', '1473','','','0','0','0','0','0',null,'440','15840','0','0','0','0','0','0','0','0','1'); -- id=209
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1473, 0, 0
                    , 396, 36, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 396,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=285
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1473', '440', '36', '0', 'buyBillController.php', '209', '', '0', '0'); -- id=167
UPDATE product SET  productBuyPrice = "440" WHERE productId = 1473 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 209 ;
UPDATE product SET productName = 'موديل بيج بوص 440', productDescription = '', productCatId = '105', productBuyPrice = '440.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01473',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '440',lastbuyprice_withDiscount = '396',meanbuyprice = '440',meanbuyprice_withDiscount = '396' , productbuypricereal = '440.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='440',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='440',meanbuyprice_withTax='440',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='396',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1473';
UPDATE buybilldetail SET  lastbuyprice = 440 , meanbuyprice = 440, lastbuyprice_withDiscount = 396, meanbuyprice_withDiscount = 396
        , lastbuyprice_withTax = 440, meanbuyprice_withTax = 440, lastbuyprice_withDiscountAndTax = 396
                where buybilldetailid = 209;
UPDATE productunit SET proUnitBuyPrice  = 440 * productnumber WHERE productid = 1473;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1498';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1473', '1', '36', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-06 18:41:54','0','0'); -- id=2383
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01474', '38', '105', '1474', '36', '430', '15480.00', '0', '', '2026-10-06 18:46:14', '1474','','','0','0','0','0','0',null,'430','15480','0','0','0','0','0','0','0','0','1'); -- id=210
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:41:54', 1, 1474, 0, 0
                    , 387, 36, 0, 0, 1, '2026-10-06 18:46:14')
                ON DUPLICATE KEY UPDATE buyprice = 387,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:46:14' ; -- id=286
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1474', '430', '36', '0', 'buyBillController.php', '210', '', '0', '0'); -- id=168
UPDATE product SET  productBuyPrice = "430" WHERE productId = 1474 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 210 ;
UPDATE product SET productName = 'موديل بيج بوص 430', productDescription = '', productCatId = '105', productBuyPrice = '430.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01474',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '387',meanbuyprice = '430',meanbuyprice_withDiscount = '387' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='387',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1474';
UPDATE buybilldetail SET  lastbuyprice = 430 , meanbuyprice = 430, lastbuyprice_withDiscount = 387, meanbuyprice_withDiscount = 387
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 430, lastbuyprice_withDiscountAndTax = 387
                where buybilldetailid = 210;
UPDATE productunit SET proUnitBuyPrice  = 430 * productnumber WHERE productid = 1474;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1499';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1474', '1', '36', '0', '38', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-06 18:41:54','0','0'); -- id=2384
UPDATE supplier SET  suppliercurrentDebt = '162540',suppliercurrentDebtInCurrency= '162540' , userid = '1', supplierdate = '2026-10-06 18:46:14'   WHERE supplierid = '90';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('90', '0.00', '162540', '0', 'اضافة فاتورة مشتريات', '38', '162540', '2026-10-06 18:41:54', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','162540','1','0','162540','162540','0',''); -- id=160
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '162540', '162540', '2026-10-06', '1', '0', '0', '2026-10-06 18:46:14','اضافة فاتورة مشتريات رقم 38','1','0',null,'0','38','buyBillController.php?do=details&id=38'); -- id=1172
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1172', '382', '162540', '','0'); -- id=1178
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15700808.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1172', '571', '162540', '','0'); -- id=1172
UPDATE accountstree SET name = 'بيج بوص', customName = 'بيج بوص', customNameEn = 'بيج بوص', nameEn = 'بيج بوص', parent = '81', accountNature = '1', theValue = '162540', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-06 18:42:10' WHERE id = '571';
update buybill set dailyentryid='1172,0' where buybillid=38;
COMMIT;
UPDATE product SET overAllAveragePrice = 342 WHERE productId = 1468;UPDATE product SET overAllAveragePrice = 378 WHERE productId = 1469;UPDATE product SET overAllAveragePrice = 351 WHERE productId = 1470;UPDATE product SET overAllAveragePrice = 414 WHERE productId = 1471;UPDATE product SET overAllAveragePrice = 288 WHERE productId = 1472;UPDATE product SET overAllAveragePrice = 396 WHERE productId = 1473;UPDATE product SET overAllAveragePrice = 387 WHERE productId = 1474;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:16:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:46:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:46:14', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=38'); -- id=3475
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:17:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:47:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 18:47:19', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3476
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:17:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:47:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 18:47:44', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3477
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('نانو','2026-10-06','','90', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=109
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (109, 1,'2026-10-06 18:47:44',1)
                ON DUPLICATE KEY UPDATE catid = 109, edited = 1, sysdate = '2026-10-06 18:47:44', userid = 1; -- id=111
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '109', '1', '2026-10-06', '1', '0'); -- id=23
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:17:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:47:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 18:47:45', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3478
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:17:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:47:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 18:47:46', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3479
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:17:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:47:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:47:49', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3480
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:20:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:50:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:50:29', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3481
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 1015','','109','720','750','750','750','2026-10-06','0','1','0','','0','0','0','0','0','720','720','720','720','720','0','4.17','0','0','.','0','0','0','720','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','720','720','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','720','0','0','0','0','0','0','','','0','0','0','0'); -- id=1509
UPDATE product SET productName = 'جاكت 1015', productDescription = '', productCatId = '109', productBuyPrice = '720', productSellAllPrice = '750', productSellUnitPrice = '750', productSellHalfPrice = '750', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01509',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '720',lastbuyprice_withDiscount = '720',meanbuyprice = '720',meanbuyprice_withDiscount = '720' , productbuypricereal = '720' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='720',meanbuyprice_withTax='720',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1509';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1509', '1.00', '2026-10-06', '1', '0','0150901','750','750','750','720','','0','0','0','0','0','0','0','0','0','0'); -- id=1509
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1509', '1', '0', '1', '2026-10-06'); -- id=1534
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1509', '1', '0', '0', '1509', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2385
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1509, 1,'2026-10-06 18:50:29',1)
                ON DUPLICATE KEY UPDATE productid = 1509, edited = 1, sysdate = '2026-10-06 18:50:29', userid = 1; -- id=2303
UPDATE product SET productName = 'جاكت 1015', productDescription = '', productCatId = '109', productBuyPrice = '720.00', productSellAllPrice = '750.00', productSellUnitPrice = '750.00', productSellHalfPrice = '750.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01509',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '720',lastbuyprice_withDiscount = '720',meanbuyprice = '720',meanbuyprice_withDiscount = '720' , productbuypricereal = '720' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='720',meanbuyprice_withTax='720',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1509';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 3010','','109','720','750','750','750','2026-10-06','0','1','0','','0','0','0','0','0','720','720','720','720','720','0','4.17','0','0','.','0','0','0','720','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','720','720','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','720','0','0','0','0','0','0','','','0','0','0','0'); -- id=1510
UPDATE product SET productName = 'جاكت 3010', productDescription = '', productCatId = '109', productBuyPrice = '720', productSellAllPrice = '750', productSellUnitPrice = '750', productSellHalfPrice = '750', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01510',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '720',lastbuyprice_withDiscount = '720',meanbuyprice = '720',meanbuyprice_withDiscount = '720' , productbuypricereal = '720' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='720',meanbuyprice_withTax='720',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1510';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1510', '1.00', '2026-10-06', '1', '0','0151001','750','750','750','720','','0','0','0','0','0','0','0','0','0','0'); -- id=1510
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1510', '1', '0', '1', '2026-10-06'); -- id=1535
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1510', '1', '0', '0', '1510', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2386
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1510, 1,'2026-10-06 18:50:29',1)
                ON DUPLICATE KEY UPDATE productid = 1510, edited = 1, sysdate = '2026-10-06 18:50:29', userid = 1; -- id=2304
UPDATE product SET productName = 'جاكت 3010', productDescription = '', productCatId = '109', productBuyPrice = '720.00', productSellAllPrice = '750.00', productSellUnitPrice = '750.00', productSellHalfPrice = '750.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01510',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '720',lastbuyprice_withDiscount = '720',meanbuyprice = '720',meanbuyprice_withDiscount = '720' , productbuypricereal = '720' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='720',meanbuyprice_withTax='720',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1510';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 3040','','109','670','700','700','700','2026-10-06','0','1','0','','0','0','0','0','0','670','670','670','670','670','0','4.48','0','0','.','0','0','0','670','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','670','670','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','670','0','0','0','0','0','0','','','0','0','0','0'); -- id=1511
UPDATE product SET productName = 'جاكت 3040', productDescription = '', productCatId = '109', productBuyPrice = '670', productSellAllPrice = '700', productSellUnitPrice = '700', productSellHalfPrice = '700', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01511',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '670',lastbuyprice_withDiscount = '670',meanbuyprice = '670',meanbuyprice_withDiscount = '670' , productbuypricereal = '670' , buypricereal_precentage = '0' , buytotal_precentage = '4.48' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='670',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='670',meanbuyprice_withTax='670',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='670',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1511';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1511', '1.00', '2026-10-06', '1', '0','0151101','700','700','700','670','','0','0','0','0','0','0','0','0','0','0'); -- id=1511
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1511', '1', '0', '1', '2026-10-06'); -- id=1536
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1511', '1', '0', '0', '1511', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2387
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1511, 1,'2026-10-06 18:50:29',1)
                ON DUPLICATE KEY UPDATE productid = 1511, edited = 1, sysdate = '2026-10-06 18:50:29', userid = 1; -- id=2305
UPDATE product SET productName = 'جاكت 3040', productDescription = '', productCatId = '109', productBuyPrice = '670.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01511',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '670',lastbuyprice_withDiscount = '670',meanbuyprice = '670',meanbuyprice_withDiscount = '670' , productbuypricereal = '670' , buypricereal_precentage = '0' , buytotal_precentage = '4.48' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='670',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='670',meanbuyprice_withTax='670',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='670',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1511';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 3020','','109','640','670','670','670','2026-10-06','0','1','0','','0','0','0','0','0','640','640','640','640','640','0','4.69','0','0','.','0','0','0','640','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','640','640','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','640','0','0','0','0','0','0','','','0','0','0','0'); -- id=1512
UPDATE product SET productName = 'جاكت 3020', productDescription = '', productCatId = '109', productBuyPrice = '640', productSellAllPrice = '670', productSellUnitPrice = '670', productSellHalfPrice = '670', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01512',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '640',lastbuyprice_withDiscount = '640',meanbuyprice = '640',meanbuyprice_withDiscount = '640' , productbuypricereal = '640' , buypricereal_precentage = '0' , buytotal_precentage = '4.69' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='640',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='640',meanbuyprice_withTax='640',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='640',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1512';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1512', '1.00', '2026-10-06', '1', '0','0151201','670','670','670','640','','0','0','0','0','0','0','0','0','0','0'); -- id=1512
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1512', '1', '0', '1', '2026-10-06'); -- id=1537
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1512', '1', '0', '0', '1512', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2388
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1512, 1,'2026-10-06 18:50:29',1)
                ON DUPLICATE KEY UPDATE productid = 1512, edited = 1, sysdate = '2026-10-06 18:50:29', userid = 1; -- id=2306
UPDATE product SET productName = 'جاكت 3020', productDescription = '', productCatId = '109', productBuyPrice = '640.00', productSellAllPrice = '670.00', productSellUnitPrice = '670.00', productSellHalfPrice = '670.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01512',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '640',lastbuyprice_withDiscount = '640',meanbuyprice = '640',meanbuyprice_withDiscount = '640' , productbuypricereal = '640' , buypricereal_precentage = '0' , buytotal_precentage = '4.69' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='640',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='640',meanbuyprice_withTax='640',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='640',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1512';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 2020','','109','630','660','660','660','2026-10-06','0','1','0','','0','0','0','0','0','630','630','630','630','630','0','4.76','0','0','.','0','0','0','630','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','630','630','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','630','0','0','0','0','0','0','','','0','0','0','0'); -- id=1513
UPDATE product SET productName = 'جاكت 2020', productDescription = '', productCatId = '109', productBuyPrice = '630', productSellAllPrice = '660', productSellUnitPrice = '660', productSellHalfPrice = '660', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01513',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '630',lastbuyprice_withDiscount = '630',meanbuyprice = '630',meanbuyprice_withDiscount = '630' , productbuypricereal = '630' , buypricereal_precentage = '0' , buytotal_precentage = '4.76' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='630',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='630',meanbuyprice_withTax='630',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='630',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1513';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1513', '1.00', '2026-10-06', '1', '0','0151301','660','660','660','630','','0','0','0','0','0','0','0','0','0','0'); -- id=1513
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1513', '1', '0', '1', '2026-10-06'); -- id=1538
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1513', '1', '0', '0', '1513', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2389
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1513, 1,'2026-10-06 18:50:29',1)
                ON DUPLICATE KEY UPDATE productid = 1513, edited = 1, sysdate = '2026-10-06 18:50:29', userid = 1; -- id=2307
UPDATE product SET productName = 'جاكت 2020', productDescription = '', productCatId = '109', productBuyPrice = '630.00', productSellAllPrice = '660.00', productSellUnitPrice = '660.00', productSellHalfPrice = '660.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01513',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '630',lastbuyprice_withDiscount = '630',meanbuyprice = '630',meanbuyprice_withDiscount = '630' , productbuypricereal = '630' , buypricereal_precentage = '0' , buytotal_precentage = '4.76' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='630',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='630',meanbuyprice_withTax='630',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='630',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1513';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 2090','','109','690','720','720','720','2026-10-06','0','1','0','','0','0','0','0','0','690','690','690','690','690','0','4.35','0','0','.','0','0','0','690','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','690','690','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','690','0','0','0','0','0','0','','','0','0','0','0'); -- id=1514
UPDATE product SET productName = 'جاكت 2090', productDescription = '', productCatId = '109', productBuyPrice = '690', productSellAllPrice = '720', productSellUnitPrice = '720', productSellHalfPrice = '720', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01514',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '690',lastbuyprice_withDiscount = '690',meanbuyprice = '690',meanbuyprice_withDiscount = '690' , productbuypricereal = '690' , buypricereal_precentage = '0' , buytotal_precentage = '4.35' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='690',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='690',meanbuyprice_withTax='690',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='690',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1514';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1514', '1.00', '2026-10-06', '1', '0','0151401','720','720','720','690','','0','0','0','0','0','0','0','0','0','0'); -- id=1514
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1514', '1', '0', '1', '2026-10-06'); -- id=1539
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1514', '1', '0', '0', '1514', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2390
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1514, 1,'2026-10-06 18:50:29',1)
                ON DUPLICATE KEY UPDATE productid = 1514, edited = 1, sysdate = '2026-10-06 18:50:29', userid = 1; -- id=2308
UPDATE product SET productName = 'جاكت 2090', productDescription = '', productCatId = '109', productBuyPrice = '690.00', productSellAllPrice = '720.00', productSellUnitPrice = '720.00', productSellHalfPrice = '720.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01514',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '690',lastbuyprice_withDiscount = '690',meanbuyprice = '690',meanbuyprice_withDiscount = '690' , productbuypricereal = '690' , buypricereal_precentage = '0' , buytotal_precentage = '4.35' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='690',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='690',meanbuyprice_withTax='690',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='690',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1514';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:20:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:50:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:50:30', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3482
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:21:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:51:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:51:46', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3483
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('نانو', '', '', '', '', '0', '1', '2026-10-06 18:51:58', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=91
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('91', '0', '', '0', 'إضافة مورد جديد', '91', '', '2026-10-06 18:51:58', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=161
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('نانو', 'نانو', 'نانو', 'نانو', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 18:51:58'); -- id=572
UPDATE supplier SET suppliername = 'نانو', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='572',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '91';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:23:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:53:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:53:08', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3484
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac51912df643', '2026-10-06 18:51:46', '91', '0.00', '145020', '0', '0', '145020.00',  '145020.00', '0', '145020', '1', '2026-10-06 18:53:08', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=39
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01509', '39', '109', '1509', '51', '720', '36720.00', '0', '', '2026-10-06 18:53:08', '1509','','','0','0','0','0','0',null,'720','36720','0','0','0','0','0','0','0','0','1'); -- id=211
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:51:46', 1, 1509, 0, 0
                    , 720, 51, 0, 0, 1, '2026-10-06 18:53:08')
                ON DUPLICATE KEY UPDATE buyprice = 720,
                        buyQuantity =buyQuantity+51, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:53:08' ; -- id=287
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1509', '720', '51', '0', 'buyBillController.php', '211', '', '0', '0'); -- id=169
UPDATE product SET  productBuyPrice = "720" WHERE productId = 1509 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 211 ;
UPDATE product SET productName = 'جاكت 1015', productDescription = '', productCatId = '109', productBuyPrice = '720.00', productSellAllPrice = '750.00', productSellUnitPrice = '750.00', productSellHalfPrice = '750.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01509',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '720',lastbuyprice_withDiscount = '720',meanbuyprice = '720',meanbuyprice_withDiscount = '720' , productbuypricereal = '720.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='720',meanbuyprice_withTax='720',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1509';
UPDATE buybilldetail SET  lastbuyprice = 720 , meanbuyprice = 720, lastbuyprice_withDiscount = 720, meanbuyprice_withDiscount = 720
        , lastbuyprice_withTax = 720, meanbuyprice_withTax = 720, lastbuyprice_withDiscountAndTax = 720
                where buybilldetailid = 211;
UPDATE productunit SET proUnitBuyPrice  = 720 * productnumber WHERE productid = 1509;
UPDATE storedetail SET  productquantity = '51', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1534';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1509', '1', '51', '0', '39', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '51', '1', '2026-10-06 18:51:46','0','0'); -- id=2391
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01510', '39', '109', '1510', '30', '720', '21600.00', '0', '', '2026-10-06 18:53:08', '1510','','','0','0','0','0','0',null,'720','21600','0','0','0','0','0','0','0','0','1'); -- id=212
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:51:46', 1, 1510, 0, 0
                    , 720, 30, 0, 0, 1, '2026-10-06 18:53:08')
                ON DUPLICATE KEY UPDATE buyprice = 720,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:53:08' ; -- id=288
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1510', '720', '30', '0', 'buyBillController.php', '212', '', '0', '0'); -- id=170
UPDATE product SET  productBuyPrice = "720" WHERE productId = 1510 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 212 ;
UPDATE product SET productName = 'جاكت 3010', productDescription = '', productCatId = '109', productBuyPrice = '720.00', productSellAllPrice = '750.00', productSellUnitPrice = '750.00', productSellHalfPrice = '750.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01510',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '720',lastbuyprice_withDiscount = '720',meanbuyprice = '720',meanbuyprice_withDiscount = '720' , productbuypricereal = '720.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='720',meanbuyprice_withTax='720',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1510';
UPDATE buybilldetail SET  lastbuyprice = 720 , meanbuyprice = 720, lastbuyprice_withDiscount = 720, meanbuyprice_withDiscount = 720
        , lastbuyprice_withTax = 720, meanbuyprice_withTax = 720, lastbuyprice_withDiscountAndTax = 720
                where buybilldetailid = 212;
UPDATE productunit SET proUnitBuyPrice  = 720 * productnumber WHERE productid = 1510;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1535';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1510', '1', '30', '0', '39', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-06 18:51:46','0','0'); -- id=2392
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01511', '39', '109', '1511', '36', '670', '24120.00', '0', '', '2026-10-06 18:53:08', '1511','','','0','0','0','0','0',null,'670','24120','0','0','0','0','0','0','0','0','1'); -- id=213
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:51:46', 1, 1511, 0, 0
                    , 670, 36, 0, 0, 1, '2026-10-06 18:53:08')
                ON DUPLICATE KEY UPDATE buyprice = 670,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:53:08' ; -- id=289
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1511', '670', '36', '0', 'buyBillController.php', '213', '', '0', '0'); -- id=171
UPDATE product SET  productBuyPrice = "670" WHERE productId = 1511 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 213 ;
UPDATE product SET productName = 'جاكت 3040', productDescription = '', productCatId = '109', productBuyPrice = '670.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01511',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '670',lastbuyprice_withDiscount = '670',meanbuyprice = '670',meanbuyprice_withDiscount = '670' , productbuypricereal = '670.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.48' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='670',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='670',meanbuyprice_withTax='670',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='670',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1511';
UPDATE buybilldetail SET  lastbuyprice = 670 , meanbuyprice = 670, lastbuyprice_withDiscount = 670, meanbuyprice_withDiscount = 670
        , lastbuyprice_withTax = 670, meanbuyprice_withTax = 670, lastbuyprice_withDiscountAndTax = 670
                where buybilldetailid = 213;
UPDATE productunit SET proUnitBuyPrice  = 670 * productnumber WHERE productid = 1511;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1536';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1511', '1', '36', '0', '39', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-06 18:51:46','0','0'); -- id=2393
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01512', '39', '109', '1512', '30', '640', '19200.00', '0', '', '2026-10-06 18:53:08', '1512','','','0','0','0','0','0',null,'640','19200','0','0','0','0','0','0','0','0','1'); -- id=214
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:51:46', 1, 1512, 0, 0
                    , 640, 30, 0, 0, 1, '2026-10-06 18:53:08')
                ON DUPLICATE KEY UPDATE buyprice = 640,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:53:08' ; -- id=290
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1512', '640', '30', '0', 'buyBillController.php', '214', '', '0', '0'); -- id=172
UPDATE product SET  productBuyPrice = "640" WHERE productId = 1512 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 214 ;
UPDATE product SET productName = 'جاكت 3020', productDescription = '', productCatId = '109', productBuyPrice = '640.00', productSellAllPrice = '670.00', productSellUnitPrice = '670.00', productSellHalfPrice = '670.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01512',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '640',lastbuyprice_withDiscount = '640',meanbuyprice = '640',meanbuyprice_withDiscount = '640' , productbuypricereal = '640.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.69' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='640',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='640',meanbuyprice_withTax='640',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='640',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1512';
UPDATE buybilldetail SET  lastbuyprice = 640 , meanbuyprice = 640, lastbuyprice_withDiscount = 640, meanbuyprice_withDiscount = 640
        , lastbuyprice_withTax = 640, meanbuyprice_withTax = 640, lastbuyprice_withDiscountAndTax = 640
                where buybilldetailid = 214;
UPDATE productunit SET proUnitBuyPrice  = 640 * productnumber WHERE productid = 1512;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1537';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1512', '1', '30', '0', '39', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-06 18:51:46','0','0'); -- id=2394
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01513', '39', '109', '1513', '36', '630', '22680.00', '0', '', '2026-10-06 18:53:08', '1513','','','0','0','0','0','0',null,'630','22680','0','0','0','0','0','0','0','0','1'); -- id=215
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:51:46', 1, 1513, 0, 0
                    , 630, 36, 0, 0, 1, '2026-10-06 18:53:08')
                ON DUPLICATE KEY UPDATE buyprice = 630,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:53:08' ; -- id=291
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1513', '630', '36', '0', 'buyBillController.php', '215', '', '0', '0'); -- id=173
UPDATE product SET  productBuyPrice = "630" WHERE productId = 1513 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 215 ;
UPDATE product SET productName = 'جاكت 2020', productDescription = '', productCatId = '109', productBuyPrice = '630.00', productSellAllPrice = '660.00', productSellUnitPrice = '660.00', productSellHalfPrice = '660.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01513',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '630',lastbuyprice_withDiscount = '630',meanbuyprice = '630',meanbuyprice_withDiscount = '630' , productbuypricereal = '630.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.76' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='630',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='630',meanbuyprice_withTax='630',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='630',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1513';
UPDATE buybilldetail SET  lastbuyprice = 630 , meanbuyprice = 630, lastbuyprice_withDiscount = 630, meanbuyprice_withDiscount = 630
        , lastbuyprice_withTax = 630, meanbuyprice_withTax = 630, lastbuyprice_withDiscountAndTax = 630
                where buybilldetailid = 215;
UPDATE productunit SET proUnitBuyPrice  = 630 * productnumber WHERE productid = 1513;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1538';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1513', '1', '36', '0', '39', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-06 18:51:46','0','0'); -- id=2395
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01514', '39', '109', '1514', '30', '690', '20700.00', '0', '', '2026-10-06 18:53:08', '1514','','','0','0','0','0','0',null,'690','20700','0','0','0','0','0','0','0','0','1'); -- id=216
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 18:51:46', 1, 1514, 0, 0
                    , 690, 30, 0, 0, 1, '2026-10-06 18:53:08')
                ON DUPLICATE KEY UPDATE buyprice = 690,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 18:53:08' ; -- id=292
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1514', '690', '30', '0', 'buyBillController.php', '216', '', '0', '0'); -- id=174
UPDATE product SET  productBuyPrice = "690" WHERE productId = 1514 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 216 ;
UPDATE product SET productName = 'جاكت 2090', productDescription = '', productCatId = '109', productBuyPrice = '690.00', productSellAllPrice = '720.00', productSellUnitPrice = '720.00', productSellHalfPrice = '720.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01514',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '690',lastbuyprice_withDiscount = '690',meanbuyprice = '690',meanbuyprice_withDiscount = '690' , productbuypricereal = '690.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.35' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='690',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='690',meanbuyprice_withTax='690',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='690',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1514';
UPDATE buybilldetail SET  lastbuyprice = 690 , meanbuyprice = 690, lastbuyprice_withDiscount = 690, meanbuyprice_withDiscount = 690
        , lastbuyprice_withTax = 690, meanbuyprice_withTax = 690, lastbuyprice_withDiscountAndTax = 690
                where buybilldetailid = 216;
UPDATE productunit SET proUnitBuyPrice  = 690 * productnumber WHERE productid = 1514;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1539';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1514', '1', '30', '0', '39', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-06 18:51:46','0','0'); -- id=2396
UPDATE supplier SET  suppliercurrentDebt = '145020',suppliercurrentDebtInCurrency= '145020' , userid = '1', supplierdate = '2026-10-06 18:53:08'   WHERE supplierid = '91';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('91', '0.00', '145020', '0', 'اضافة فاتورة مشتريات', '39', '145020', '2026-10-06 18:51:46', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','145020','1','0','145020','145020','0',''); -- id=162
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '145020', '145020', '2026-10-06', '1', '0', '0', '2026-10-06 18:53:08','اضافة فاتورة مشتريات رقم 39','1','0',null,'0','39','buyBillController.php?do=details&id=39'); -- id=1173
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1173', '382', '145020', '','0'); -- id=1179
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15845828.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1173', '572', '145020', '','0'); -- id=1173
UPDATE accountstree SET name = 'نانو', customName = 'نانو', customNameEn = 'نانو', nameEn = 'نانو', parent = '81', accountNature = '1', theValue = '145020', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-06 18:51:58' WHERE id = '572';
update buybill set dailyentryid='1173,0' where buybillid=39;
COMMIT;
UPDATE product SET overAllAveragePrice = 720 WHERE productId = 1509;UPDATE product SET overAllAveragePrice = 720 WHERE productId = 1510;UPDATE product SET overAllAveragePrice = 670 WHERE productId = 1511;UPDATE product SET overAllAveragePrice = 640 WHERE productId = 1512;UPDATE product SET overAllAveragePrice = 630 WHERE productId = 1513;UPDATE product SET overAllAveragePrice = 690 WHERE productId = 1514;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:23:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:53:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:53:09', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=39'); -- id=3485
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:23:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:53:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:53:11', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=39&type=2'); -- id=3486
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:26:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:56:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:56:38', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=39&type=2'); -- id=3487
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:26:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:56:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 18:56:40', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=39'); -- id=3488
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:29:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 18:59:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 18:59:54', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3489
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:30:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:00:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 19:00:07', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3490
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:30:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:00:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 19:00:14', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3491
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:30:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:00:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 19:00:32', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3492
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:30:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:00:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 19:00:41', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3493
UPDATE user SET loginip = "" WHERE userid = 4;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:31:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:01:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 19:01:07', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3494
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('جاكت توب سيكرت','2026-10-06','','90', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=110
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (110, 1,'2026-10-06 19:01:07',1)
                ON DUPLICATE KEY UPDATE catid = 110, edited = 1, sysdate = '2026-10-06 19:01:07', userid = 1; -- id=112
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '110', '1', '2026-10-06', '1', '0'); -- id=24
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:31:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:01:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 19:01:07', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3495
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:31:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:01:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 19:01:09', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3496
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:31:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:01:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 19:01:12', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3497
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:31:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:01:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 19:01:51', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3498
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 33','','110','450','475','475','475','2026-10-06','0','1','0','','0','0','0','0','0','450','450','450','450','450','0','5.56','0','0','.','0','0','0','450','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','450','450','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','450','0','0','0','0','0','0','','','0','0','0','0'); -- id=1515
UPDATE product SET productName = 'جاكت 33', productDescription = '', productCatId = '110', productBuyPrice = '450', productSellAllPrice = '475', productSellUnitPrice = '475', productSellHalfPrice = '475', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01515',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '5.56' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1515';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1515', '1.00', '2026-10-06', '1', '0','0151501','475','475','475','450','','0','0','0','0','0','0','0','0','0','0'); -- id=1515
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1515', '1', '0', '1', '2026-10-06'); -- id=1540
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1515', '1', '0', '0', '1515', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2397
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1515, 1,'2026-10-06 19:01:51',1)
                ON DUPLICATE KEY UPDATE productid = 1515, edited = 1, sysdate = '2026-10-06 19:01:51', userid = 1; -- id=2309
UPDATE product SET productName = 'جاكت 33', productDescription = '', productCatId = '110', productBuyPrice = '450.00', productSellAllPrice = '475.00', productSellUnitPrice = '475.00', productSellHalfPrice = '475.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01515',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '5.56' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1515';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 34','','110','450','475','475','475','2026-10-06','0','1','0','','0','0','0','0','0','450','450','450','450','450','0','5.56','0','0','.','0','0','0','450','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','450','450','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','450','0','0','0','0','0','0','','','0','0','0','0'); -- id=1516
UPDATE product SET productName = 'جاكت 34', productDescription = '', productCatId = '110', productBuyPrice = '450', productSellAllPrice = '475', productSellUnitPrice = '475', productSellHalfPrice = '475', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01516',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '5.56' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1516';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1516', '1.00', '2026-10-06', '1', '0','0151601','475','475','475','450','','0','0','0','0','0','0','0','0','0','0'); -- id=1516
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1516', '1', '0', '1', '2026-10-06'); -- id=1541
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1516', '1', '0', '0', '1516', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2398
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1516, 1,'2026-10-06 19:01:51',1)
                ON DUPLICATE KEY UPDATE productid = 1516, edited = 1, sysdate = '2026-10-06 19:01:51', userid = 1; -- id=2310
UPDATE product SET productName = 'جاكت 34', productDescription = '', productCatId = '110', productBuyPrice = '450.00', productSellAllPrice = '475.00', productSellUnitPrice = '475.00', productSellHalfPrice = '475.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01516',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '5.56' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1516';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:31:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:01:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 19:01:53', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3499
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:31:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:01:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 19:01:58', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3500
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:32:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:02:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 19:02:34', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3501
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac51b76a2325', '2026-10-06 19:01:58', '65', '515660.00', '544460', '0', '0', '28800.00',  '28800.00', '0', '28800', '1', '2026-10-06 19:02:34', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=40
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01515', '40', '110', '1515', '32', '450', '14400.00', '0', '', '2026-10-06 19:02:34', '1515','','','0','0','0','0','0',null,'450','14400','0','0','0','0','0','0','0','0','1'); -- id=217
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 19:01:58', 1, 1515, 0, 0
                    , 450, 32, 0, 0, 1, '2026-10-06 19:02:34')
                ON DUPLICATE KEY UPDATE buyprice = 450,
                        buyQuantity =buyQuantity+32, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 19:02:34' ; -- id=293
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1515', '450', '32', '0', 'buyBillController.php', '217', '', '0', '0'); -- id=175
UPDATE product SET  productBuyPrice = "450" WHERE productId = 1515 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 217 ;
UPDATE product SET productName = 'جاكت 33', productDescription = '', productCatId = '110', productBuyPrice = '450.00', productSellAllPrice = '475.00', productSellUnitPrice = '475.00', productSellHalfPrice = '475.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01515',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '5.56' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1515';
UPDATE buybilldetail SET  lastbuyprice = 450 , meanbuyprice = 450, lastbuyprice_withDiscount = 450, meanbuyprice_withDiscount = 450
        , lastbuyprice_withTax = 450, meanbuyprice_withTax = 450, lastbuyprice_withDiscountAndTax = 450
                where buybilldetailid = 217;
UPDATE productunit SET proUnitBuyPrice  = 450 * productnumber WHERE productid = 1515;
UPDATE storedetail SET  productquantity = '32', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1540';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1515', '1', '32', '0', '40', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '32', '1', '2026-10-06 19:01:58','0','0'); -- id=2399
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01516', '40', '110', '1516', '32', '450', '14400.00', '0', '', '2026-10-06 19:02:34', '1516','','','0','0','0','0','0',null,'450','14400','0','0','0','0','0','0','0','0','1'); -- id=218
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 19:01:58', 1, 1516, 0, 0
                    , 450, 32, 0, 0, 1, '2026-10-06 19:02:34')
                ON DUPLICATE KEY UPDATE buyprice = 450,
                        buyQuantity =buyQuantity+32, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 19:02:34' ; -- id=294
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1516', '450', '32', '0', 'buyBillController.php', '218', '', '0', '0'); -- id=176
UPDATE product SET  productBuyPrice = "450" WHERE productId = 1516 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 218 ;
UPDATE product SET productName = 'جاكت 34', productDescription = '', productCatId = '110', productBuyPrice = '450.00', productSellAllPrice = '475.00', productSellUnitPrice = '475.00', productSellHalfPrice = '475.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01516',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '5.56' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1516';
UPDATE buybilldetail SET  lastbuyprice = 450 , meanbuyprice = 450, lastbuyprice_withDiscount = 450, meanbuyprice_withDiscount = 450
        , lastbuyprice_withTax = 450, meanbuyprice_withTax = 450, lastbuyprice_withDiscountAndTax = 450
                where buybilldetailid = 218;
UPDATE productunit SET proUnitBuyPrice  = 450 * productnumber WHERE productid = 1516;
UPDATE storedetail SET  productquantity = '32', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1541';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1516', '1', '32', '0', '40', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '32', '1', '2026-10-06 19:01:58','0','0'); -- id=2400
UPDATE supplier SET  suppliercurrentDebt = '544460',suppliercurrentDebtInCurrency= '544460' , userid = '1', supplierdate = '2026-10-06 19:02:34'   WHERE supplierid = '65';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('65', '515660.00', '28800', '0', 'اضافة فاتورة مشتريات', '40', '544460', '2026-10-06 19:01:58', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','28800','1','515660','28800','544460','0',''); -- id=163
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '28800', '28800', '2026-10-06', '1', '0', '0', '2026-10-06 19:02:34','اضافة فاتورة مشتريات رقم 40','1','0',null,'0','40','buyBillController.php?do=details&id=40'); -- id=1174
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1174', '382', '28800', '','0'); -- id=1180
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15874628.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1174', '484', '28800', '','0'); -- id=1174
UPDATE accountstree SET name = 'توب سيكرت - مورد', customName = 'توب سيكرت - مورد', customNameEn = 'توب سيكرت - مورد', nameEn = 'توب سيكرت - مورد', parent = '81', accountNature = '1', theValue = '-330440', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '484';
update buybill set dailyentryid='1174,0' where buybillid=40;
COMMIT;
UPDATE product SET overAllAveragePrice = 450 WHERE productId = 1515;UPDATE product SET overAllAveragePrice = 450 WHERE productId = 1516;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:32:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:02:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 19:02:34', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=40'); -- id=3502
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:32:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:02:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 19:02:41', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=40&type=2'); -- id=3503
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:33:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:03:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 19:03:41', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=40&type=2'); -- id=3504
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:33:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:03:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 19:03:54', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3505
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:34:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:04:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 19:04:53', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3506
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('سوبر باجي','','32','380','395','395','395','2026-10-06','0','1','0','','0','0','0','0','0','380','380','380','380','380','0','3.95','3.95','0','.','0','0','0','380','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','380','380','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','380','0','0','0','0','0','0','','','0','0','0','0'); -- id=1517
UPDATE product SET productName = 'سوبر باجي', productDescription = '', productCatId = '32', productBuyPrice = '380', productSellAllPrice = '395', productSellUnitPrice = '395', productSellHalfPrice = '395', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01517',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '380',meanbuyprice = '380',meanbuyprice_withDiscount = '380' , productbuypricereal = '380' , buypricereal_precentage = '0' , buytotal_precentage = '3.95' , buyhalf_precentage = '3.95' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1517';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1517', '1', '2026-10-06', '1', '0','0151701','395','395','395','380','','0','0','0','0','0','0','0','0','0','0'); -- id=1517
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1517', '1', '0', '1', '2026-10-06'); -- id=1542
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1517', '1', '0', '0', '1517', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2401
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1517, 1,'2026-10-06 19:04:53',1)
                ON DUPLICATE KEY UPDATE productid = 1517, edited = 1, sysdate = '2026-10-06 19:04:53', userid = 1; -- id=2311
UPDATE product SET productName = 'سوبر باجي', productDescription = '', productCatId = '32', productBuyPrice = '380.00', productSellAllPrice = '395.00', productSellUnitPrice = '395.00', productSellHalfPrice = '395.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01517',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '380',meanbuyprice = '380',meanbuyprice_withDiscount = '380' , productbuypricereal = '380' , buypricereal_precentage = '0' , buytotal_precentage = '3.95' , buyhalf_precentage = '3.95' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1517';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:34:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:04:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 19:04:54', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3507
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:35:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:05:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 19:05:00', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3508
UPDATE user SET loginip = "" WHERE userid = 2;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:35:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:05:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 19:05:33', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3509
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:35:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:05:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 19:05:42', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3510
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:36:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:06:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 19:06:04', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3511
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac51c56713b1', '2026-10-06 19:05:42', '40', '546030.00', '584030', '0', '0', '38000.00',  '38000.00', '0', '38000', '1', '2026-10-06 19:06:04', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=41
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01517', '41', '32', '1517', '100', '380', '38000.00', '0', '', '2026-10-06 19:06:04', '1517','','','0','0','0','0','0',null,'380','38000','0','0','0','0','0','0','0','0','1'); -- id=219
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 19:05:42', 1, 1517, 0, 0
                    , 380, 100, 0, 0, 1, '2026-10-06 19:06:04')
                ON DUPLICATE KEY UPDATE buyprice = 380,
                        buyQuantity =buyQuantity+100, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 19:06:04' ; -- id=295
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1517', '380', '100', '0', 'buyBillController.php', '219', '', '0', '0'); -- id=177
UPDATE product SET  productBuyPrice = "380" WHERE productId = 1517 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 219 ;
UPDATE product SET productName = 'سوبر باجي', productDescription = '', productCatId = '32', productBuyPrice = '380.00', productSellAllPrice = '395.00', productSellUnitPrice = '395.00', productSellHalfPrice = '395.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01517',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '380',meanbuyprice = '380',meanbuyprice_withDiscount = '380' , productbuypricereal = '380.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.95' , buyhalf_precentage = '3.95' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1517';
UPDATE buybilldetail SET  lastbuyprice = 380 , meanbuyprice = 380, lastbuyprice_withDiscount = 380, meanbuyprice_withDiscount = 380
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 380
                where buybilldetailid = 219;
UPDATE productunit SET proUnitBuyPrice  = 380 * productnumber WHERE productid = 1517;
UPDATE storedetail SET  productquantity = '100', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1542';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1517', '1', '100', '0', '41', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '100', '1', '2026-10-06 19:05:42','0','0'); -- id=2402
UPDATE supplier SET  suppliercurrentDebt = '409740',suppliercurrentDebtInCurrency= '584030' , userid = '1', supplierdate = '2026-10-06 19:06:04'   WHERE supplierid = '40';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('40', '371740.00', '38000', '0', 'اضافة فاتورة مشتريات', '41', '409740', '2026-10-06 19:05:42', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','38000','1','546030','38000','584030','0',''); -- id=164
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '38000', '38000', '2026-10-06', '1', '0', '0', '2026-10-06 19:06:04','اضافة فاتورة مشتريات رقم 41','1','0',null,'0','41','buyBillController.php?do=details&id=41'); -- id=1175
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1175', '382', '38000', '','0'); -- id=1181
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15912628.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1175', '459', '38000', '','0'); -- id=1175
UPDATE accountstree SET name = 'كوين - مورد', customName = 'كوين - مورد', customNameEn = 'كوين - مورد', nameEn = 'كوين - مورد', parent = '81', accountNature = '1', theValue = '38000', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '459';
update buybill set dailyentryid='1175,0' where buybillid=41;
COMMIT;
UPDATE product SET overAllAveragePrice = 380 WHERE productId = 1517;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:36:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:06:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 19:06:04', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=41'); -- id=3512
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:42:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:12:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 19:12:55', '1', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3513
INSERT INTO client (clientname, clientaddress, clientphone, clientmobile, clientdebt, clientdetails, conditions, clientdate, userid,clientareaid,clientcode,dailyentryid ,rondomtxt,clientStoreIds,obygyPatientId,debtLimit,typeclientid,priceTypeId,card_number,file_faida,specialDiscount,specialDiscountVal,file,addDate,mandobCollectRatio,webApiId,clientRFID,linkedSupplierId,postponeDays,studentid,taxnumber,password,clientTypeForTree,treeId,husbandNameObgy,txtNameE,facility,delegate,txtemail,commercial,valtaxnumber,clientaddress2,country,delegateid,datecustomeraccount,taxfile,fileimg,webStoreType,clientaddress3,tagids,email_verified,email_otp,email_otp_expiry) VALUES ('احمد جمال' , '', '', '', '0', '', '0', '2026-10-06 19:13:10', '1', '0','','0','','-10','0','10000',',','-1','0','.','0','0','.','2026-10-06','0','0','','0','0','0','','','0','0','','','','','','','','','','-1','','','','0','','','0','0',''); -- id=60
INSERT INTO tamweenclientdetail (clientid, noOfPersonsTamween, noOfPersonsDa3m, cardNum, cardPassword) VALUES ('60', '0', '0', '', ''); -- id=59
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('60','0','0','0','إضافة عميل جديد','60', '0', '2026-10-06 19:13:10', '1', 'clientController.php', '', '0', '0', null, '0', null, null,'', '0','1','1','0','1','','0','0','',''); -- id=187
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('احمد جمال', 'احمد جمال', 'احمد جمال', 'احمد جمال', '58', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-06 19:13:10'); -- id=573
UPDATE client SET clientname = 'احمد جمال', clientaddress = '', clientphone = '', clientmobile = '', clientdebt = '0.00', clientdetails = '', conditions = '0', clientdate = '2026-10-06', userid = '1'  , clientareaid = '0'  ,clientcode = '',dailyentryid = '0' , rondomtxt = '',clientStoreIds = '-10', obygyPatientId = '0' , debtLimit='10000' , typeclientid=',',priceTypeId='-1',lastEditUser = '0',card_number = '0',file_faida = '.',specialDiscount = '0',specialDiscountVal = '0',file = '.',mandobCollectRatio='0',webApiId ='0' ,clientRFID = '',linkedSupplierId = '0',postponeDays='0', studentid='0', taxnumber='', password='',clientTypeForTree='0',treeId='573',husbandNameObgy='',txtNameE='',facility='',delegate='',txtemail='',commercial='',valtaxnumber='',clientaddress2='',country='',delegateid='-1',datecustomeraccount='0000-00-00',taxfile='',fileimg='',webStoreType='0',clientaddress3='',tagids='',email_verified='0',email_otp='0',email_otp_expiry='0000-00-00 00:00:00' WHERE clientid = '60';
INSERT INTO client (clientname, clientaddress, clientphone, clientmobile, clientdebt, clientdetails, conditions, clientdate, userid,clientareaid,clientcode,dailyentryid ,rondomtxt,clientStoreIds,obygyPatientId,debtLimit,typeclientid,priceTypeId,card_number,file_faida,specialDiscount,specialDiscountVal,file,addDate,mandobCollectRatio,webApiId,clientRFID,linkedSupplierId,postponeDays,studentid,taxnumber,password,clientTypeForTree,treeId,husbandNameObgy,txtNameE,facility,delegate,txtemail,commercial,valtaxnumber,clientaddress2,country,delegateid,datecustomeraccount,taxfile,fileimg,webStoreType,clientaddress3,tagids,email_verified,email_otp,email_otp_expiry) VALUES ('مول الكينج' , '', '', '', '0', '', '0', '2026-10-06 19:13:31', '1', '0','','0','','-10','0','0',',','-1','0','.','0','0','.','2026-10-06','0','0','','0','0','0','','','0','0','','','','','','','','','','-1','','','','0','','','0','0',''); -- id=61
INSERT INTO tamweenclientdetail (clientid, noOfPersonsTamween, noOfPersonsDa3m, cardNum, cardPassword) VALUES ('61', '0', '0', '', ''); -- id=60
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('61','0','0','0','إضافة عميل جديد','61', '0', '2026-10-06 19:13:31', '1', 'clientController.php', '', '0', '0', null, '0', null, null,'', '0','1','1','0','1','','0','0','',''); -- id=188
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('مول الكينج', 'مول الكينج', 'مول الكينج', 'مول الكينج', '58', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-06 19:13:31'); -- id=574
UPDATE client SET clientname = 'مول الكينج', clientaddress = '', clientphone = '', clientmobile = '', clientdebt = '0.00', clientdetails = '', conditions = '0', clientdate = '2026-10-06', userid = '1'  , clientareaid = '0'  ,clientcode = '',dailyentryid = '0' , rondomtxt = '',clientStoreIds = '-10', obygyPatientId = '0' , debtLimit='0' , typeclientid=',',priceTypeId='-1',lastEditUser = '0',card_number = '0',file_faida = '.',specialDiscount = '0',specialDiscountVal = '0',file = '.',mandobCollectRatio='0',webApiId ='0' ,clientRFID = '',linkedSupplierId = '0',postponeDays='0', studentid='0', taxnumber='', password='',clientTypeForTree='0',treeId='574',husbandNameObgy='',txtNameE='',facility='',delegate='',txtemail='',commercial='',valtaxnumber='',clientaddress2='',country='',delegateid='-1',datecustomeraccount='0000-00-00',taxfile='',fileimg='',webStoreType='0',clientaddress3='',tagids='',email_verified='0',email_otp='0',email_otp_expiry='0000-00-00 00:00:00' WHERE clientid = '61';
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:51:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:21:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 19:21:21', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3514
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:51:22";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 19:21:22', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3515
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:52:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:22:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 19:22:14', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=show'); -- id=3516
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:56:06";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:56:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:26:09", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 19:26:09', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3517
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:56:10";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-06 19:26:10", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 19:26:10', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3518
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:56:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:26:14", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 19:26:14', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3519
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:56:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:26:23", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 19:26:23', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=3520
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:56:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:26:41", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 19:26:41', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3521

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac5212f30477
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO returnsellbill (returnsellbilldate, returnsellbillserial, returnsellbillclientid, returnsellbilltotaldeptbefor, returnsellbilltotaldeptafter, returnsellbilldiscount, returnsellbilldiscounttype, returnsellbilltotalbill, returnsellbillaftertotalbill, returnsellbilltotalpayed, returnsellbillfinalbill, returnsellbillstoreid, returnsellbillsysdate,comment, userid, conditions, returnsellbillclientname, returnsellbillsaveid, returnsellbildirectpayment, billnameid, sellerid, tempclientName, returnsellQuantity,tax, carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,delbyuserid,billReservation,billReservationDate,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,autoSaveFlag,obgyBillType,billoperationid,obygyVisitId,pricetype,currencyId,sellbillno,returnsellbilltypeclientid) VALUES ('2026-10-06 19:26:41', '06ac5212f30477', '1', '0.00', '0', '0', '1', '3100', '3100', '-3100', '0', '1', '2026-10-06 19:26:41', '', '2', '0', 'نقدي','2', '0', '5', '0', 'نقدي', '5', '0', '', '','','','-1','0','0','0','','0','-3100','0','0','0','0','0','0','0','0','-1','0','0','1','','0'); -- id=4
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','1','اضافة فاتورة مردوات مبيعات','4', '0', '2026-10-06 19:26:41', '2', 'returnsellbillController.php', 'اضافة فاتورة مردوات مبيعات', '3100', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 19:26:41','0','0','',''); -- id=189
INSERT INTO returnsellbilldetail (buyprice, parcode, returnsellbillid, returnsellbilldetailcatid, returnsellbilldetailproductid, returnsellbilldetailquantity, returnsellbilldetailprice, returnsellbilldetailtotalprice, conditions, note, pricetype, discountvalue, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,pricetypepro,proHeight,proWidth,soldSerialsInDetails,lastbuyprice_withTax,meanbuyprice_withTax,returnsellbilldetailpriceC,returnsellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,lastbuyprice_withDiscountAndTax) VALUES ('600.00', '09530', '4', '8', '735', '5', '620', '3100', '0', '', '0', '0', '735', '0.00', '0','1','0','','','0','0','0','0','0','0','1','1','','0','0','620','3100','0','','0'); -- id=7
UPDATE returnsellbilldetail SET  lastbuyprice = 600.00 , meanbuyprice = 600.00, lastbuyprice_withDiscount = 600.00, meanbuyprice_withDiscount = 600.00
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where returnsellbilldetailid = 7;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (735, '2026-10-06', 0, 0, 0
                    , 0, 0, 0, 0
                    , 3100, 3000, 3000, 3000
                    , 3000, 3000, 3000, 0, 5, 0, 0, 3000, 3000)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+0, sellCostBuyPrice =sellCostBuyPrice+0
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+0, sellCostMeanBuyPrice = sellCostMeanBuyPrice+0
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+0, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+0
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+0
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+0
                        , returnSellVal = returnSellVal+3100, returnSellCostBuyPrice = returnSellCostBuyPrice+3000, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+3000
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+3000, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+3000
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+3000
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+3000
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+3000
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+3000
                        , netQuantity = netQuantity+0
                        , netQuantityRet = netQuantityRet+5;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 0, 0, 0
                    , 0, 0, 0, 0
                    , 3100, 3000, 3000, 3000
                    , 3000, 3000, 3000, 0, 0, 3000, 3000)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+0, sellCostBuyPrice =sellCostBuyPrice+0
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+0, sellCostMeanBuyPrice = sellCostMeanBuyPrice+0
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+0, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+0
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+0
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+0
                        , returnSellVal = returnSellVal+3100, returnSellCostBuyPrice = returnSellCostBuyPrice+3000, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+3000
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+3000, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+3000
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+3000
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+3000
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+3000
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+3000;
UPDATE storedetail SET  productquantity = '20', userid = '2', storedetaildate = '2026-10-06 19:26:41' WHERE storedetailid = '735';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('735', '1', '5', '0', '4', 'اضافة فاتورة مردودات مبيعات', 'returnsellbillController.php', '15', '20', '2', '2026-10-06 19:26:41','0','0'); -- id=2403
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '366490',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('369590','-3100', '1', '2', 'اضافة فاتورة مردوات مبيعات', '4', '366490', '2026-10-06 19:26:41', '2',  'returnsellbillController.php','1','','0'); -- id=127
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3100', '3100', '2026-10-06', '2', '0', '0', '2026-10-06 19:26:41','اضافة فاتورة مردود مبيعات رقم 4','1','0',null,'0','4','returnsellbillController.php?do=showDetail&returnsellbillid=4'); -- id=1176
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1176', '143', '3100', '','0'); -- id=1182
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1008970', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1176', '419', '3100', '','0'); -- id=1176
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '366490', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3000', '3000', '2026-10-06', '2', '0', '0', '2026-10-06 19:26:41','اضافة فاتورة مردود مبيعات رقم 4 - صرف البضاعة من المخزن','1','0',null,'0','4','returnsellbillController.php?do=showDetail&returnsellbillid=4'); -- id=1177
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1177', '382', '3000', '','0'); -- id=1183
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15915628.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1177', '402', '3000', '','0'); -- id=1177
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '979317.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
update returnsellbill set dailyentryid='1176,0,1177' where returnsellbillid=4;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 0, 0, 0
                    , 0, 0, 0, 0
                    , 3100, 3000, 3000, 3000
                    , 3000, 3000, 3000 ,0, 0, 3000, 3000)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+0, sellCostBuyPrice =sellCostBuyPrice+0
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+0, sellCostMeanBuyPrice = sellCostMeanBuyPrice+0
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+0, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+0
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+0
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+0
                        , returnSellVal = returnSellVal+3100, returnSellCostBuyPrice = returnSellCostBuyPrice+3000, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+3000
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+3000, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+3000
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+3000
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+3000
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+3000
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+3000;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 0, 0, 0
                    , 0, 0, 0, 0
                    , 3100, 3000, 3000, 3000
                    , 3000, 3000, 3000 ,0, 0, 3000, 3000)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+0, sellCostBuyPrice =sellCostBuyPrice+0
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+0, sellCostMeanBuyPrice = sellCostMeanBuyPrice+0
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+0, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+0
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+0
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+0
                        , returnSellVal = returnSellVal+3100, returnSellCostBuyPrice = returnSellCostBuyPrice+3000, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+3000
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+3000, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+3000
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+3000
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+3000
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+3000
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+3000;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, -3100, -3000, -3000
                    , -3000, -3000, -3000, -3000, -3000, -3000)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+-3100, netSellCostBuyPrice = netSellCostBuyPrice+-3000
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+-3000
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+-3000
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+-3000
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+-3000
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+-3000
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+-3000
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+-3000;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac5212f30477 and sellbillId = 4 and returnsellbillId = 4
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:56:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:26:41", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 19:26:41', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=3522
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:57:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:27:01", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 19:27:01', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3523
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:58:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:28:30", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 19:28:30', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3524

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac521557dbfa
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-06 19:28:30', '06ac521557dbfa', '1', '0.00', '0', '0', '1', '5150.00', '5150', '5150', '0', '1', '2026-10-06 19:28:30', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '10' ,'0','','','','','-1','0','0','0','0','0','5150','0','','0','0','5150','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-06','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=105
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','105', '0', '2026-10-06 19:28:30', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '5150', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-06 19:28:30','0','0','',''); -- id=190
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('530','09828', '105', '5', '660', '5', '550', '2750', '0', '', '0', '2026-10-06 19:28:30', '660', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','550','2750','0','','0','0.00','0','0','0','0'); -- id=415
UPDATE sellbilldetail SET  lastbuyprice = 530.00 , meanbuyprice = 530.00, lastbuyprice_withDiscount = 530.00, meanbuyprice_withDiscount = 530.00
        , lastbuyprice_withTax = 530, meanbuyprice_withTax = 530, lastbuyprice_withDiscountAndTax = 530
                where sellbilldetailid = 415;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (660, '2026-10-06', 2750, 2650, 2650
                    , 2650, 2650, 2650, 2650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2650, 2650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2750, sellCostBuyPrice =sellCostBuyPrice+2650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2750, 2650, 2650
                    , 2650, 2650, 2650, 2650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2650, 2650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2750, sellCostBuyPrice =sellCostBuyPrice+2650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '45', userid = '2', storedetaildate = '2026-10-06 19:28:30' WHERE storedetailid = '660';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('660', '1', '5', '1', '105', 'اضافة فاتورة مبيعات', 'sellbillController.php', '50', '45', '2', '2026-10-06 19:28:30','0','0'); -- id=2404
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 32;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('460','01327', '105', '37', '1327', '5', '480', '2400', '0', '', '0', '2026-10-06 19:28:30', '1327', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','32-5,','1','1','0','0','480','2400','0','','0','0.00','0','0','0','0'); -- id=416
UPDATE sellbilldetail SET  lastbuyprice = 460.00 , meanbuyprice = 460.00, lastbuyprice_withDiscount = 460.00, meanbuyprice_withDiscount = 460.00
        , lastbuyprice_withTax = 460, meanbuyprice_withTax = 460, lastbuyprice_withDiscountAndTax = 460
                where sellbilldetailid = 416;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1327, '2026-10-06', 2400, 2300, 2300
                    , 2300, 2300, 2300, 2300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2300, 2300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2400, sellCostBuyPrice =sellCostBuyPrice+2300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2300, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2300
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2400, 2300, 2300
                    , 2300, 2300, 2300, 2300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2300, 2300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2400, sellCostBuyPrice =sellCostBuyPrice+2300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2300, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2300
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '35', userid = '2', storedetaildate = '2026-10-06 19:28:30' WHERE storedetailid = '1327';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1327', '1', '5', '1', '105', 'اضافة فاتورة مبيعات', 'sellbillController.php', '40', '35', '2', '2026-10-06 19:28:30','0','0'); -- id=2405
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '371640',  userid = '2' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('366490','5150', '0', '2', 'اضافة فاتورة مبيعات', '105', '371640', '2026-10-06 19:28:30', '2',  'sellbillController.php','1','','0'); -- id=128
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '5150', '5150', '2026-10-06', '2', '0', '0', '2026-10-06 19:28:30','اضافة فاتورة مبيعات رقم 105','1','0',null,'0','105','sellbillController.php?do=showDetail&sellbillid=105'); -- id=1178
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1178', '419', '5150', '','0'); -- id=1184
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '371640', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1178', '143', '5150', '','0'); -- id=1178
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1014120', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '4950', '4950', '2026-10-06', '2', '0', '0', '2026-10-06 19:28:30','اضافة فاتورة مبيعات رقم 105 - صرف البضاعة من المخزن','1','0',null,'0','105','sellbillController.php?do=showDetail&sellbillid=105'); -- id=1179
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1179', '402', '4950', '','0'); -- id=1185
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '984267.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1179', '382', '4950', '','0'); -- id=1179
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15910678.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1178,0,1179' where sellbillid=105;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 5150, 4950, 4950
                    , 4950, 4950, 4950, 4950
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,4950, 4950, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5150, sellCostBuyPrice =sellCostBuyPrice+4950
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4950, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4950
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4950, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4950
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4950
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4950
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4950
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 5150, 4950, 4950
                    , 4950, 4950, 4950, 4950
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,4950, 4950, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5150, sellCostBuyPrice =sellCostBuyPrice+4950
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4950, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4950
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4950, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4950
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4950
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4950
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4950
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 5150, 4950, 4950
                    , 4950, 4950, 4950, 4950, 4950, 4950)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+5150, netSellCostBuyPrice = netSellCostBuyPrice+4950
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+4950
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+4950
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+4950
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+4950
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+4950
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+4950
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+4950;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac521557dbfa and sellbillId = 105 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 15:58:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:28:30", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 19:28:30', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3525
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:10:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:40:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 19:40:54', '1', 'addexcel', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=addexcel'); -- id=3526
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:25:04";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:25:04";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:25:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:55:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 19:55:21', '1', 'addfromexcel', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=addfromexcel'); -- id=3527
BEGIN;
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('ستيفو-موردين', '', '', '-66262', '', '0', '1', '2026-10-06 19:55:21', '0', '', '','0','0','','','','','','','','','','0','0','1','-66262','0','0'); -- id=92
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('92', '0', '-66262', '0', 'إضافة مورد جديد', '92', '-66262', '2026-10-06 19:55:21', '1', 'supplierController.php', '', '0','', '0','1','1','-66262','1','0','0','0','0',''); -- id=165
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('ستيفو-موردين', 'ستيفو-موردين', 'ستيفو-موردين', 'ستيفو-موردين', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:55:21'); -- id=575
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-66262', '-66262', '2026-10-06', '1', '0', '0', '2026-10-06 19:55:21','إضافة مورد  ( ستيفو-موردين ) ','1','0','0','0','92','supplierController.php?do=edit&id=92'); -- id=1180
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1180', '121', '-66262', '','0'); -- id=1186
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '9877903.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1180', '575', '-66262', '','0'); -- id=1180
UPDATE accountstree SET name = '', customName = '', customNameEn = '', nameEn = '', parent = null, accountNature = '0', theValue = '66262', theOrder = null, layingOrder = '', reportid = '0', listId = '0', notes = '', itemfrom = null, itemtype = null, itemtype2 = null, itemtype3 = '', userid = null, del = null, sysdate = '' WHERE id = null;
COMMIT;
UPDATE supplier SET suppliername = 'ستيفو-موردين', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-66262.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1180', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='575',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-66262',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '92';
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('محمود الصعيدي-الموردين', '', '', '-4660', '', '0', '1', '2026-10-06 19:55:21', '0', '', '','0','0','','','','','','','','','','0','575','1','-66262','0','0'); -- id=93
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('93', '0', '-4660', '0', 'إضافة مورد جديد', '93', '-4660', '2026-10-06 19:55:21', '1', 'supplierController.php', '', '0','', '0','1','1','-66262','1','0','0','0','0',''); -- id=166
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('محمود الصعيدي-الموردين', 'محمود الصعيدي-الموردين', 'محمود الصعيدي-الموردين', 'محمود الصعيدي-الموردين', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:55:21'); -- id=576
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-4660', '-4660', '2026-10-06', '1', '0', '0', '2026-10-06 19:55:21','إضافة مورد  ( محمود الصعيدي-الموردين ) ','1','0','0','0','93','supplierController.php?do=edit&id=93'); -- id=1181
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1181', '121', '-4660', '','0'); -- id=1187
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '9882563.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1181', '576', '-4660', '','0'); -- id=1181
UPDATE accountstree SET name = '', customName = '', customNameEn = '', nameEn = '', parent = null, accountNature = '0', theValue = '4660', theOrder = null, layingOrder = '', reportid = '0', listId = '0', notes = '', itemfrom = null, itemtype = null, itemtype2 = null, itemtype3 = '', userid = null, del = null, sysdate = '' WHERE id = null;
COMMIT;
UPDATE supplier SET suppliername = 'محمود الصعيدي-الموردين', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-4660.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1181', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='576',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-66262',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '93';
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('فادي تربو - موردين', '', '', '-2650', '', '0', '1', '2026-10-06 19:55:21', '0', '', '','0','0','','','','','','','','','','0','576','1','-66262','0','0'); -- id=94
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('94', '0', '-2650', '0', 'إضافة مورد جديد', '94', '-2650', '2026-10-06 19:55:21', '1', 'supplierController.php', '', '0','', '0','1','1','-66262','1','0','0','0','0',''); -- id=167
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('فادي تربو - موردين', 'فادي تربو - موردين', 'فادي تربو - موردين', 'فادي تربو - موردين', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:55:21'); -- id=577
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-2650', '-2650', '2026-10-06', '1', '0', '0', '2026-10-06 19:55:21','إضافة مورد  ( فادي تربو - موردين ) ','1','0','0','0','94','supplierController.php?do=edit&id=94'); -- id=1182
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1182', '121', '-2650', '','0'); -- id=1188
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '9885213.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1182', '577', '-2650', '','0'); -- id=1182
UPDATE accountstree SET name = '', customName = '', customNameEn = '', nameEn = '', parent = null, accountNature = '0', theValue = '2650', theOrder = null, layingOrder = '', reportid = '0', listId = '0', notes = '', itemfrom = null, itemtype = null, itemtype2 = null, itemtype3 = '', userid = null, del = null, sysdate = '' WHERE id = null;
COMMIT;
UPDATE supplier SET suppliername = 'فادي تربو - موردين', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-2650.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1182', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='577',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-66262',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '94';
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('محمد ايمن-الموردين', '', '', '-19098', '', '0', '1', '2026-10-06 19:55:21', '0', '', '','0','0','','','','','','','','','','0','577','1','-66262','0','0'); -- id=95
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('95', '0', '-19098', '0', 'إضافة مورد جديد', '95', '-19098', '2026-10-06 19:55:21', '1', 'supplierController.php', '', '0','', '0','1','1','-66262','1','0','0','0','0',''); -- id=168
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('محمد ايمن-الموردين', 'محمد ايمن-الموردين', 'محمد ايمن-الموردين', 'محمد ايمن-الموردين', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:55:21'); -- id=578
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-19098', '-19098', '2026-10-06', '1', '0', '0', '2026-10-06 19:55:21','إضافة مورد  ( محمد ايمن-الموردين ) ','1','0','0','0','95','supplierController.php?do=edit&id=95'); -- id=1183
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1183', '121', '-19098', '','0'); -- id=1189
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '9904311.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1183', '578', '-19098', '','0'); -- id=1183
UPDATE accountstree SET name = '', customName = '', customNameEn = '', nameEn = '', parent = null, accountNature = '0', theValue = '19098', theOrder = null, layingOrder = '', reportid = '0', listId = '0', notes = '', itemfrom = null, itemtype = null, itemtype2 = null, itemtype3 = '', userid = null, del = null, sysdate = '' WHERE id = null;
COMMIT;
UPDATE supplier SET suppliername = 'محمد ايمن-الموردين', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-19098.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1183', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='578',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-66262',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '95';
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('ترند7-موردين', '', '', '-1468', '', '0', '1', '2026-10-06 19:55:21', '0', '', '','0','0','','','','','','','','','','0','578','1','-66262','0','0'); -- id=96
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('96', '0', '-1468', '0', 'إضافة مورد جديد', '96', '-1468', '2026-10-06 19:55:21', '1', 'supplierController.php', '', '0','', '0','1','1','-66262','1','0','0','0','0',''); -- id=169
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('ترند7-موردين', 'ترند7-موردين', 'ترند7-موردين', 'ترند7-موردين', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:55:21'); -- id=579
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-1468', '-1468', '2026-10-06', '1', '0', '0', '2026-10-06 19:55:21','إضافة مورد  ( ترند7-موردين ) ','1','0','0','0','96','supplierController.php?do=edit&id=96'); -- id=1184
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1184', '121', '-1468', '','0'); -- id=1190
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '9905779.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1184', '579', '-1468', '','0'); -- id=1184
UPDATE accountstree SET name = '', customName = '', customNameEn = '', nameEn = '', parent = null, accountNature = '0', theValue = '1468', theOrder = null, layingOrder = '', reportid = '0', listId = '0', notes = '', itemfrom = null, itemtype = null, itemtype2 = null, itemtype3 = '', userid = null, del = null, sysdate = '' WHERE id = null;
COMMIT;
UPDATE supplier SET suppliername = 'ترند7-موردين', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-1468.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1184', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='579',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-66262',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '96';
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('جاكو - مورد', '', '', '-451809', '', '0', '1', '2026-10-06 19:55:21', '0', '', '','0','0','','','','','','','','','','0','579','1','-66262','0','0'); -- id=97
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('97', '0', '-451809', '0', 'إضافة مورد جديد', '97', '-451809', '2026-10-06 19:55:21', '1', 'supplierController.php', '', '0','', '0','1','1','-66262','1','0','0','0','0',''); -- id=170
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('جاكو - مورد', 'جاكو - مورد', 'جاكو - مورد', 'جاكو - مورد', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:55:21'); -- id=580
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-451809', '-451809', '2026-10-06', '1', '0', '0', '2026-10-06 19:55:21','إضافة مورد  ( جاكو - مورد ) ','1','0','0','0','97','supplierController.php?do=edit&id=97'); -- id=1185
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1185', '121', '-451809', '','0'); -- id=1191
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '10357588.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1185', '580', '-451809', '','0'); -- id=1185
UPDATE accountstree SET name = '', customName = '', customNameEn = '', nameEn = '', parent = null, accountNature = '0', theValue = '451809', theOrder = null, layingOrder = '', reportid = '0', listId = '0', notes = '', itemfrom = null, itemtype = null, itemtype2 = null, itemtype3 = '', userid = null, del = null, sysdate = '' WHERE id = null;
COMMIT;
UPDATE supplier SET suppliername = 'جاكو - مورد', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-451809.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1185', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='580',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-66262',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '97';
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('اسبايدر - مورد', '', '', '-75755', '', '0', '1', '2026-10-06 19:55:21', '0', '', '','0','0','','','','','','','','','','0','580','1','-66262','0','0'); -- id=98
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('98', '0', '-75755', '0', 'إضافة مورد جديد', '98', '-75755', '2026-10-06 19:55:21', '1', 'supplierController.php', '', '0','', '0','1','1','-66262','1','0','0','0','0',''); -- id=171
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('اسبايدر - مورد', 'اسبايدر - مورد', 'اسبايدر - مورد', 'اسبايدر - مورد', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:55:21'); -- id=581
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-75755', '-75755', '2026-10-06', '1', '0', '0', '2026-10-06 19:55:21','إضافة مورد  ( اسبايدر - مورد ) ','1','0','0','0','98','supplierController.php?do=edit&id=98'); -- id=1186
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1186', '121', '-75755', '','0'); -- id=1192
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '10433343.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1186', '581', '-75755', '','0'); -- id=1186
UPDATE accountstree SET name = '', customName = '', customNameEn = '', nameEn = '', parent = null, accountNature = '0', theValue = '75755', theOrder = null, layingOrder = '', reportid = '0', listId = '0', notes = '', itemfrom = null, itemtype = null, itemtype2 = null, itemtype3 = '', userid = null, del = null, sysdate = '' WHERE id = null;
COMMIT;
UPDATE supplier SET suppliername = 'اسبايدر - مورد', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-75755.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1186', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='581',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-66262',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '98';
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('اوف وايت - مورد', '', '', '-11180', '', '0', '1', '2026-10-06 19:55:21', '0', '', '','0','0','','','','','','','','','','0','581','1','-66262','0','0'); -- id=99
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('99', '0', '-11180', '0', 'إضافة مورد جديد', '99', '-11180', '2026-10-06 19:55:21', '1', 'supplierController.php', '', '0','', '0','1','1','-66262','1','0','0','0','0',''); -- id=172
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('اوف وايت - مورد', 'اوف وايت - مورد', 'اوف وايت - مورد', 'اوف وايت - مورد', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:55:21'); -- id=582
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-11180', '-11180', '2026-10-06', '1', '0', '0', '2026-10-06 19:55:21','إضافة مورد  ( اوف وايت - مورد ) ','1','0','0','0','99','supplierController.php?do=edit&id=99'); -- id=1187
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1187', '121', '-11180', '','0'); -- id=1193
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '10444523.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1187', '582', '-11180', '','0'); -- id=1187
UPDATE accountstree SET name = '', customName = '', customNameEn = '', nameEn = '', parent = null, accountNature = '0', theValue = '11180', theOrder = null, layingOrder = '', reportid = '0', listId = '0', notes = '', itemfrom = null, itemtype = null, itemtype2 = null, itemtype3 = '', userid = null, del = null, sysdate = '' WHERE id = null;
COMMIT;
UPDATE supplier SET suppliername = 'اوف وايت - مورد', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-11180.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1187', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='582',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-66262',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '99';
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('احمد جلاكسي - مورد', '', '', '-7100', '', '0', '1', '2026-10-06 19:55:21', '0', '', '','0','0','','','','','','','','','','0','582','1','-66262','0','0'); -- id=100
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('100', '0', '-7100', '0', 'إضافة مورد جديد', '100', '-7100', '2026-10-06 19:55:21', '1', 'supplierController.php', '', '0','', '0','1','1','-66262','1','0','0','0','0',''); -- id=173
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('احمد جلاكسي - مورد', 'احمد جلاكسي - مورد', 'احمد جلاكسي - مورد', 'احمد جلاكسي - مورد', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:55:21'); -- id=583
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-7100', '-7100', '2026-10-06', '1', '0', '0', '2026-10-06 19:55:21','إضافة مورد  ( احمد جلاكسي - مورد ) ','1','0','0','0','100','supplierController.php?do=edit&id=100'); -- id=1188
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1188', '121', '-7100', '','0'); -- id=1194
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '10451623.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1188', '583', '-7100', '','0'); -- id=1188
UPDATE accountstree SET name = '', customName = '', customNameEn = '', nameEn = '', parent = null, accountNature = '0', theValue = '7100', theOrder = null, layingOrder = '', reportid = '0', listId = '0', notes = '', itemfrom = null, itemtype = null, itemtype2 = null, itemtype3 = '', userid = null, del = null, sysdate = '' WHERE id = null;
COMMIT;
UPDATE supplier SET suppliername = 'احمد جلاكسي - مورد', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-7100.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1188', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='583',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-66262',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '100';
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('ستارك - مورد', '', '', '-7550', '', '0', '1', '2026-10-06 19:55:21', '0', '', '','0','0','','','','','','','','','','0','583','1','-66262','0','0'); -- id=101
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('101', '0', '-7550', '0', 'إضافة مورد جديد', '101', '-7550', '2026-10-06 19:55:21', '1', 'supplierController.php', '', '0','', '0','1','1','-66262','1','0','0','0','0',''); -- id=174
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('ستارك - مورد', 'ستارك - مورد', 'ستارك - مورد', 'ستارك - مورد', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:55:21'); -- id=584
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-7550', '-7550', '2026-10-06', '1', '0', '0', '2026-10-06 19:55:21','إضافة مورد  ( ستارك - مورد ) ','1','0','0','0','101','supplierController.php?do=edit&id=101'); -- id=1189
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1189', '121', '-7550', '','0'); -- id=1195
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '10459173.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1189', '584', '-7550', '','0'); -- id=1189
UPDATE accountstree SET name = '', customName = '', customNameEn = '', nameEn = '', parent = null, accountNature = '0', theValue = '7550', theOrder = null, layingOrder = '', reportid = '0', listId = '0', notes = '', itemfrom = null, itemtype = null, itemtype2 = null, itemtype3 = '', userid = null, del = null, sysdate = '' WHERE id = null;
COMMIT;
UPDATE supplier SET suppliername = 'ستارك - مورد', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-7550.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1189', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='584',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-66262',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '101';
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('الصعيدي - مورد', '', '', '-8465', '', '0', '1', '2026-10-06 19:55:21', '0', '', '','0','0','','','','','','','','','','0','584','1','-66262','0','0'); -- id=102
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('102', '0', '-8465', '0', 'إضافة مورد جديد', '102', '-8465', '2026-10-06 19:55:21', '1', 'supplierController.php', '', '0','', '0','1','1','-66262','1','0','0','0','0',''); -- id=175
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('الصعيدي - مورد', 'الصعيدي - مورد', 'الصعيدي - مورد', 'الصعيدي - مورد', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:55:21'); -- id=585
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-8465', '-8465', '2026-10-06', '1', '0', '0', '2026-10-06 19:55:21','إضافة مورد  ( الصعيدي - مورد ) ','1','0','0','0','102','supplierController.php?do=edit&id=102'); -- id=1190
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1190', '121', '-8465', '','0'); -- id=1196
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '10467638.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1190', '585', '-8465', '','0'); -- id=1190
UPDATE accountstree SET name = '', customName = '', customNameEn = '', nameEn = '', parent = null, accountNature = '0', theValue = '8465', theOrder = null, layingOrder = '', reportid = '0', listId = '0', notes = '', itemfrom = null, itemtype = null, itemtype2 = null, itemtype3 = '', userid = null, del = null, sysdate = '' WHERE id = null;
COMMIT;
UPDATE supplier SET suppliername = 'الصعيدي - مورد', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-8465.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1190', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='585',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-66262',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '102';
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('سليم تكس -مورد', '', '', '-3683', '', '0', '1', '2026-10-06 19:55:21', '0', '', '','0','0','','','','','','','','','','0','585','1','-66262','0','0'); -- id=103
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('103', '0', '-3683', '0', 'إضافة مورد جديد', '103', '-3683', '2026-10-06 19:55:21', '1', 'supplierController.php', '', '0','', '0','1','1','-66262','1','0','0','0','0',''); -- id=176
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('سليم تكس -مورد', 'سليم تكس -مورد', 'سليم تكس -مورد', 'سليم تكس -مورد', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:55:21'); -- id=586
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-3683', '-3683', '2026-10-06', '1', '0', '0', '2026-10-06 19:55:21','إضافة مورد  ( سليم تكس -مورد ) ','1','0','0','0','103','supplierController.php?do=edit&id=103'); -- id=1191
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1191', '121', '-3683', '','0'); -- id=1197
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '10471321.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1191', '586', '-3683', '','0'); -- id=1191
UPDATE accountstree SET name = '', customName = '', customNameEn = '', nameEn = '', parent = null, accountNature = '0', theValue = '3683', theOrder = null, layingOrder = '', reportid = '0', listId = '0', notes = '', itemfrom = null, itemtype = null, itemtype2 = null, itemtype3 = '', userid = null, del = null, sysdate = '' WHERE id = null;
COMMIT;
UPDATE supplier SET suppliername = 'سليم تكس -مورد', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-3683.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1191', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='586',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-66262',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '103';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:25:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:55:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 19:55:21', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=sucess'); -- id=3528
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:25:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:55:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 19:55:23', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=show'); -- id=3529
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:28:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:58:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 19:58:33', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php'); -- id=3530
UPDATE user SET loginip = "" WHERE userid = 2;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:29:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:59:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 19:59:00', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=add'); -- id=3531
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('سعيد قميص', '', '', '-20000', '', '0', '1', '2026-10-06 19:59:00', '0', '', '','0','0','','','','','','','','','','0','0','1','-20000','0','0'); -- id=104
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('104', '0', '-20000', '0', 'إضافة مورد جديد', '104', '-20000', '2026-10-06 19:59:00', '1', 'supplierController.php', '', '0','', '0','1','1','-20000','1','0','-20000','-20000','0',''); -- id=177
UPDATE client SET clientname = '', clientaddress = '', clientphone = '', clientmobile = '', clientdebt = '', clientdetails = '', conditions = null, clientdate = '', userid = null  , clientareaid = null  ,clientcode = '',dailyentryid = null , rondomtxt = '',clientStoreIds = '', obygyPatientId = '0' , debtLimit='0' , typeclientid='',priceTypeId='0',lastEditUser = '0',card_number = '0',file_faida = '',specialDiscount = '0',specialDiscountVal = '0',file = '',mandobCollectRatio='0',webApiId ='0' ,clientRFID = '',linkedSupplierId = '104',postponeDays='0', studentid='0', taxnumber='', password='',clientTypeForTree='0',treeId='0',husbandNameObgy='',txtNameE='',facility='',delegate='',txtemail='',commercial='',valtaxnumber='',clientaddress2='',country='',delegateid='0',datecustomeraccount='',taxfile='',fileimg='',webStoreType='0',clientaddress3='',tagids='',email_verified='0',email_otp='0',email_otp_expiry='' WHERE clientid = null;
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('سعيد قميص', 'سعيد قميص', 'سعيد قميص', 'سعيد قميص', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 19:59:01'); -- id=587
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-20000', '-20000', '2026-10-06', '1', '0', '0', '2026-10-06 19:59:01','إضافة مورد  ( سعيد قميص ) ','1','0','0','0','104','supplierController.php?do=edit&id=104'); -- id=1192
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1192', '121', '-20000', '','0'); -- id=1198
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '10491321.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1192', '587', '-20000', '','0'); -- id=1192
UPDATE accountstree SET name = 'سعيد قميص', customName = 'سعيد قميص', customNameEn = 'سعيد قميص', nameEn = 'سعيد قميص', parent = '81', accountNature = '1', theValue = '-20000', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-06 19:59:01' WHERE id = '587';
COMMIT;
UPDATE supplier SET suppliername = 'سعيد قميص', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '-20000.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '1192', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='587',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='-20000',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '104';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:29:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:59:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 19:59:01', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=sucess'); -- id=3532
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:29:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 19:59:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 19:59:03', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=show'); -- id=3533
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:35:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:05:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 20:05:22', '1', 'deleteFinaly', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=deleteFinaly&id=104&action=1192'); -- id=3534
UPDATE supplier SET conditions = 2, suppliername = "سعيد قميص-del"
		        WHERE supplierid =104 ;
BEGIN;
UPDATE dailyentry SET totalcreditor = '-20000.00', totaldebtor = '-20000.00', thedate = '2026-10-06', userid = '1', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-06 19:59:01', entryComment = 'إضافة مورد  ( سعيد قميص ) ', fromFlag = '1',related='0',isopeningentry='0',operationId='104',operationDetailLink='supplierController.php?do=edit&id=104' WHERE id = '1192';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '-20000.00', '-20000.00', '2026-10-06', '1', '0', '1192', '2026-10-06 20:05:22','تم عكس القيد رقم 1192 ','1','0','0','0','0',''); -- id=1193
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1193', '121', '-20000.00', '','0'); -- id=1193
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '10471321.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1193', '587', '-20000.00', '','0'); -- id=1199
UPDATE accountstree SET name = 'سعيد قميص', customName = 'سعيد قميص', customNameEn = 'سعيد قميص', nameEn = 'سعيد قميص', parent = '81', accountNature = '1', theValue = '0', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-06 19:59:01' WHERE id = '587';
COMMIT;
UPDATE accountstree SET name = 'سعيد قميص', customName = 'سعيد قميص', customNameEn = 'سعيد قميص', nameEn = 'سعيد قميص', parent = '81', accountNature = '1', theValue = '0.00', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '1', sysdate = '2026-10-06 19:59:01' WHERE id = '587';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:35:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:05:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 20:05:22', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=sucess'); -- id=3535
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:35:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:05:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 20:05:24', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=show'); -- id=3536
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:41:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:11:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:11:30', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3537
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:41:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:11:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 20:11:40', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3538
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:41:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:11:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 20:11:59', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3539
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('الحريف','2026-10-06','','93', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=111
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (111, 1,'2026-10-06 20:11:59',1)
                ON DUPLICATE KEY UPDATE catid = 111, edited = 1, sysdate = '2026-10-06 20:11:59', userid = 1; -- id=113
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '111', '1', '2026-10-06', '1', '0'); -- id=25
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:41:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:11:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 20:11:59', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3540
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:42:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:12:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-06 20:12:01', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3541
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:42:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:12:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:12:22', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3542
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:49:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:19:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:19:31', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3543
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 901','','111','550','550','550','550','2026-10-06','0','1','0','','0','0','0','0','0','550','550','550','550','550','0','0','0','0','.','0','0','0','550','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','550','550','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','550','0','0','0','0','0','0','','','0','0','0','0'); -- id=1518
UPDATE product SET productName = 'كود 901', productDescription = '', productCatId = '111', productBuyPrice = '550', productSellAllPrice = '550', productSellUnitPrice = '550', productSellHalfPrice = '550', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01518',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1518';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1518', '1.00', '2026-10-06', '1', '0','0151801','550','550','550','550','','0','0','0','0','0','0','0','0','0','0'); -- id=1518
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1518', '1', '0', '1', '2026-10-06'); -- id=1543
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1518', '1', '0', '0', '1518', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2406
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1518, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1518, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2312
UPDATE product SET productName = 'كود 901', productDescription = '', productCatId = '111', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01518',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1518';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 902','','111','370','370','370','370','2026-10-06','0','1','0','','0','0','0','0','0','370','370','370','370','370','0','0','0','0','.','0','0','0','370','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','370','370','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','370','0','0','0','0','0','0','','','0','0','0','0'); -- id=1519
UPDATE product SET productName = 'كود 902', productDescription = '', productCatId = '111', productBuyPrice = '370', productSellAllPrice = '370', productSellUnitPrice = '370', productSellHalfPrice = '370', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01519',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '370',lastbuyprice_withDiscount = '370',meanbuyprice = '370',meanbuyprice_withDiscount = '370' , productbuypricereal = '370' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='370',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='370',meanbuyprice_withTax='370',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='370',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1519';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1519', '1.00', '2026-10-06', '1', '0','0151901','370','370','370','370','','0','0','0','0','0','0','0','0','0','0'); -- id=1519
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1519', '1', '0', '1', '2026-10-06'); -- id=1544
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1519', '1', '0', '0', '1519', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2407
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1519, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1519, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2313
UPDATE product SET productName = 'كود 902', productDescription = '', productCatId = '111', productBuyPrice = '370.00', productSellAllPrice = '370.00', productSellUnitPrice = '370.00', productSellHalfPrice = '370.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01519',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '370',lastbuyprice_withDiscount = '370',meanbuyprice = '370',meanbuyprice_withDiscount = '370' , productbuypricereal = '370' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='370',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='370',meanbuyprice_withTax='370',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='370',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1519';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 903','','111','475','475','475','475','2026-10-06','0','1','0','','0','0','0','0','0','475','475','475','475','475','0','0','0','0','.','0','0','0','475','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','475','475','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','475','0','0','0','0','0','0','','','0','0','0','0'); -- id=1520
UPDATE product SET productName = 'كود 903', productDescription = '', productCatId = '111', productBuyPrice = '475', productSellAllPrice = '475', productSellUnitPrice = '475', productSellHalfPrice = '475', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01520',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '475',lastbuyprice_withDiscount = '475',meanbuyprice = '475',meanbuyprice_withDiscount = '475' , productbuypricereal = '475' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='475',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='475',meanbuyprice_withTax='475',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='475',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1520';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1520', '1.00', '2026-10-06', '1', '0','0152001','475','475','475','475','','0','0','0','0','0','0','0','0','0','0'); -- id=1520
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1520', '1', '0', '1', '2026-10-06'); -- id=1545
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1520', '1', '0', '0', '1520', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2408
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1520, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1520, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2314
UPDATE product SET productName = 'كود 903', productDescription = '', productCatId = '111', productBuyPrice = '475.00', productSellAllPrice = '475.00', productSellUnitPrice = '475.00', productSellHalfPrice = '475.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01520',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '475',lastbuyprice_withDiscount = '475',meanbuyprice = '475',meanbuyprice_withDiscount = '475' , productbuypricereal = '475' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='475',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='475',meanbuyprice_withTax='475',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='475',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1520';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 904','','111','420','420','420','420','2026-10-06','0','1','0','','0','0','0','0','0','420','420','420','420','420','0','0','0','0','.','0','0','0','420','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','420','420','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','420','0','0','0','0','0','0','','','0','0','0','0'); -- id=1521
UPDATE product SET productName = 'كود 904', productDescription = '', productCatId = '111', productBuyPrice = '420', productSellAllPrice = '420', productSellUnitPrice = '420', productSellHalfPrice = '420', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01521',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1521';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1521', '1.00', '2026-10-06', '1', '0','0152101','420','420','420','420','','0','0','0','0','0','0','0','0','0','0'); -- id=1521
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1521', '1', '0', '1', '2026-10-06'); -- id=1546
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1521', '1', '0', '0', '1521', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2409
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1521, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1521, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2315
UPDATE product SET productName = 'كود 904', productDescription = '', productCatId = '111', productBuyPrice = '420.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01521',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1521';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 907','','111','475','475','475','475','2026-10-06','0','1','0','','0','0','0','0','0','475','475','475','475','475','0','0','0','0','.','0','0','0','475','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','475','475','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','475','0','0','0','0','0','0','','','0','0','0','0'); -- id=1522
UPDATE product SET productName = 'كود 907', productDescription = '', productCatId = '111', productBuyPrice = '475', productSellAllPrice = '475', productSellUnitPrice = '475', productSellHalfPrice = '475', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01522',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '475',lastbuyprice_withDiscount = '475',meanbuyprice = '475',meanbuyprice_withDiscount = '475' , productbuypricereal = '475' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='475',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='475',meanbuyprice_withTax='475',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='475',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1522';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1522', '1.00', '2026-10-06', '1', '0','0152201','475','475','475','475','','0','0','0','0','0','0','0','0','0','0'); -- id=1522
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1522', '1', '0', '1', '2026-10-06'); -- id=1547
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1522', '1', '0', '0', '1522', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2410
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1522, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1522, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2316
UPDATE product SET productName = 'كود 907', productDescription = '', productCatId = '111', productBuyPrice = '475.00', productSellAllPrice = '475.00', productSellUnitPrice = '475.00', productSellHalfPrice = '475.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01522',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '475',lastbuyprice_withDiscount = '475',meanbuyprice = '475',meanbuyprice_withDiscount = '475' , productbuypricereal = '475' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='475',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='475',meanbuyprice_withTax='475',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='475',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1522';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 908','','111','400','400','400','400','2026-10-06','0','1','0','','0','0','0','0','0','400','400','400','400','400','0','0','0','0','.','0','0','0','400','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','400','400','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','400','0','0','0','0','0','0','','','0','0','0','0'); -- id=1523
UPDATE product SET productName = 'كود 908', productDescription = '', productCatId = '111', productBuyPrice = '400', productSellAllPrice = '400', productSellUnitPrice = '400', productSellHalfPrice = '400', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01523',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '400',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1523';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1523', '1.00', '2026-10-06', '1', '0','0152301','400','400','400','400','','0','0','0','0','0','0','0','0','0','0'); -- id=1523
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1523', '1', '0', '1', '2026-10-06'); -- id=1548
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1523', '1', '0', '0', '1523', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2411
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1523, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1523, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2317
UPDATE product SET productName = 'كود 908', productDescription = '', productCatId = '111', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01523',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '400',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1523';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 909','','111','465','465','465','465','2026-10-06','0','1','0','','0','0','0','0','0','465','465','465','465','465','0','0','0','0','.','0','0','0','465','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','465','465','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','465','0','0','0','0','0','0','','','0','0','0','0'); -- id=1524
UPDATE product SET productName = 'كود 909', productDescription = '', productCatId = '111', productBuyPrice = '465', productSellAllPrice = '465', productSellUnitPrice = '465', productSellHalfPrice = '465', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01524',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '465',lastbuyprice_withDiscount = '465',meanbuyprice = '465',meanbuyprice_withDiscount = '465' , productbuypricereal = '465' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='465',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='465',meanbuyprice_withTax='465',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='465',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1524';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1524', '1.00', '2026-10-06', '1', '0','0152401','465','465','465','465','','0','0','0','0','0','0','0','0','0','0'); -- id=1524
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1524', '1', '0', '1', '2026-10-06'); -- id=1549
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1524', '1', '0', '0', '1524', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2412
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1524, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1524, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2318
UPDATE product SET productName = 'كود 909', productDescription = '', productCatId = '111', productBuyPrice = '465.00', productSellAllPrice = '465.00', productSellUnitPrice = '465.00', productSellHalfPrice = '465.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01524',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '465',lastbuyprice_withDiscount = '465',meanbuyprice = '465',meanbuyprice_withDiscount = '465' , productbuypricereal = '465' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='465',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='465',meanbuyprice_withTax='465',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='465',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1524';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 910','','111','450','450','450','450','2026-10-06','0','1','0','','0','0','0','0','0','450','450','450','450','450','0','0','0','0','.','0','0','0','450','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','450','450','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','450','0','0','0','0','0','0','','','0','0','0','0'); -- id=1525
UPDATE product SET productName = 'كود 910', productDescription = '', productCatId = '111', productBuyPrice = '450', productSellAllPrice = '450', productSellUnitPrice = '450', productSellHalfPrice = '450', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01525',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1525';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1525', '1.00', '2026-10-06', '1', '0','0152501','450','450','450','450','','0','0','0','0','0','0','0','0','0','0'); -- id=1525
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1525', '1', '0', '1', '2026-10-06'); -- id=1550
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1525', '1', '0', '0', '1525', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2413
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1525, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1525, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2319
UPDATE product SET productName = 'كود 910', productDescription = '', productCatId = '111', productBuyPrice = '450.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01525',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1525';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 911','','111','385','385','385','385','2026-10-06','0','1','0','','0','0','0','0','0','385','385','385','385','385','0','0','0','0','.','0','0','0','385','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','385','385','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','385','0','0','0','0','0','0','','','0','0','0','0'); -- id=1526
UPDATE product SET productName = 'كود 911', productDescription = '', productCatId = '111', productBuyPrice = '385', productSellAllPrice = '385', productSellUnitPrice = '385', productSellHalfPrice = '385', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01526',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '385',lastbuyprice_withDiscount = '385',meanbuyprice = '385',meanbuyprice_withDiscount = '385' , productbuypricereal = '385' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='385',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='385',meanbuyprice_withTax='385',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='385',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1526';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1526', '1.00', '2026-10-06', '1', '0','0152601','385','385','385','385','','0','0','0','0','0','0','0','0','0','0'); -- id=1526
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1526', '1', '0', '1', '2026-10-06'); -- id=1551
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1526', '1', '0', '0', '1526', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2414
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1526, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1526, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2320
UPDATE product SET productName = 'كود 911', productDescription = '', productCatId = '111', productBuyPrice = '385.00', productSellAllPrice = '385.00', productSellUnitPrice = '385.00', productSellHalfPrice = '385.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01526',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '385',lastbuyprice_withDiscount = '385',meanbuyprice = '385',meanbuyprice_withDiscount = '385' , productbuypricereal = '385' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='385',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='385',meanbuyprice_withTax='385',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='385',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1526';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 912','','111','495','495','495','495','2026-10-06','0','1','0','','0','0','0','0','0','495','495','495','495','495','0','0','0','0','.','0','0','0','495','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','495','495','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','495','0','0','0','0','0','0','','','0','0','0','0'); -- id=1527
UPDATE product SET productName = 'كود 912', productDescription = '', productCatId = '111', productBuyPrice = '495', productSellAllPrice = '495', productSellUnitPrice = '495', productSellHalfPrice = '495', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01527',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '495',lastbuyprice_withDiscount = '495',meanbuyprice = '495',meanbuyprice_withDiscount = '495' , productbuypricereal = '495' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='495',meanbuyprice_withTax='495',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1527';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1527', '1.00', '2026-10-06', '1', '0','0152701','495','495','495','495','','0','0','0','0','0','0','0','0','0','0'); -- id=1527
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1527', '1', '0', '1', '2026-10-06'); -- id=1552
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1527', '1', '0', '0', '1527', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2415
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1527, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1527, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2321
UPDATE product SET productName = 'كود 912', productDescription = '', productCatId = '111', productBuyPrice = '495.00', productSellAllPrice = '495.00', productSellUnitPrice = '495.00', productSellHalfPrice = '495.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01527',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '495',lastbuyprice_withDiscount = '495',meanbuyprice = '495',meanbuyprice_withDiscount = '495' , productbuypricereal = '495' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='495',meanbuyprice_withTax='495',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1527';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 913','','111','455','455','455','455','2026-10-06','0','1','0','','0','0','0','0','0','455','455','455','455','455','0','0','0','0','.','0','0','0','455','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','455','455','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','455','0','0','0','0','0','0','','','0','0','0','0'); -- id=1528
UPDATE product SET productName = 'كود 913', productDescription = '', productCatId = '111', productBuyPrice = '455', productSellAllPrice = '455', productSellUnitPrice = '455', productSellHalfPrice = '455', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01528',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '455',lastbuyprice_withDiscount = '455',meanbuyprice = '455',meanbuyprice_withDiscount = '455' , productbuypricereal = '455' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='455',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='455',meanbuyprice_withTax='455',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='455',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1528';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1528', '1.00', '2026-10-06', '1', '0','0152801','455','455','455','455','','0','0','0','0','0','0','0','0','0','0'); -- id=1528
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1528', '1', '0', '1', '2026-10-06'); -- id=1553
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1528', '1', '0', '0', '1528', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2416
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1528, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1528, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2322
UPDATE product SET productName = 'كود 913', productDescription = '', productCatId = '111', productBuyPrice = '455.00', productSellAllPrice = '455.00', productSellUnitPrice = '455.00', productSellHalfPrice = '455.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01528',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '455',lastbuyprice_withDiscount = '455',meanbuyprice = '455',meanbuyprice_withDiscount = '455' , productbuypricereal = '455' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='455',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='455',meanbuyprice_withTax='455',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='455',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1528';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 914','','111','450','450','450','450','2026-10-06','0','1','0','','0','0','0','0','0','450','450','450','450','450','0','0','0','0','.','0','0','0','450','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','450','450','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','450','0','0','0','0','0','0','','','0','0','0','0'); -- id=1529
UPDATE product SET productName = 'كود 914', productDescription = '', productCatId = '111', productBuyPrice = '450', productSellAllPrice = '450', productSellUnitPrice = '450', productSellHalfPrice = '450', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01529',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1529';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1529', '1.00', '2026-10-06', '1', '0','0152901','450','450','450','450','','0','0','0','0','0','0','0','0','0','0'); -- id=1529
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1529', '1', '0', '1', '2026-10-06'); -- id=1554
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1529', '1', '0', '0', '1529', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2417
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1529, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1529, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2323
UPDATE product SET productName = 'كود 914', productDescription = '', productCatId = '111', productBuyPrice = '450.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01529',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1529';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 915','','111','445','445','445','445','2026-10-06','0','1','0','','0','0','0','0','0','445','445','445','445','445','0','0','0','0','.','0','0','0','445','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','445','445','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','445','0','0','0','0','0','0','','','0','0','0','0'); -- id=1530
UPDATE product SET productName = 'كود 915', productDescription = '', productCatId = '111', productBuyPrice = '445', productSellAllPrice = '445', productSellUnitPrice = '445', productSellHalfPrice = '445', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01530',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '445',lastbuyprice_withDiscount = '445',meanbuyprice = '445',meanbuyprice_withDiscount = '445' , productbuypricereal = '445' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='445',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='445',meanbuyprice_withTax='445',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='445',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1530';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1530', '1.00', '2026-10-06', '1', '0','0153001','445','445','445','445','','0','0','0','0','0','0','0','0','0','0'); -- id=1530
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1530', '1', '0', '1', '2026-10-06'); -- id=1555
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1530', '1', '0', '0', '1530', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2418
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1530, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1530, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2324
UPDATE product SET productName = 'كود 915', productDescription = '', productCatId = '111', productBuyPrice = '445.00', productSellAllPrice = '445.00', productSellUnitPrice = '445.00', productSellHalfPrice = '445.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01530',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '445',lastbuyprice_withDiscount = '445',meanbuyprice = '445',meanbuyprice_withDiscount = '445' , productbuypricereal = '445' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='445',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='445',meanbuyprice_withTax='445',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='445',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1530';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 916','','111','455','455','455','455','2026-10-06','0','1','0','','0','0','0','0','0','455','455','455','455','455','0','0','0','0','.','0','0','0','455','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','455','455','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','455','0','0','0','0','0','0','','','0','0','0','0'); -- id=1531
UPDATE product SET productName = 'كود 916', productDescription = '', productCatId = '111', productBuyPrice = '455', productSellAllPrice = '455', productSellUnitPrice = '455', productSellHalfPrice = '455', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01531',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '455',lastbuyprice_withDiscount = '455',meanbuyprice = '455',meanbuyprice_withDiscount = '455' , productbuypricereal = '455' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='455',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='455',meanbuyprice_withTax='455',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='455',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1531';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1531', '1.00', '2026-10-06', '1', '0','0153101','455','455','455','455','','0','0','0','0','0','0','0','0','0','0'); -- id=1531
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1531', '1', '0', '1', '2026-10-06'); -- id=1556
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1531', '1', '0', '0', '1531', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2419
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1531, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1531, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2325
UPDATE product SET productName = 'كود 916', productDescription = '', productCatId = '111', productBuyPrice = '455.00', productSellAllPrice = '455.00', productSellUnitPrice = '455.00', productSellHalfPrice = '455.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01531',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '455',lastbuyprice_withDiscount = '455',meanbuyprice = '455',meanbuyprice_withDiscount = '455' , productbuypricereal = '455' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='455',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='455',meanbuyprice_withTax='455',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='455',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1531';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 917','','111','475','475','475','475','2026-10-06','0','1','0','','0','0','0','0','0','475','475','475','475','475','0','0','0','0','.','0','0','0','475','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','475','475','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','475','0','0','0','0','0','0','','','0','0','0','0'); -- id=1532
UPDATE product SET productName = 'كود 917', productDescription = '', productCatId = '111', productBuyPrice = '475', productSellAllPrice = '475', productSellUnitPrice = '475', productSellHalfPrice = '475', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01532',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '475',lastbuyprice_withDiscount = '475',meanbuyprice = '475',meanbuyprice_withDiscount = '475' , productbuypricereal = '475' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='475',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='475',meanbuyprice_withTax='475',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='475',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1532';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1532', '1.00', '2026-10-06', '1', '0','0153201','475','475','475','475','','0','0','0','0','0','0','0','0','0','0'); -- id=1532
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1532', '1', '0', '1', '2026-10-06'); -- id=1557
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1532', '1', '0', '0', '1532', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2420
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1532, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1532, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2326
UPDATE product SET productName = 'كود 917', productDescription = '', productCatId = '111', productBuyPrice = '475.00', productSellAllPrice = '475.00', productSellUnitPrice = '475.00', productSellHalfPrice = '475.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01532',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '475',lastbuyprice_withDiscount = '475',meanbuyprice = '475',meanbuyprice_withDiscount = '475' , productbuypricereal = '475' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='475',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='475',meanbuyprice_withTax='475',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='475',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1532';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 918','','111','415','415','415','415','2026-10-06','0','1','0','','0','0','0','0','0','415','415','415','415','415','0','0','0','0','.','0','0','0','415','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','415','415','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','415','0','0','0','0','0','0','','','0','0','0','0'); -- id=1533
UPDATE product SET productName = 'كود 918', productDescription = '', productCatId = '111', productBuyPrice = '415', productSellAllPrice = '415', productSellUnitPrice = '415', productSellHalfPrice = '415', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01533',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '415',lastbuyprice_withDiscount = '415',meanbuyprice = '415',meanbuyprice_withDiscount = '415' , productbuypricereal = '415' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='415',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='415',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1533';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1533', '1.00', '2026-10-06', '1', '0','0153301','415','415','415','415','','0','0','0','0','0','0','0','0','0','0'); -- id=1533
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1533', '1', '0', '1', '2026-10-06'); -- id=1558
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1533', '1', '0', '0', '1533', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2421
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1533, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1533, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2327
UPDATE product SET productName = 'كود 918', productDescription = '', productCatId = '111', productBuyPrice = '415.00', productSellAllPrice = '415.00', productSellUnitPrice = '415.00', productSellHalfPrice = '415.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01533',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '415',lastbuyprice_withDiscount = '415',meanbuyprice = '415',meanbuyprice_withDiscount = '415' , productbuypricereal = '415' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='415',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='415',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1533';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 919','','111','360','360','360','360','2026-10-06','0','1','0','','0','0','0','0','0','360','360','360','360','360','0','0','0','0','.','0','0','0','360','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','360','360','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','360','0','0','0','0','0','0','','','0','0','0','0'); -- id=1534
UPDATE product SET productName = 'كود 919', productDescription = '', productCatId = '111', productBuyPrice = '360', productSellAllPrice = '360', productSellUnitPrice = '360', productSellHalfPrice = '360', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01534',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '360',lastbuyprice_withDiscount = '360',meanbuyprice = '360',meanbuyprice_withDiscount = '360' , productbuypricereal = '360' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='360',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='360',meanbuyprice_withTax='360',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='360',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1534';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1534', '1.00', '2026-10-06', '1', '0','0153401','360','360','360','360','','0','0','0','0','0','0','0','0','0','0'); -- id=1534
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1534', '1', '0', '1', '2026-10-06'); -- id=1559
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1534', '1', '0', '0', '1534', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2422
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1534, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1534, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2328
UPDATE product SET productName = 'كود 919', productDescription = '', productCatId = '111', productBuyPrice = '360.00', productSellAllPrice = '360.00', productSellUnitPrice = '360.00', productSellHalfPrice = '360.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01534',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '360',lastbuyprice_withDiscount = '360',meanbuyprice = '360',meanbuyprice_withDiscount = '360' , productbuypricereal = '360' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='360',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='360',meanbuyprice_withTax='360',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='360',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1534';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 920','','111','0','0','0','0','2026-10-06','0','1','0','','0','0','0','0','0','','0','','0','0','0','0','0','0','.',null,'0','0','0','0','','','0','0','0','','0','0','0','','','','','0','0','0','0','','0','0','','0','','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','0','0','0','0','0','0','','','0','0','0','0'); -- id=1535
UPDATE product SET productName = 'كود 920', productDescription = '', productCatId = '111', productBuyPrice = '0', productSellAllPrice = '0', productSellUnitPrice = '0', productSellHalfPrice = '0', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01535',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '',lastbuyprice_withDiscount = '0',meanbuyprice = '',meanbuyprice_withDiscount = '0' , productbuypricereal = '0' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='0',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='0',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1535';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1535', '1', '2026-10-06', '1', '0','0153501','0','0','0','0','','0','0','0','0','0','0','0','0','0','0'); -- id=1535
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1535', '1', '0', '1', '2026-10-06'); -- id=1560
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1535', '1', '0', '0', '1535', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2423
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1535, 1,'2026-10-06 20:19:31',1)
                ON DUPLICATE KEY UPDATE productid = 1535, edited = 1, sysdate = '2026-10-06 20:19:31', userid = 1; -- id=2329
UPDATE product SET productName = 'كود 920', productDescription = '', productCatId = '111', productBuyPrice = '0.00', productSellAllPrice = '0.00', productSellUnitPrice = '0.00', productSellHalfPrice = '0.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01535',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '',lastbuyprice_withDiscount = '0',meanbuyprice = '',meanbuyprice_withDiscount = '0' , productbuypricereal = '0' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='0',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='0',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1535';
COMMIT;
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:52:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:22:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 20:22:15', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3544
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:52:15";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 20:22:15', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3545
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:52:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:22:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 20:22:19', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3546
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:54:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:24:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:24:33', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3547
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('الحريف', '', '', '', '', '0', '1', '2026-10-06 20:25:30', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=105
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('105', '0', '', '0', 'إضافة مورد جديد', '105', '', '2026-10-06 20:25:30', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=178
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('الحريف', 'الحريف', 'الحريف', 'الحريف', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-06 20:25:30'); -- id=588
UPDATE supplier SET suppliername = 'الحريف', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-06', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='588',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '105';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:55:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:25:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 20:25:41', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3548
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac52e4b42258', '2026-10-06 20:22:19', '105', '0.00', '185368.5', '10', '1', '205965.00',  '185368.50', '0', '185368.5', '1', '2026-10-06 20:25:41', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=42
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01518', '42', '111', '1518', '30', '550', '16500.00', '0', '', '2026-10-06 20:25:41', '1518','','','0','0','0','0','0',null,'550','16500','0','0','0','0','0','0','0','0','1'); -- id=220
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1518, 0, 0
                    , 495, 30, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 495,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=296
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1518', '550', '30', '0', 'buyBillController.php', '220', '', '0', '0'); -- id=178
UPDATE product SET  productBuyPrice = "550" WHERE productId = 1518 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 220 ;
UPDATE product SET productName = 'كود 901', productDescription = '', productCatId = '111', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01518',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '495',meanbuyprice = '550',meanbuyprice_withDiscount = '495' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1518';
UPDATE buybilldetail SET  lastbuyprice = 550 , meanbuyprice = 550, lastbuyprice_withDiscount = 495, meanbuyprice_withDiscount = 495
        , lastbuyprice_withTax = 550, meanbuyprice_withTax = 550, lastbuyprice_withDiscountAndTax = 495
                where buybilldetailid = 220;
UPDATE productunit SET proUnitBuyPrice  = 550 * productnumber WHERE productid = 1518;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1543';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1518', '1', '30', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-06 20:22:19','0','0'); -- id=2424
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01519', '42', '111', '1519', '30', '370', '11100.00', '0', '', '2026-10-06 20:25:41', '1519','','','0','0','0','0','0',null,'370','11100','0','0','0','0','0','0','0','0','1'); -- id=221
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1519, 0, 0
                    , 333, 30, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 333,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=297
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1519', '370', '30', '0', 'buyBillController.php', '221', '', '0', '0'); -- id=179
UPDATE product SET  productBuyPrice = "370" WHERE productId = 1519 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 221 ;
UPDATE product SET productName = 'كود 902', productDescription = '', productCatId = '111', productBuyPrice = '370.00', productSellAllPrice = '370.00', productSellUnitPrice = '370.00', productSellHalfPrice = '370.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01519',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '370',lastbuyprice_withDiscount = '333',meanbuyprice = '370',meanbuyprice_withDiscount = '333' , productbuypricereal = '370.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='370',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='370',meanbuyprice_withTax='370',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='333',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1519';
UPDATE buybilldetail SET  lastbuyprice = 370 , meanbuyprice = 370, lastbuyprice_withDiscount = 333, meanbuyprice_withDiscount = 333
        , lastbuyprice_withTax = 370, meanbuyprice_withTax = 370, lastbuyprice_withDiscountAndTax = 333
                where buybilldetailid = 221;
UPDATE productunit SET proUnitBuyPrice  = 370 * productnumber WHERE productid = 1519;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1544';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1519', '1', '30', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-06 20:22:19','0','0'); -- id=2425
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01520', '42', '111', '1520', '37', '475', '17575.00', '0', '', '2026-10-06 20:25:41', '1520','','','0','0','0','0','0',null,'475','17575','0','0','0','0','0','0','0','0','1'); -- id=222
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1520, 0, 0
                    , 427.5, 37, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 427.5,
                        buyQuantity =buyQuantity+37, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=298
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1520', '475', '37', '0', 'buyBillController.php', '222', '', '0', '0'); -- id=180
UPDATE product SET  productBuyPrice = "475" WHERE productId = 1520 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 222 ;
UPDATE product SET productName = 'كود 903', productDescription = '', productCatId = '111', productBuyPrice = '475.00', productSellAllPrice = '475.00', productSellUnitPrice = '475.00', productSellHalfPrice = '475.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01520',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '475',lastbuyprice_withDiscount = '427.5',meanbuyprice = '475',meanbuyprice_withDiscount = '427.5' , productbuypricereal = '475.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='475',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='475',meanbuyprice_withTax='475',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='427.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1520';
UPDATE buybilldetail SET  lastbuyprice = 475 , meanbuyprice = 475, lastbuyprice_withDiscount = 427.5, meanbuyprice_withDiscount = 427.5
        , lastbuyprice_withTax = 475, meanbuyprice_withTax = 475, lastbuyprice_withDiscountAndTax = 427.5
                where buybilldetailid = 222;
UPDATE productunit SET proUnitBuyPrice  = 475 * productnumber WHERE productid = 1520;
UPDATE storedetail SET  productquantity = '37', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1545';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1520', '1', '37', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '37', '1', '2026-10-06 20:22:19','0','0'); -- id=2426
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01521', '42', '111', '1521', '33', '420', '13860.00', '0', '', '2026-10-06 20:25:41', '1521','','','0','0','0','0','0',null,'420','13860','0','0','0','0','0','0','0','0','1'); -- id=223
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1521, 0, 0
                    , 378, 33, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 378,
                        buyQuantity =buyQuantity+33, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=299
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1521', '420', '33', '0', 'buyBillController.php', '223', '', '0', '0'); -- id=181
UPDATE product SET  productBuyPrice = "420" WHERE productId = 1521 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 223 ;
UPDATE product SET productName = 'كود 904', productDescription = '', productCatId = '111', productBuyPrice = '420.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01521',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '378',meanbuyprice = '420',meanbuyprice_withDiscount = '378' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='378',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1521';
UPDATE buybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 378, meanbuyprice_withDiscount = 378
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 378
                where buybilldetailid = 223;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1521;
UPDATE storedetail SET  productquantity = '33', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1546';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1521', '1', '33', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '33', '1', '2026-10-06 20:22:19','0','0'); -- id=2427
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01522', '42', '111', '1522', '30', '475', '14250.00', '0', '', '2026-10-06 20:25:41', '1522','','','0','0','0','0','0',null,'475','14250','0','0','0','0','0','0','0','0','1'); -- id=224
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1522, 0, 0
                    , 427.5, 30, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 427.5,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=300
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1522', '475', '30', '0', 'buyBillController.php', '224', '', '0', '0'); -- id=182
UPDATE product SET  productBuyPrice = "475" WHERE productId = 1522 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 224 ;
UPDATE product SET productName = 'كود 907', productDescription = '', productCatId = '111', productBuyPrice = '475.00', productSellAllPrice = '475.00', productSellUnitPrice = '475.00', productSellHalfPrice = '475.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01522',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '475',lastbuyprice_withDiscount = '427.5',meanbuyprice = '475',meanbuyprice_withDiscount = '427.5' , productbuypricereal = '475.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='475',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='475',meanbuyprice_withTax='475',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='427.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1522';
UPDATE buybilldetail SET  lastbuyprice = 475 , meanbuyprice = 475, lastbuyprice_withDiscount = 427.5, meanbuyprice_withDiscount = 427.5
        , lastbuyprice_withTax = 475, meanbuyprice_withTax = 475, lastbuyprice_withDiscountAndTax = 427.5
                where buybilldetailid = 224;
UPDATE productunit SET proUnitBuyPrice  = 475 * productnumber WHERE productid = 1522;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1547';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1522', '1', '30', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-06 20:22:19','0','0'); -- id=2428
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01523', '42', '111', '1523', '34', '400', '13600.00', '0', '', '2026-10-06 20:25:41', '1523','','','0','0','0','0','0',null,'400','13600','0','0','0','0','0','0','0','0','1'); -- id=225
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1523, 0, 0
                    , 360, 34, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 360,
                        buyQuantity =buyQuantity+34, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=301
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1523', '400', '34', '0', 'buyBillController.php', '225', '', '0', '0'); -- id=183
UPDATE product SET  productBuyPrice = "400" WHERE productId = 1523 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 225 ;
UPDATE product SET productName = 'كود 908', productDescription = '', productCatId = '111', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01523',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '360',meanbuyprice = '400',meanbuyprice_withDiscount = '360' , productbuypricereal = '400.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='360',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1523';
UPDATE buybilldetail SET  lastbuyprice = 400 , meanbuyprice = 400, lastbuyprice_withDiscount = 360, meanbuyprice_withDiscount = 360
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 360
                where buybilldetailid = 225;
UPDATE productunit SET proUnitBuyPrice  = 400 * productnumber WHERE productid = 1523;
UPDATE storedetail SET  productquantity = '34', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1548';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1523', '1', '34', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '34', '1', '2026-10-06 20:22:19','0','0'); -- id=2429
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01524', '42', '111', '1524', '28', '465', '13020.00', '0', '', '2026-10-06 20:25:41', '1524','','','0','0','0','0','0',null,'465','13020','0','0','0','0','0','0','0','0','1'); -- id=226
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1524, 0, 0
                    , 418.5, 28, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 418.5,
                        buyQuantity =buyQuantity+28, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=302
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1524', '465', '28', '0', 'buyBillController.php', '226', '', '0', '0'); -- id=184
UPDATE product SET  productBuyPrice = "465" WHERE productId = 1524 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 226 ;
UPDATE product SET productName = 'كود 909', productDescription = '', productCatId = '111', productBuyPrice = '465.00', productSellAllPrice = '465.00', productSellUnitPrice = '465.00', productSellHalfPrice = '465.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01524',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '465',lastbuyprice_withDiscount = '418.5',meanbuyprice = '465',meanbuyprice_withDiscount = '418.5' , productbuypricereal = '465.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='465',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='465',meanbuyprice_withTax='465',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='418.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1524';
UPDATE buybilldetail SET  lastbuyprice = 465 , meanbuyprice = 465, lastbuyprice_withDiscount = 418.5, meanbuyprice_withDiscount = 418.5
        , lastbuyprice_withTax = 465, meanbuyprice_withTax = 465, lastbuyprice_withDiscountAndTax = 418.5
                where buybilldetailid = 226;
UPDATE productunit SET proUnitBuyPrice  = 465 * productnumber WHERE productid = 1524;
UPDATE storedetail SET  productquantity = '28', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1549';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1524', '1', '28', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '28', '1', '2026-10-06 20:22:19','0','0'); -- id=2430
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01525', '42', '111', '1525', '28', '450', '12600.00', '0', '', '2026-10-06 20:25:41', '1525','','','0','0','0','0','0',null,'450','12600','0','0','0','0','0','0','0','0','1'); -- id=227
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1525, 0, 0
                    , 405, 28, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 405,
                        buyQuantity =buyQuantity+28, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=303
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1525', '450', '28', '0', 'buyBillController.php', '227', '', '0', '0'); -- id=185
UPDATE product SET  productBuyPrice = "450" WHERE productId = 1525 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 227 ;
UPDATE product SET productName = 'كود 910', productDescription = '', productCatId = '111', productBuyPrice = '450.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01525',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '405',meanbuyprice = '450',meanbuyprice_withDiscount = '405' , productbuypricereal = '450.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='405',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1525';
UPDATE buybilldetail SET  lastbuyprice = 450 , meanbuyprice = 450, lastbuyprice_withDiscount = 405, meanbuyprice_withDiscount = 405
        , lastbuyprice_withTax = 450, meanbuyprice_withTax = 450, lastbuyprice_withDiscountAndTax = 405
                where buybilldetailid = 227;
UPDATE productunit SET proUnitBuyPrice  = 450 * productnumber WHERE productid = 1525;
UPDATE storedetail SET  productquantity = '28', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1550';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1525', '1', '28', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '28', '1', '2026-10-06 20:22:19','0','0'); -- id=2431
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01526', '42', '111', '1526', '30', '385', '11550.00', '0', '', '2026-10-06 20:25:41', '1526','','','0','0','0','0','0',null,'385','11550','0','0','0','0','0','0','0','0','1'); -- id=228
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1526, 0, 0
                    , 346.5, 30, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 346.5,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=304
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1526', '385', '30', '0', 'buyBillController.php', '228', '', '0', '0'); -- id=186
UPDATE product SET  productBuyPrice = "385" WHERE productId = 1526 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 228 ;
UPDATE product SET productName = 'كود 911', productDescription = '', productCatId = '111', productBuyPrice = '385.00', productSellAllPrice = '385.00', productSellUnitPrice = '385.00', productSellHalfPrice = '385.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01526',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '385',lastbuyprice_withDiscount = '346.5',meanbuyprice = '385',meanbuyprice_withDiscount = '346.5' , productbuypricereal = '385.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='385',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='385',meanbuyprice_withTax='385',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='346.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1526';
UPDATE buybilldetail SET  lastbuyprice = 385 , meanbuyprice = 385, lastbuyprice_withDiscount = 346.5, meanbuyprice_withDiscount = 346.5
        , lastbuyprice_withTax = 385, meanbuyprice_withTax = 385, lastbuyprice_withDiscountAndTax = 346.5
                where buybilldetailid = 228;
UPDATE productunit SET proUnitBuyPrice  = 385 * productnumber WHERE productid = 1526;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1551';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1526', '1', '30', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-06 20:22:19','0','0'); -- id=2432
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01527', '42', '111', '1527', '36', '495', '17820.00', '0', '', '2026-10-06 20:25:41', '1527','','','0','0','0','0','0',null,'495','17820','0','0','0','0','0','0','0','0','1'); -- id=229
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1527, 0, 0
                    , 445.5, 36, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 445.5,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=305
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1527', '495', '36', '0', 'buyBillController.php', '229', '', '0', '0'); -- id=187
UPDATE product SET  productBuyPrice = "495" WHERE productId = 1527 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 229 ;
UPDATE product SET productName = 'كود 912', productDescription = '', productCatId = '111', productBuyPrice = '495.00', productSellAllPrice = '495.00', productSellUnitPrice = '495.00', productSellHalfPrice = '495.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01527',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '495',lastbuyprice_withDiscount = '445.5',meanbuyprice = '495',meanbuyprice_withDiscount = '445.5' , productbuypricereal = '495.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='495',meanbuyprice_withTax='495',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='445.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1527';
UPDATE buybilldetail SET  lastbuyprice = 495 , meanbuyprice = 495, lastbuyprice_withDiscount = 445.5, meanbuyprice_withDiscount = 445.5
        , lastbuyprice_withTax = 495, meanbuyprice_withTax = 495, lastbuyprice_withDiscountAndTax = 445.5
                where buybilldetailid = 229;
UPDATE productunit SET proUnitBuyPrice  = 495 * productnumber WHERE productid = 1527;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1552';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1527', '1', '36', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-06 20:22:19','0','0'); -- id=2433
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01528', '42', '111', '1528', '38', '455', '17290.00', '0', '', '2026-10-06 20:25:41', '1528','','','0','0','0','0','0',null,'455','17290','0','0','0','0','0','0','0','0','1'); -- id=230
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1528, 0, 0
                    , 409.5, 38, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 409.5,
                        buyQuantity =buyQuantity+38, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=306
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1528', '455', '38', '0', 'buyBillController.php', '230', '', '0', '0'); -- id=188
UPDATE product SET  productBuyPrice = "455" WHERE productId = 1528 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 230 ;
UPDATE product SET productName = 'كود 913', productDescription = '', productCatId = '111', productBuyPrice = '455.00', productSellAllPrice = '455.00', productSellUnitPrice = '455.00', productSellHalfPrice = '455.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01528',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '455',lastbuyprice_withDiscount = '409.5',meanbuyprice = '455',meanbuyprice_withDiscount = '409.5' , productbuypricereal = '455.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='455',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='455',meanbuyprice_withTax='455',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='409.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1528';
UPDATE buybilldetail SET  lastbuyprice = 455 , meanbuyprice = 455, lastbuyprice_withDiscount = 409.5, meanbuyprice_withDiscount = 409.5
        , lastbuyprice_withTax = 455, meanbuyprice_withTax = 455, lastbuyprice_withDiscountAndTax = 409.5
                where buybilldetailid = 230;
UPDATE productunit SET proUnitBuyPrice  = 455 * productnumber WHERE productid = 1528;
UPDATE storedetail SET  productquantity = '38', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1553';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1528', '1', '38', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '38', '1', '2026-10-06 20:22:19','0','0'); -- id=2434
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01529', '42', '111', '1529', '30', '450', '13500.00', '0', '', '2026-10-06 20:25:41', '1529','','','0','0','0','0','0',null,'450','13500','0','0','0','0','0','0','0','0','1'); -- id=231
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1529, 0, 0
                    , 405, 30, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 405,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=307
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1529', '450', '30', '0', 'buyBillController.php', '231', '', '0', '0'); -- id=189
UPDATE product SET  productBuyPrice = "450" WHERE productId = 1529 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 231 ;
UPDATE product SET productName = 'كود 914', productDescription = '', productCatId = '111', productBuyPrice = '450.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01529',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '405',meanbuyprice = '450',meanbuyprice_withDiscount = '405' , productbuypricereal = '450.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='405',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1529';
UPDATE buybilldetail SET  lastbuyprice = 450 , meanbuyprice = 450, lastbuyprice_withDiscount = 405, meanbuyprice_withDiscount = 405
        , lastbuyprice_withTax = 450, meanbuyprice_withTax = 450, lastbuyprice_withDiscountAndTax = 405
                where buybilldetailid = 231;
UPDATE productunit SET proUnitBuyPrice  = 450 * productnumber WHERE productid = 1529;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1554';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1529', '1', '30', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-06 20:22:19','0','0'); -- id=2435
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01530', '42', '111', '1530', '37', '445', '16465.00', '0', '', '2026-10-06 20:25:41', '1530','','','0','0','0','0','0',null,'445','16465','0','0','0','0','0','0','0','0','1'); -- id=232
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1530, 0, 0
                    , 400.5, 37, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 400.5,
                        buyQuantity =buyQuantity+37, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=308
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1530', '445', '37', '0', 'buyBillController.php', '232', '', '0', '0'); -- id=190
UPDATE product SET  productBuyPrice = "445" WHERE productId = 1530 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 232 ;
UPDATE product SET productName = 'كود 915', productDescription = '', productCatId = '111', productBuyPrice = '445.00', productSellAllPrice = '445.00', productSellUnitPrice = '445.00', productSellHalfPrice = '445.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01530',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '445',lastbuyprice_withDiscount = '400.5',meanbuyprice = '445',meanbuyprice_withDiscount = '400.5' , productbuypricereal = '445.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='445',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='445',meanbuyprice_withTax='445',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1530';
UPDATE buybilldetail SET  lastbuyprice = 445 , meanbuyprice = 445, lastbuyprice_withDiscount = 400.5, meanbuyprice_withDiscount = 400.5
        , lastbuyprice_withTax = 445, meanbuyprice_withTax = 445, lastbuyprice_withDiscountAndTax = 400.5
                where buybilldetailid = 232;
UPDATE productunit SET proUnitBuyPrice  = 445 * productnumber WHERE productid = 1530;
UPDATE storedetail SET  productquantity = '37', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1555';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1530', '1', '37', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '37', '1', '2026-10-06 20:22:19','0','0'); -- id=2436
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01531', '42', '111', '1531', '37', '455', '16835.00', '0', '', '2026-10-06 20:25:41', '1531','','','0','0','0','0','0',null,'455','16835','0','0','0','0','0','0','0','0','1'); -- id=233
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:22:19', 1, 1531, 0, 0
                    , 409.5, 37, 0, 0, 1, '2026-10-06 20:25:41')
                ON DUPLICATE KEY UPDATE buyprice = 409.5,
                        buyQuantity =buyQuantity+37, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:25:41' ; -- id=309
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1531', '455', '37', '0', 'buyBillController.php', '233', '', '0', '0'); -- id=191
UPDATE product SET  productBuyPrice = "455" WHERE productId = 1531 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 233 ;
UPDATE product SET productName = 'كود 916', productDescription = '', productCatId = '111', productBuyPrice = '455.00', productSellAllPrice = '455.00', productSellUnitPrice = '455.00', productSellHalfPrice = '455.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01531',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '455',lastbuyprice_withDiscount = '409.5',meanbuyprice = '455',meanbuyprice_withDiscount = '409.5' , productbuypricereal = '455.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='455',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='455',meanbuyprice_withTax='455',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='409.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1531';
UPDATE buybilldetail SET  lastbuyprice = 455 , meanbuyprice = 455, lastbuyprice_withDiscount = 409.5, meanbuyprice_withDiscount = 409.5
        , lastbuyprice_withTax = 455, meanbuyprice_withTax = 455, lastbuyprice_withDiscountAndTax = 409.5
                where buybilldetailid = 233;
UPDATE productunit SET proUnitBuyPrice  = 455 * productnumber WHERE productid = 1531;
UPDATE storedetail SET  productquantity = '37', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1556';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1531', '1', '37', '0', '42', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '37', '1', '2026-10-06 20:22:19','0','0'); -- id=2437
UPDATE supplier SET  suppliercurrentDebt = '185368.5',suppliercurrentDebtInCurrency= '185368.5' , userid = '1', supplierdate = '2026-10-06 20:25:41'   WHERE supplierid = '105';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('105', '0.00', '185368.5', '0', 'اضافة فاتورة مشتريات', '42', '185368.5', '2026-10-06 20:22:19', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','185368.5','1','0','185368.5','185368.5','0',''); -- id=179
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '185368.5', '185368.5', '2026-10-06', '1', '0', '0', '2026-10-06 20:25:41','اضافة فاتورة مشتريات رقم 42','1','0',null,'0','42','buyBillController.php?do=details&id=42'); -- id=1194
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1194', '382', '185368.5', '','0'); -- id=1200
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16096046.74', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1194', '588', '185368.5', '','0'); -- id=1194
UPDATE accountstree SET name = 'الحريف', customName = 'الحريف', customNameEn = 'الحريف', nameEn = 'الحريف', parent = '81', accountNature = '1', theValue = '185368.5', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-06 20:25:30' WHERE id = '588';
update buybill set dailyentryid='1194,0' where buybillid=42;
COMMIT;
UPDATE product SET overAllAveragePrice = 495 WHERE productId = 1518;UPDATE product SET overAllAveragePrice = 333 WHERE productId = 1519;UPDATE product SET overAllAveragePrice = 427.5 WHERE productId = 1520;UPDATE product SET overAllAveragePrice = 378 WHERE productId = 1521;UPDATE product SET overAllAveragePrice = 427.5 WHERE productId = 1522;UPDATE product SET overAllAveragePrice = 360 WHERE productId = 1523;UPDATE product SET overAllAveragePrice = 418.5 WHERE productId = 1524;UPDATE product SET overAllAveragePrice = 405 WHERE productId = 1525;UPDATE product SET overAllAveragePrice = 346.5 WHERE productId = 1526;UPDATE product SET overAllAveragePrice = 445.5 WHERE productId = 1527;UPDATE product SET overAllAveragePrice = 409.5 WHERE productId = 1528;UPDATE product SET overAllAveragePrice = 405 WHERE productId = 1529;UPDATE product SET overAllAveragePrice = 400.5 WHERE productId = 1530;UPDATE product SET overAllAveragePrice = 409.5 WHERE productId = 1531;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:55:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:25:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 20:25:41', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=42'); -- id=3549
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:55:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:25:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:25:43', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=42&type=2'); -- id=3550
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:56:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:26:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 20:26:50', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php'); -- id=3551
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:56:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:26:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 20:26:50', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=3552
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:56:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:26:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-06 20:26:53', '1', 'details', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=details&id=42'); -- id=3553
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:56:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:26:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:26:55', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=42&type=2'); -- id=3554
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:57:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:27:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:27:57', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=42&type=2'); -- id=3555
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:57:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:27:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:27:59', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3556
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:58:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:28:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 20:28:36', '1', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=104'); -- id=3557
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 16:58:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:28:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 20:28:46', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3558
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:02:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:32:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 20:32:00', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3559
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:02:00";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 20:32:00', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3560
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:02:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:32:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:32:03', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3561
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:02:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:32:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:32:41', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3562
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:03:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:33:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:33:20', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3563
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:04:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:34:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:34:24', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3564
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:04:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:34:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:34:50', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3565
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:05:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:35:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 20:35:01', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3566
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:06:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:36:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 20:36:01', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3567
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:06:01";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 20:36:01', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3568
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:06:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:36:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:36:04', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3569
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:07:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:37:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:37:47', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3570
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 921','','111','415','415','415','415','2026-10-06','0','1','0','','0','0','0','0','0','415','415','415','415','415','0','0','0','0','.','0','0','0','415','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','415','415','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','415','0','0','0','0','0','0','','','0','0','0','0'); -- id=1536
UPDATE product SET productName = 'كود 921', productDescription = '', productCatId = '111', productBuyPrice = '415', productSellAllPrice = '415', productSellUnitPrice = '415', productSellHalfPrice = '415', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01536',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '415',lastbuyprice_withDiscount = '415',meanbuyprice = '415',meanbuyprice_withDiscount = '415' , productbuypricereal = '415' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='415',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='415',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1536';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1536', '1.00', '2026-10-06', '1', '0','0153601','415','415','415','415','','0','0','0','0','0','0','0','0','0','0'); -- id=1536
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1536', '1', '0', '1', '2026-10-06'); -- id=1561
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1536', '1', '0', '0', '1536', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2438
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1536, 1,'2026-10-06 20:37:47',1)
                ON DUPLICATE KEY UPDATE productid = 1536, edited = 1, sysdate = '2026-10-06 20:37:47', userid = 1; -- id=2330
UPDATE product SET productName = 'كود 921', productDescription = '', productCatId = '111', productBuyPrice = '415.00', productSellAllPrice = '415.00', productSellUnitPrice = '415.00', productSellHalfPrice = '415.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01536',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '415',lastbuyprice_withDiscount = '415',meanbuyprice = '415',meanbuyprice_withDiscount = '415' , productbuypricereal = '415' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='415',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='415',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1536';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 922','','111','495','495','495','495','2026-10-06','0','1','0','','0','0','0','0','0','495','495','495','495','495','0','0','0','0','.','0','0','0','495','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','495','495','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','495','0','0','0','0','0','0','','','0','0','0','0'); -- id=1537
UPDATE product SET productName = 'كود 922', productDescription = '', productCatId = '111', productBuyPrice = '495', productSellAllPrice = '495', productSellUnitPrice = '495', productSellHalfPrice = '495', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01537',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '495',lastbuyprice_withDiscount = '495',meanbuyprice = '495',meanbuyprice_withDiscount = '495' , productbuypricereal = '495' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='495',meanbuyprice_withTax='495',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1537';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1537', '1.00', '2026-10-06', '1', '0','0153701','495','495','495','495','','0','0','0','0','0','0','0','0','0','0'); -- id=1537
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1537', '1', '0', '1', '2026-10-06'); -- id=1562
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1537', '1', '0', '0', '1537', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2439
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1537, 1,'2026-10-06 20:37:47',1)
                ON DUPLICATE KEY UPDATE productid = 1537, edited = 1, sysdate = '2026-10-06 20:37:47', userid = 1; -- id=2331
UPDATE product SET productName = 'كود 922', productDescription = '', productCatId = '111', productBuyPrice = '495.00', productSellAllPrice = '495.00', productSellUnitPrice = '495.00', productSellHalfPrice = '495.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01537',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '495',lastbuyprice_withDiscount = '495',meanbuyprice = '495',meanbuyprice_withDiscount = '495' , productbuypricereal = '495' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='495',meanbuyprice_withTax='495',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1537';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 923','','111','495','495','495','495','2026-10-06','0','1','0','','0','0','0','0','0','495','495','495','495','495','0','0','0','0','.','0','0','0','495','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','495','495','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','495','0','0','0','0','0','0','','','0','0','0','0'); -- id=1538
UPDATE product SET productName = 'كود 923', productDescription = '', productCatId = '111', productBuyPrice = '495', productSellAllPrice = '495', productSellUnitPrice = '495', productSellHalfPrice = '495', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01538',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '495',lastbuyprice_withDiscount = '495',meanbuyprice = '495',meanbuyprice_withDiscount = '495' , productbuypricereal = '495' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='495',meanbuyprice_withTax='495',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1538';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1538', '1.00', '2026-10-06', '1', '0','0153801','495','495','495','495','','0','0','0','0','0','0','0','0','0','0'); -- id=1538
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1538', '1', '0', '1', '2026-10-06'); -- id=1563
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1538', '1', '0', '0', '1538', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2440
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1538, 1,'2026-10-06 20:37:47',1)
                ON DUPLICATE KEY UPDATE productid = 1538, edited = 1, sysdate = '2026-10-06 20:37:47', userid = 1; -- id=2332
UPDATE product SET productName = 'كود 923', productDescription = '', productCatId = '111', productBuyPrice = '495.00', productSellAllPrice = '495.00', productSellUnitPrice = '495.00', productSellHalfPrice = '495.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01538',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '495',lastbuyprice_withDiscount = '495',meanbuyprice = '495',meanbuyprice_withDiscount = '495' , productbuypricereal = '495' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='495',meanbuyprice_withTax='495',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1538';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 924','','111','530','530','530','530','2026-10-06','0','1','0','','0','0','0','0','0','530','530','530','530','530','0','0','0','0','.','0','0','0','530','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','530','530','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','530','0','0','0','0','0','0','','','0','0','0','0'); -- id=1539
UPDATE product SET productName = 'كود 924', productDescription = '', productCatId = '111', productBuyPrice = '530', productSellAllPrice = '530', productSellUnitPrice = '530', productSellHalfPrice = '530', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01539',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '530',meanbuyprice = '530',meanbuyprice_withDiscount = '530' , productbuypricereal = '530' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='530',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1539';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1539', '1.00', '2026-10-06', '1', '0','0153901','530','530','530','530','','0','0','0','0','0','0','0','0','0','0'); -- id=1539
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1539', '1', '0', '1', '2026-10-06'); -- id=1564
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1539', '1', '0', '0', '1539', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2441
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1539, 1,'2026-10-06 20:37:47',1)
                ON DUPLICATE KEY UPDATE productid = 1539, edited = 1, sysdate = '2026-10-06 20:37:47', userid = 1; -- id=2333
UPDATE product SET productName = 'كود 924', productDescription = '', productCatId = '111', productBuyPrice = '530.00', productSellAllPrice = '530.00', productSellUnitPrice = '530.00', productSellHalfPrice = '530.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01539',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '530',meanbuyprice = '530',meanbuyprice_withDiscount = '530' , productbuypricereal = '530' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='530',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1539';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 926','','111','550','550','550','550','2026-10-06','0','1','0','','0','0','0','0','0','550','550','550','550','550','0','0','0','0','.','0','0','0','550','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','550','550','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','550','0','0','0','0','0','0','','','0','0','0','0'); -- id=1540
UPDATE product SET productName = 'كود 926', productDescription = '', productCatId = '111', productBuyPrice = '550', productSellAllPrice = '550', productSellUnitPrice = '550', productSellHalfPrice = '550', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01540',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1540';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1540', '1.00', '2026-10-06', '1', '0','0154001','550','550','550','550','','0','0','0','0','0','0','0','0','0','0'); -- id=1540
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1540', '1', '0', '1', '2026-10-06'); -- id=1565
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1540', '1', '0', '0', '1540', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2442
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1540, 1,'2026-10-06 20:37:47',1)
                ON DUPLICATE KEY UPDATE productid = 1540, edited = 1, sysdate = '2026-10-06 20:37:47', userid = 1; -- id=2334
UPDATE product SET productName = 'كود 926', productDescription = '', productCatId = '111', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01540',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1540';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 927','','111','490','490','490','490','2026-10-06','0','1','0','','0','0','0','0','0','490','490','490','490','490','0','0','0','0','.','0','0','0','490','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','490','490','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','490','0','0','0','0','0','0','','','0','0','0','0'); -- id=1541
UPDATE product SET productName = 'كود 927', productDescription = '', productCatId = '111', productBuyPrice = '490', productSellAllPrice = '490', productSellUnitPrice = '490', productSellHalfPrice = '490', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01541',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '490',lastbuyprice_withDiscount = '490',meanbuyprice = '490',meanbuyprice_withDiscount = '490' , productbuypricereal = '490' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='490',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='490',meanbuyprice_withTax='490',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='490',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1541';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1541', '1.00', '2026-10-06', '1', '0','0154101','490','490','490','490','','0','0','0','0','0','0','0','0','0','0'); -- id=1541
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1541', '1', '0', '1', '2026-10-06'); -- id=1566
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1541', '1', '0', '0', '1541', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2443
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1541, 1,'2026-10-06 20:37:47',1)
                ON DUPLICATE KEY UPDATE productid = 1541, edited = 1, sysdate = '2026-10-06 20:37:47', userid = 1; -- id=2335
UPDATE product SET productName = 'كود 927', productDescription = '', productCatId = '111', productBuyPrice = '490.00', productSellAllPrice = '490.00', productSellUnitPrice = '490.00', productSellHalfPrice = '490.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01541',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '490',lastbuyprice_withDiscount = '490',meanbuyprice = '490',meanbuyprice_withDiscount = '490' , productbuypricereal = '490' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='490',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='490',meanbuyprice_withTax='490',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='490',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1541';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 928','','111','575','575','575','575','2026-10-06','0','1','0','','0','0','0','0','0','575','575','575','575','575','0','0','0','0','.','0','0','0','575','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','575','575','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','575','0','0','0','0','0','0','','','0','0','0','0'); -- id=1542
UPDATE product SET productName = 'كود 928', productDescription = '', productCatId = '111', productBuyPrice = '575', productSellAllPrice = '575', productSellUnitPrice = '575', productSellHalfPrice = '575', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01542',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '575',lastbuyprice_withDiscount = '575',meanbuyprice = '575',meanbuyprice_withDiscount = '575' , productbuypricereal = '575' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='575',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='575',meanbuyprice_withTax='575',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='575',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1542';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1542', '1.00', '2026-10-06', '1', '0','0154201','575','575','575','575','','0','0','0','0','0','0','0','0','0','0'); -- id=1542
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1542', '1', '0', '1', '2026-10-06'); -- id=1567
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1542', '1', '0', '0', '1542', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2444
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1542, 1,'2026-10-06 20:37:47',1)
                ON DUPLICATE KEY UPDATE productid = 1542, edited = 1, sysdate = '2026-10-06 20:37:47', userid = 1; -- id=2336
UPDATE product SET productName = 'كود 928', productDescription = '', productCatId = '111', productBuyPrice = '575.00', productSellAllPrice = '575.00', productSellUnitPrice = '575.00', productSellHalfPrice = '575.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01542',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '575',lastbuyprice_withDiscount = '575',meanbuyprice = '575',meanbuyprice_withDiscount = '575' , productbuypricereal = '575' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='575',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='575',meanbuyprice_withTax='575',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='575',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1542';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:07:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:37:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:37:49', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3571
UPDATE productunit SET unitid = '1', productid = '1535', productnumber = '1.00', productunitdate = '2026-10-06', userid = '1', conditions = '0',proUnitParcode='0153501',proUnitSellAllPrice='415',proUnitSellHalfPrice='415',proUnitSellUnitPrice ='415',proUnitBuyPrice='0',unitInTax='',proUnitPrice4='0',proUnitPrice5='0',proUnitPrice6='0',proUnitPrice7='0',proUnitPrice8='0',proUnitPrice9='0',proUnitPrice10='0',proUnitPrice11='0',proUnitPrice12='0',proUnitPrice13='0' WHERE productunitid = '1535';
UPDATE product SET productName = 'كود 920', productDescription = '', productCatId = '111', productBuyPrice = '415', productSellAllPrice = '415', productSellUnitPrice = '415', productSellHalfPrice = '415', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01535',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '0.00',lastbuyprice_withDiscount = '0',meanbuyprice = '0.00',meanbuyprice_withDiscount = '0' , productbuypricereal = '0' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='0',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='0',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1535';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:09:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:39:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 20:39:54', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3572
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac53145803f0', '2026-10-06 20:35:01', '105', '185368.50', '334867.5', '10', '1', '166110.00',  '149499.00', '0', '149499', '1', '2026-10-06 20:39:54', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=43
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01532', '43', '111', '1532', '30', '475', '14250.00', '0', '', '2026-10-06 20:39:54', '1532','','','0','0','0','0','0',null,'475','14250','0','0','0','0','0','0','0','0','1'); -- id=234
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:35:01', 1, 1532, 0, 0
                    , 427.5, 30, 0, 0, 1, '2026-10-06 20:39:54')
                ON DUPLICATE KEY UPDATE buyprice = 427.5,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:39:54' ; -- id=310
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1532', '475', '30', '0', 'buyBillController.php', '234', '', '0', '0'); -- id=192
UPDATE product SET  productBuyPrice = "475" WHERE productId = 1532 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 234 ;
UPDATE product SET productName = 'كود 917', productDescription = '', productCatId = '111', productBuyPrice = '475.00', productSellAllPrice = '475.00', productSellUnitPrice = '475.00', productSellHalfPrice = '475.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01532',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '475',lastbuyprice_withDiscount = '427.5',meanbuyprice = '475',meanbuyprice_withDiscount = '427.5' , productbuypricereal = '475.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='475',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='475',meanbuyprice_withTax='475',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='427.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1532';
UPDATE buybilldetail SET  lastbuyprice = 475 , meanbuyprice = 475, lastbuyprice_withDiscount = 427.5, meanbuyprice_withDiscount = 427.5
        , lastbuyprice_withTax = 475, meanbuyprice_withTax = 475, lastbuyprice_withDiscountAndTax = 427.5
                where buybilldetailid = 234;
UPDATE productunit SET proUnitBuyPrice  = 475 * productnumber WHERE productid = 1532;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1557';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1532', '1', '30', '0', '43', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-06 20:35:01','0','0'); -- id=2445
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01533', '43', '111', '1533', '40', '415', '16600.00', '0', '', '2026-10-06 20:39:54', '1533','','','0','0','0','0','0',null,'415','16600','0','0','0','0','0','0','0','0','1'); -- id=235
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:35:01', 1, 1533, 0, 0
                    , 373.5, 40, 0, 0, 1, '2026-10-06 20:39:54')
                ON DUPLICATE KEY UPDATE buyprice = 373.5,
                        buyQuantity =buyQuantity+40, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:39:54' ; -- id=311
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1533', '415', '40', '0', 'buyBillController.php', '235', '', '0', '0'); -- id=193
UPDATE product SET  productBuyPrice = "415" WHERE productId = 1533 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 235 ;
UPDATE product SET productName = 'كود 918', productDescription = '', productCatId = '111', productBuyPrice = '415.00', productSellAllPrice = '415.00', productSellUnitPrice = '415.00', productSellHalfPrice = '415.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01533',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '415',lastbuyprice_withDiscount = '373.5',meanbuyprice = '415',meanbuyprice_withDiscount = '373.5' , productbuypricereal = '415.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='415',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='373.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1533';
UPDATE buybilldetail SET  lastbuyprice = 415 , meanbuyprice = 415, lastbuyprice_withDiscount = 373.5, meanbuyprice_withDiscount = 373.5
        , lastbuyprice_withTax = 415, meanbuyprice_withTax = 415, lastbuyprice_withDiscountAndTax = 373.5
                where buybilldetailid = 235;
UPDATE productunit SET proUnitBuyPrice  = 415 * productnumber WHERE productid = 1533;
UPDATE storedetail SET  productquantity = '40', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1558';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1533', '1', '40', '0', '43', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '40', '1', '2026-10-06 20:35:01','0','0'); -- id=2446
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01534', '43', '111', '1534', '37', '360', '13320.00', '0', '', '2026-10-06 20:39:54', '1534','','','0','0','0','0','0',null,'360','13320','0','0','0','0','0','0','0','0','1'); -- id=236
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:35:01', 1, 1534, 0, 0
                    , 324, 37, 0, 0, 1, '2026-10-06 20:39:54')
                ON DUPLICATE KEY UPDATE buyprice = 324,
                        buyQuantity =buyQuantity+37, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:39:54' ; -- id=312
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1534', '360', '37', '0', 'buyBillController.php', '236', '', '0', '0'); -- id=194
UPDATE product SET  productBuyPrice = "360" WHERE productId = 1534 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 236 ;
UPDATE product SET productName = 'كود 919', productDescription = '', productCatId = '111', productBuyPrice = '360.00', productSellAllPrice = '360.00', productSellUnitPrice = '360.00', productSellHalfPrice = '360.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01534',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '360',lastbuyprice_withDiscount = '324',meanbuyprice = '360',meanbuyprice_withDiscount = '324' , productbuypricereal = '360.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='360',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='360',meanbuyprice_withTax='360',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='324',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1534';
UPDATE buybilldetail SET  lastbuyprice = 360 , meanbuyprice = 360, lastbuyprice_withDiscount = 324, meanbuyprice_withDiscount = 324
        , lastbuyprice_withTax = 360, meanbuyprice_withTax = 360, lastbuyprice_withDiscountAndTax = 324
                where buybilldetailid = 236;
UPDATE productunit SET proUnitBuyPrice  = 360 * productnumber WHERE productid = 1534;
UPDATE storedetail SET  productquantity = '37', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1559';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1534', '1', '37', '0', '43', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '37', '1', '2026-10-06 20:35:01','0','0'); -- id=2447
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01535', '43', '111', '1535', '39', '415', '16185.00', '0', '', '2026-10-06 20:39:54', '1535','','','0','0','0','0','0',null,'415','16185','0','0','0','0','0','0','0','0','1'); -- id=237
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:35:01', 1, 1535, 0, 0
                    , 373.5, 39, 0, 0, 1, '2026-10-06 20:39:54')
                ON DUPLICATE KEY UPDATE buyprice = 373.5,
                        buyQuantity =buyQuantity+39, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:39:54' ; -- id=313
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1535', '415', '39', '0', 'buyBillController.php', '237', '', '0', '0'); -- id=195
UPDATE product SET  productBuyPrice = "415" WHERE productId = 1535 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 237 ;
UPDATE product SET productName = 'كود 920', productDescription = '', productCatId = '111', productBuyPrice = '415.00', productSellAllPrice = '415.00', productSellUnitPrice = '415.00', productSellHalfPrice = '415.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01535',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '415',lastbuyprice_withDiscount = '373.5',meanbuyprice = '415',meanbuyprice_withDiscount = '373.5' , productbuypricereal = '0.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='0',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='415',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='373.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1535';
UPDATE buybilldetail SET  lastbuyprice = 415 , meanbuyprice = 415, lastbuyprice_withDiscount = 373.5, meanbuyprice_withDiscount = 373.5
        , lastbuyprice_withTax = 415, meanbuyprice_withTax = 415, lastbuyprice_withDiscountAndTax = 373.5
                where buybilldetailid = 237;
UPDATE productunit SET proUnitBuyPrice  = 415 * productnumber WHERE productid = 1535;
UPDATE storedetail SET  productquantity = '39', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1560';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1535', '1', '39', '0', '43', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '39', '1', '2026-10-06 20:35:01','0','0'); -- id=2448
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01536', '43', '111', '1536', '36', '415', '14940.00', '0', '', '2026-10-06 20:39:54', '1536','','','0','0','0','0','0',null,'415','14940','0','0','0','0','0','0','0','0','1'); -- id=238
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:35:01', 1, 1536, 0, 0
                    , 373.5, 36, 0, 0, 1, '2026-10-06 20:39:54')
                ON DUPLICATE KEY UPDATE buyprice = 373.5,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:39:54' ; -- id=314
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1536', '415', '36', '0', 'buyBillController.php', '238', '', '0', '0'); -- id=196
UPDATE product SET  productBuyPrice = "415" WHERE productId = 1536 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 238 ;
UPDATE product SET productName = 'كود 921', productDescription = '', productCatId = '111', productBuyPrice = '415.00', productSellAllPrice = '415.00', productSellUnitPrice = '415.00', productSellHalfPrice = '415.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01536',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '415',lastbuyprice_withDiscount = '373.5',meanbuyprice = '415',meanbuyprice_withDiscount = '373.5' , productbuypricereal = '415.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='415',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='373.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1536';
UPDATE buybilldetail SET  lastbuyprice = 415 , meanbuyprice = 415, lastbuyprice_withDiscount = 373.5, meanbuyprice_withDiscount = 373.5
        , lastbuyprice_withTax = 415, meanbuyprice_withTax = 415, lastbuyprice_withDiscountAndTax = 373.5
                where buybilldetailid = 238;
UPDATE productunit SET proUnitBuyPrice  = 415 * productnumber WHERE productid = 1536;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1561';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1536', '1', '36', '0', '43', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-06 20:35:01','0','0'); -- id=2449
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01537', '43', '111', '1537', '30', '495', '14850.00', '0', '', '2026-10-06 20:39:54', '1537','','','0','0','0','0','0',null,'495','14850','0','0','0','0','0','0','0','0','1'); -- id=239
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:35:01', 1, 1537, 0, 0
                    , 445.5, 30, 0, 0, 1, '2026-10-06 20:39:54')
                ON DUPLICATE KEY UPDATE buyprice = 445.5,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:39:54' ; -- id=315
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1537', '495', '30', '0', 'buyBillController.php', '239', '', '0', '0'); -- id=197
UPDATE product SET  productBuyPrice = "495" WHERE productId = 1537 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 239 ;
UPDATE product SET productName = 'كود 922', productDescription = '', productCatId = '111', productBuyPrice = '495.00', productSellAllPrice = '495.00', productSellUnitPrice = '495.00', productSellHalfPrice = '495.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01537',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '495',lastbuyprice_withDiscount = '445.5',meanbuyprice = '495',meanbuyprice_withDiscount = '445.5' , productbuypricereal = '495.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='495',meanbuyprice_withTax='495',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='445.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1537';
UPDATE buybilldetail SET  lastbuyprice = 495 , meanbuyprice = 495, lastbuyprice_withDiscount = 445.5, meanbuyprice_withDiscount = 445.5
        , lastbuyprice_withTax = 495, meanbuyprice_withTax = 495, lastbuyprice_withDiscountAndTax = 445.5
                where buybilldetailid = 239;
UPDATE productunit SET proUnitBuyPrice  = 495 * productnumber WHERE productid = 1537;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1562';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1537', '1', '30', '0', '43', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-06 20:35:01','0','0'); -- id=2450
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01538', '43', '111', '1538', '36', '495', '17820.00', '0', '', '2026-10-06 20:39:54', '1538','','','0','0','0','0','0',null,'495','17820','0','0','0','0','0','0','0','0','1'); -- id=240
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:35:01', 1, 1538, 0, 0
                    , 445.5, 36, 0, 0, 1, '2026-10-06 20:39:54')
                ON DUPLICATE KEY UPDATE buyprice = 445.5,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:39:54' ; -- id=316
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1538', '495', '36', '0', 'buyBillController.php', '240', '', '0', '0'); -- id=198
UPDATE product SET  productBuyPrice = "495" WHERE productId = 1538 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 240 ;
UPDATE product SET productName = 'كود 923', productDescription = '', productCatId = '111', productBuyPrice = '495.00', productSellAllPrice = '495.00', productSellUnitPrice = '495.00', productSellHalfPrice = '495.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01538',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '495',lastbuyprice_withDiscount = '445.5',meanbuyprice = '495',meanbuyprice_withDiscount = '445.5' , productbuypricereal = '495.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='495',meanbuyprice_withTax='495',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='445.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1538';
UPDATE buybilldetail SET  lastbuyprice = 495 , meanbuyprice = 495, lastbuyprice_withDiscount = 445.5, meanbuyprice_withDiscount = 445.5
        , lastbuyprice_withTax = 495, meanbuyprice_withTax = 495, lastbuyprice_withDiscountAndTax = 445.5
                where buybilldetailid = 240;
UPDATE productunit SET proUnitBuyPrice  = 495 * productnumber WHERE productid = 1538;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1563';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1538', '1', '36', '0', '43', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-06 20:35:01','0','0'); -- id=2451
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01539', '43', '111', '1539', '31', '530', '16430.00', '0', '', '2026-10-06 20:39:54', '1539','','','0','0','0','0','0',null,'530','16430','0','0','0','0','0','0','0','0','1'); -- id=241
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:35:01', 1, 1539, 0, 0
                    , 477, 31, 0, 0, 1, '2026-10-06 20:39:54')
                ON DUPLICATE KEY UPDATE buyprice = 477,
                        buyQuantity =buyQuantity+31, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:39:54' ; -- id=317
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1539', '530', '31', '0', 'buyBillController.php', '241', '', '0', '0'); -- id=199
UPDATE product SET  productBuyPrice = "530" WHERE productId = 1539 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 241 ;
UPDATE product SET productName = 'كود 924', productDescription = '', productCatId = '111', productBuyPrice = '530.00', productSellAllPrice = '530.00', productSellUnitPrice = '530.00', productSellHalfPrice = '530.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01539',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '477',meanbuyprice = '530',meanbuyprice_withDiscount = '477' , productbuypricereal = '530.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='477',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1539';
UPDATE buybilldetail SET  lastbuyprice = 530 , meanbuyprice = 530, lastbuyprice_withDiscount = 477, meanbuyprice_withDiscount = 477
        , lastbuyprice_withTax = 530, meanbuyprice_withTax = 530, lastbuyprice_withDiscountAndTax = 477
                where buybilldetailid = 241;
UPDATE productunit SET proUnitBuyPrice  = 530 * productnumber WHERE productid = 1539;
UPDATE storedetail SET  productquantity = '31', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1564';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1539', '1', '31', '0', '43', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '31', '1', '2026-10-06 20:35:01','0','0'); -- id=2452
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01540', '43', '111', '1540', '31', '550', '17050.00', '0', '', '2026-10-06 20:39:54', '1540','','','0','0','0','0','0',null,'550','17050','0','0','0','0','0','0','0','0','1'); -- id=242
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:35:01', 1, 1540, 0, 0
                    , 495, 31, 0, 0, 1, '2026-10-06 20:39:54')
                ON DUPLICATE KEY UPDATE buyprice = 495,
                        buyQuantity =buyQuantity+31, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:39:54' ; -- id=318
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1540', '550', '31', '0', 'buyBillController.php', '242', '', '0', '0'); -- id=200
UPDATE product SET  productBuyPrice = "550" WHERE productId = 1540 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 242 ;
UPDATE product SET productName = 'كود 926', productDescription = '', productCatId = '111', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01540',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '495',meanbuyprice = '550',meanbuyprice_withDiscount = '495' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1540';
UPDATE buybilldetail SET  lastbuyprice = 550 , meanbuyprice = 550, lastbuyprice_withDiscount = 495, meanbuyprice_withDiscount = 495
        , lastbuyprice_withTax = 550, meanbuyprice_withTax = 550, lastbuyprice_withDiscountAndTax = 495
                where buybilldetailid = 242;
UPDATE productunit SET proUnitBuyPrice  = 550 * productnumber WHERE productid = 1540;
UPDATE storedetail SET  productquantity = '31', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1565';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1540', '1', '31', '0', '43', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '31', '1', '2026-10-06 20:35:01','0','0'); -- id=2453
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01541', '43', '111', '1541', '21', '490', '10290.00', '0', '', '2026-10-06 20:39:54', '1541','','','0','0','0','0','0',null,'490','10290','0','0','0','0','0','0','0','0','1'); -- id=243
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:35:01', 1, 1541, 0, 0
                    , 441, 21, 0, 0, 1, '2026-10-06 20:39:54')
                ON DUPLICATE KEY UPDATE buyprice = 441,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:39:54' ; -- id=319
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1541', '490', '21', '0', 'buyBillController.php', '243', '', '0', '0'); -- id=201
UPDATE product SET  productBuyPrice = "490" WHERE productId = 1541 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 243 ;
UPDATE product SET productName = 'كود 927', productDescription = '', productCatId = '111', productBuyPrice = '490.00', productSellAllPrice = '490.00', productSellUnitPrice = '490.00', productSellHalfPrice = '490.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01541',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '490',lastbuyprice_withDiscount = '441',meanbuyprice = '490',meanbuyprice_withDiscount = '441' , productbuypricereal = '490.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='490',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='490',meanbuyprice_withTax='490',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='441',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1541';
UPDATE buybilldetail SET  lastbuyprice = 490 , meanbuyprice = 490, lastbuyprice_withDiscount = 441, meanbuyprice_withDiscount = 441
        , lastbuyprice_withTax = 490, meanbuyprice_withTax = 490, lastbuyprice_withDiscountAndTax = 441
                where buybilldetailid = 243;
UPDATE productunit SET proUnitBuyPrice  = 490 * productnumber WHERE productid = 1541;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1566';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1541', '1', '21', '0', '43', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-06 20:35:01','0','0'); -- id=2454
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01542', '43', '111', '1542', '25', '575', '14375.00', '0', '', '2026-10-06 20:39:54', '1542','','','0','0','0','0','0',null,'575','14375','0','0','0','0','0','0','0','0','1'); -- id=244
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:35:01', 1, 1542, 0, 0
                    , 517.5, 25, 0, 0, 1, '2026-10-06 20:39:54')
                ON DUPLICATE KEY UPDATE buyprice = 517.5,
                        buyQuantity =buyQuantity+25, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:39:54' ; -- id=320
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1542', '575', '25', '0', 'buyBillController.php', '244', '', '0', '0'); -- id=202
UPDATE product SET  productBuyPrice = "575" WHERE productId = 1542 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 244 ;
UPDATE product SET productName = 'كود 928', productDescription = '', productCatId = '111', productBuyPrice = '575.00', productSellAllPrice = '575.00', productSellUnitPrice = '575.00', productSellHalfPrice = '575.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01542',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '575',lastbuyprice_withDiscount = '517.5',meanbuyprice = '575',meanbuyprice_withDiscount = '517.5' , productbuypricereal = '575.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='575',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='575',meanbuyprice_withTax='575',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='517.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1542';
UPDATE buybilldetail SET  lastbuyprice = 575 , meanbuyprice = 575, lastbuyprice_withDiscount = 517.5, meanbuyprice_withDiscount = 517.5
        , lastbuyprice_withTax = 575, meanbuyprice_withTax = 575, lastbuyprice_withDiscountAndTax = 517.5
                where buybilldetailid = 244;
UPDATE productunit SET proUnitBuyPrice  = 575 * productnumber WHERE productid = 1542;
UPDATE storedetail SET  productquantity = '25', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1567';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1542', '1', '25', '0', '43', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '25', '1', '2026-10-06 20:35:01','0','0'); -- id=2455
UPDATE supplier SET  suppliercurrentDebt = '334867.5',suppliercurrentDebtInCurrency= '334867.5' , userid = '1', supplierdate = '2026-10-06 20:39:54'   WHERE supplierid = '105';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('105', '185368.50', '149499', '0', 'اضافة فاتورة مشتريات', '43', '334867.5', '2026-10-06 20:35:01', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','149499','1','185368.5','149499','334867.5','0',''); -- id=180
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '149499', '149499', '2026-10-06', '1', '0', '0', '2026-10-06 20:39:54','اضافة فاتورة مشتريات رقم 43','1','0',null,'0','43','buyBillController.php?do=details&id=43'); -- id=1195
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1195', '382', '149499', '','0'); -- id=1201
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16245545.74', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1195', '588', '149499', '','0'); -- id=1195
UPDATE accountstree SET name = 'الحريف', customName = 'الحريف', customNameEn = 'الحريف', nameEn = 'الحريف', parent = '81', accountNature = '1', theValue = '334867.5', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-06 20:25:30' WHERE id = '588';
update buybill set dailyentryid='1195,0' where buybillid=43;
COMMIT;
UPDATE product SET overAllAveragePrice = 427.5 WHERE productId = 1532;UPDATE product SET overAllAveragePrice = 373.5 WHERE productId = 1533;UPDATE product SET overAllAveragePrice = 324 WHERE productId = 1534;UPDATE product SET overAllAveragePrice = 373.5 WHERE productId = 1535;UPDATE product SET overAllAveragePrice = 373.5 WHERE productId = 1536;UPDATE product SET overAllAveragePrice = 445.5 WHERE productId = 1537;UPDATE product SET overAllAveragePrice = 445.5 WHERE productId = 1538;UPDATE product SET overAllAveragePrice = 477 WHERE productId = 1539;UPDATE product SET overAllAveragePrice = 495 WHERE productId = 1540;UPDATE product SET overAllAveragePrice = 441 WHERE productId = 1541;UPDATE product SET overAllAveragePrice = 517.5 WHERE productId = 1542;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:09:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:39:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 20:39:55', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=43'); -- id=3573
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:10:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:40:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:40:05', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=43&type=2'); -- id=3574
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:14:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:44:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:44:16', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3575
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:15:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:45:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:45:05', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=43&type=2'); -- id=3576
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:15:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:45:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:45:08', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3577
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:15:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:45:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:45:57', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3578
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:16:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:46:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:46:38', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3579
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:16:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:46:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 20:46:47', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3580
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:17:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:47:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 20:47:31', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3581
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:17:31";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 20:47:31', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3582
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:17:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:47:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:47:38', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3583
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:18:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:48:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:48:45', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3584
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 700','','111','535','535','535','535','2026-10-06','0','1','0','','0','0','0','0','0','535','535','535','535','535','0','0','0','0','.','0','0','0','535','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','535','535','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','535','0','0','0','0','0','0','','','0','0','0','0'); -- id=1543
UPDATE product SET productName = 'كود 700', productDescription = '', productCatId = '111', productBuyPrice = '535', productSellAllPrice = '535', productSellUnitPrice = '535', productSellHalfPrice = '535', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01543',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '535',lastbuyprice_withDiscount = '535',meanbuyprice = '535',meanbuyprice_withDiscount = '535' , productbuypricereal = '535' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='535',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='535',meanbuyprice_withTax='535',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='535',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1543';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1543', '1.00', '2026-10-06', '1', '0','0154301','535','535','535','535','','0','0','0','0','0','0','0','0','0','0'); -- id=1543
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1543', '1', '0', '1', '2026-10-06'); -- id=1568
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1543', '1', '0', '0', '1543', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2456
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1543, 1,'2026-10-06 20:48:45',1)
                ON DUPLICATE KEY UPDATE productid = 1543, edited = 1, sysdate = '2026-10-06 20:48:45', userid = 1; -- id=2337
UPDATE product SET productName = 'كود 700', productDescription = '', productCatId = '111', productBuyPrice = '535.00', productSellAllPrice = '535.00', productSellUnitPrice = '535.00', productSellHalfPrice = '535.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01543',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '535',lastbuyprice_withDiscount = '535',meanbuyprice = '535',meanbuyprice_withDiscount = '535' , productbuypricereal = '535' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='535',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='535',meanbuyprice_withTax='535',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='535',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1543';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 701','','111','550','550','550','550','2026-10-06','0','1','0','','0','0','0','0','0','550','550','550','550','550','0','0','0','0','.','0','0','0','550','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','550','550','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','550','0','0','0','0','0','0','','','0','0','0','0'); -- id=1544
UPDATE product SET productName = 'كود 701', productDescription = '', productCatId = '111', productBuyPrice = '550', productSellAllPrice = '550', productSellUnitPrice = '550', productSellHalfPrice = '550', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01544',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1544';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1544', '1.00', '2026-10-06', '1', '0','0154401','550','550','550','550','','0','0','0','0','0','0','0','0','0','0'); -- id=1544
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1544', '1', '0', '1', '2026-10-06'); -- id=1569
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1544', '1', '0', '0', '1544', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2457
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1544, 1,'2026-10-06 20:48:45',1)
                ON DUPLICATE KEY UPDATE productid = 1544, edited = 1, sysdate = '2026-10-06 20:48:45', userid = 1; -- id=2338
UPDATE product SET productName = 'كود 701', productDescription = '', productCatId = '111', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01544',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '550',meanbuyprice = '550',meanbuyprice_withDiscount = '550' , productbuypricereal = '550' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1544';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 702','','111','575','575','575','575','2026-10-06','0','1','0','','0','0','0','0','0','575','575','575','575','575','0','0','0','0','.','0','0','0','575','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','575','575','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','575','0','0','0','0','0','0','','','0','0','0','0'); -- id=1545
UPDATE product SET productName = 'كود 702', productDescription = '', productCatId = '111', productBuyPrice = '575', productSellAllPrice = '575', productSellUnitPrice = '575', productSellHalfPrice = '575', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01545',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '575',lastbuyprice_withDiscount = '575',meanbuyprice = '575',meanbuyprice_withDiscount = '575' , productbuypricereal = '575' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='575',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='575',meanbuyprice_withTax='575',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='575',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1545';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1545', '1.00', '2026-10-06', '1', '0','0154501','575','575','575','575','','0','0','0','0','0','0','0','0','0','0'); -- id=1545
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1545', '1', '0', '1', '2026-10-06'); -- id=1570
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1545', '1', '0', '0', '1545', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2458
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1545, 1,'2026-10-06 20:48:45',1)
                ON DUPLICATE KEY UPDATE productid = 1545, edited = 1, sysdate = '2026-10-06 20:48:45', userid = 1; -- id=2339
UPDATE product SET productName = 'كود 702', productDescription = '', productCatId = '111', productBuyPrice = '575.00', productSellAllPrice = '575.00', productSellUnitPrice = '575.00', productSellHalfPrice = '575.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01545',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '575',lastbuyprice_withDiscount = '575',meanbuyprice = '575',meanbuyprice_withDiscount = '575' , productbuypricereal = '575' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='575',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='575',meanbuyprice_withTax='575',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='575',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1545';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 703','','111','580','580','580','580','2026-10-06','0','1','0','','0','0','0','0','0','580','580','580','580','580','0','0','0','0','.','0','0','0','580','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','580','580','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','580','0','0','0','0','0','0','','','0','0','0','0'); -- id=1546
UPDATE product SET productName = 'كود 703', productDescription = '', productCatId = '111', productBuyPrice = '580', productSellAllPrice = '580', productSellUnitPrice = '580', productSellHalfPrice = '580', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01546',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1546';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1546', '1.00', '2026-10-06', '1', '0','0154601','580','580','580','580','','0','0','0','0','0','0','0','0','0','0'); -- id=1546
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1546', '1', '0', '1', '2026-10-06'); -- id=1571
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1546', '1', '0', '0', '1546', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2459
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1546, 1,'2026-10-06 20:48:45',1)
                ON DUPLICATE KEY UPDATE productid = 1546, edited = 1, sysdate = '2026-10-06 20:48:45', userid = 1; -- id=2340
UPDATE product SET productName = 'كود 703', productDescription = '', productCatId = '111', productBuyPrice = '580.00', productSellAllPrice = '580.00', productSellUnitPrice = '580.00', productSellHalfPrice = '580.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01546',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1546';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 705','','111','570','570','570','570','2026-10-06','0','1','0','','0','0','0','0','0','570','570','570','570','570','0','0','0','0','.','0','0','0','570','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','570','570','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','570','0','0','0','0','0','0','','','0','0','0','0'); -- id=1547
UPDATE product SET productName = 'كود 705', productDescription = '', productCatId = '111', productBuyPrice = '570', productSellAllPrice = '570', productSellUnitPrice = '570', productSellHalfPrice = '570', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01547',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '570',lastbuyprice_withDiscount = '570',meanbuyprice = '570',meanbuyprice_withDiscount = '570' , productbuypricereal = '570' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='570',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='570',meanbuyprice_withTax='570',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='570',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1547';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1547', '1.00', '2026-10-06', '1', '0','0154701','570','570','570','570','','0','0','0','0','0','0','0','0','0','0'); -- id=1547
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1547', '1', '0', '1', '2026-10-06'); -- id=1572
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1547', '1', '0', '0', '1547', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2460
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1547, 1,'2026-10-06 20:48:45',1)
                ON DUPLICATE KEY UPDATE productid = 1547, edited = 1, sysdate = '2026-10-06 20:48:45', userid = 1; -- id=2341
UPDATE product SET productName = 'كود 705', productDescription = '', productCatId = '111', productBuyPrice = '570.00', productSellAllPrice = '570.00', productSellUnitPrice = '570.00', productSellHalfPrice = '570.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01547',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '570',lastbuyprice_withDiscount = '570',meanbuyprice = '570',meanbuyprice_withDiscount = '570' , productbuypricereal = '570' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='570',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='570',meanbuyprice_withTax='570',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='570',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1547';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('كود 706','','111','575','575','575','575','2026-10-06','0','1','0','','0','0','0','0','0','575','575','575','575','575','0','0','0','0','.','0','0','0','575','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','575','575','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','575','0','0','0','0','0','0','','','0','0','0','0'); -- id=1548
UPDATE product SET productName = 'كود 706', productDescription = '', productCatId = '111', productBuyPrice = '575', productSellAllPrice = '575', productSellUnitPrice = '575', productSellHalfPrice = '575', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01548',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '575',lastbuyprice_withDiscount = '575',meanbuyprice = '575',meanbuyprice_withDiscount = '575' , productbuypricereal = '575' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='575',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='575',meanbuyprice_withTax='575',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='575',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1548';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1548', '1.00', '2026-10-06', '1', '0','0154801','575','575','575','575','','0','0','0','0','0','0','0','0','0','0'); -- id=1548
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1548', '1', '0', '1', '2026-10-06'); -- id=1573
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1548', '1', '0', '0', '1548', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-06','0','0'); -- id=2461
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1548, 1,'2026-10-06 20:48:45',1)
                ON DUPLICATE KEY UPDATE productid = 1548, edited = 1, sysdate = '2026-10-06 20:48:45', userid = 1; -- id=2342
UPDATE product SET productName = 'كود 706', productDescription = '', productCatId = '111', productBuyPrice = '575.00', productSellAllPrice = '575.00', productSellUnitPrice = '575.00', productSellHalfPrice = '575.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01548',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '575',lastbuyprice_withDiscount = '575',meanbuyprice = '575',meanbuyprice_withDiscount = '575' , productbuypricereal = '575' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='575',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='575',meanbuyprice_withTax='575',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='575',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1548';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:18:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:48:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:48:47', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3585
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:20:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:50:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 20:50:36', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3586
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:22:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:52:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 20:52:21', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3587
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac534eca24d3', '2026-10-06 20:50:36', '105', '334867.50', '417096', '10', '1', '91365.00',  '82228.50', '0', '82228.5', '1', '2026-10-06 20:52:21', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=44
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01543', '44', '111', '1543', '21', '535', '11235.00', '0', '', '2026-10-06 20:52:21', '1543','','','0','0','0','0','0',null,'535','11235','0','0','0','0','0','0','0','0','1'); -- id=245
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:50:36', 1, 1543, 0, 0
                    , 481.5, 21, 0, 0, 1, '2026-10-06 20:52:21')
                ON DUPLICATE KEY UPDATE buyprice = 481.5,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:52:21' ; -- id=321
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1543', '535', '21', '0', 'buyBillController.php', '245', '', '0', '0'); -- id=203
UPDATE product SET  productBuyPrice = "535" WHERE productId = 1543 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 245 ;
UPDATE product SET productName = 'كود 700', productDescription = '', productCatId = '111', productBuyPrice = '535.00', productSellAllPrice = '535.00', productSellUnitPrice = '535.00', productSellHalfPrice = '535.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01543',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '535',lastbuyprice_withDiscount = '481.5',meanbuyprice = '535',meanbuyprice_withDiscount = '481.5' , productbuypricereal = '535.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='535',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='535',meanbuyprice_withTax='535',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='481.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1543';
UPDATE buybilldetail SET  lastbuyprice = 535 , meanbuyprice = 535, lastbuyprice_withDiscount = 481.5, meanbuyprice_withDiscount = 481.5
        , lastbuyprice_withTax = 535, meanbuyprice_withTax = 535, lastbuyprice_withDiscountAndTax = 481.5
                where buybilldetailid = 245;
UPDATE productunit SET proUnitBuyPrice  = 535 * productnumber WHERE productid = 1543;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1568';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1543', '1', '21', '0', '44', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-06 20:50:36','0','0'); -- id=2462
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01544', '44', '111', '1544', '39', '550', '21450.00', '0', '', '2026-10-06 20:52:21', '1544','','','0','0','0','0','0',null,'550','21450','0','0','0','0','0','0','0','0','1'); -- id=246
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:50:36', 1, 1544, 0, 0
                    , 495, 39, 0, 0, 1, '2026-10-06 20:52:21')
                ON DUPLICATE KEY UPDATE buyprice = 495,
                        buyQuantity =buyQuantity+39, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:52:21' ; -- id=322
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1544', '550', '39', '0', 'buyBillController.php', '246', '', '0', '0'); -- id=204
UPDATE product SET  productBuyPrice = "550" WHERE productId = 1544 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 246 ;
UPDATE product SET productName = 'كود 701', productDescription = '', productCatId = '111', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01544',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '495',meanbuyprice = '550',meanbuyprice_withDiscount = '495' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1544';
UPDATE buybilldetail SET  lastbuyprice = 550 , meanbuyprice = 550, lastbuyprice_withDiscount = 495, meanbuyprice_withDiscount = 495
        , lastbuyprice_withTax = 550, meanbuyprice_withTax = 550, lastbuyprice_withDiscountAndTax = 495
                where buybilldetailid = 246;
UPDATE productunit SET proUnitBuyPrice  = 550 * productnumber WHERE productid = 1544;
UPDATE storedetail SET  productquantity = '39', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1569';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1544', '1', '39', '0', '44', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '39', '1', '2026-10-06 20:50:36','0','0'); -- id=2463
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01545', '44', '111', '1545', '24', '575', '13800.00', '0', '', '2026-10-06 20:52:21', '1545','','','0','0','0','0','0',null,'575','13800','0','0','0','0','0','0','0','0','1'); -- id=247
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:50:36', 1, 1545, 0, 0
                    , 517.5, 24, 0, 0, 1, '2026-10-06 20:52:21')
                ON DUPLICATE KEY UPDATE buyprice = 517.5,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:52:21' ; -- id=323
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1545', '575', '24', '0', 'buyBillController.php', '247', '', '0', '0'); -- id=205
UPDATE product SET  productBuyPrice = "575" WHERE productId = 1545 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 247 ;
UPDATE product SET productName = 'كود 702', productDescription = '', productCatId = '111', productBuyPrice = '575.00', productSellAllPrice = '575.00', productSellUnitPrice = '575.00', productSellHalfPrice = '575.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01545',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '575',lastbuyprice_withDiscount = '517.5',meanbuyprice = '575',meanbuyprice_withDiscount = '517.5' , productbuypricereal = '575.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='575',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='575',meanbuyprice_withTax='575',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='517.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1545';
UPDATE buybilldetail SET  lastbuyprice = 575 , meanbuyprice = 575, lastbuyprice_withDiscount = 517.5, meanbuyprice_withDiscount = 517.5
        , lastbuyprice_withTax = 575, meanbuyprice_withTax = 575, lastbuyprice_withDiscountAndTax = 517.5
                where buybilldetailid = 247;
UPDATE productunit SET proUnitBuyPrice  = 575 * productnumber WHERE productid = 1545;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1570';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1545', '1', '24', '0', '44', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 20:50:36','0','0'); -- id=2464
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01546', '44', '111', '1546', '30', '580', '17400.00', '0', '', '2026-10-06 20:52:21', '1546','','','0','0','0','0','0',null,'580','17400','0','0','0','0','0','0','0','0','1'); -- id=248
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:50:36', 1, 1546, 0, 0
                    , 522, 30, 0, 0, 1, '2026-10-06 20:52:21')
                ON DUPLICATE KEY UPDATE buyprice = 522,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:52:21' ; -- id=324
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1546', '580', '30', '0', 'buyBillController.php', '248', '', '0', '0'); -- id=206
UPDATE product SET  productBuyPrice = "580" WHERE productId = 1546 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 248 ;
UPDATE product SET productName = 'كود 703', productDescription = '', productCatId = '111', productBuyPrice = '580.00', productSellAllPrice = '580.00', productSellUnitPrice = '580.00', productSellHalfPrice = '580.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01546',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '522',meanbuyprice = '580',meanbuyprice_withDiscount = '522' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='522',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1546';
UPDATE buybilldetail SET  lastbuyprice = 580 , meanbuyprice = 580, lastbuyprice_withDiscount = 522, meanbuyprice_withDiscount = 522
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 522
                where buybilldetailid = 248;
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1546;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1571';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1546', '1', '30', '0', '44', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-06 20:50:36','0','0'); -- id=2465
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01547', '44', '111', '1547', '24', '570', '13680.00', '0', '', '2026-10-06 20:52:21', '1547','','','0','0','0','0','0',null,'570','13680','0','0','0','0','0','0','0','0','1'); -- id=249
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:50:36', 1, 1547, 0, 0
                    , 513, 24, 0, 0, 1, '2026-10-06 20:52:21')
                ON DUPLICATE KEY UPDATE buyprice = 513,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:52:21' ; -- id=325
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1547', '570', '24', '0', 'buyBillController.php', '249', '', '0', '0'); -- id=207
UPDATE product SET  productBuyPrice = "570" WHERE productId = 1547 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 249 ;
UPDATE product SET productName = 'كود 705', productDescription = '', productCatId = '111', productBuyPrice = '570.00', productSellAllPrice = '570.00', productSellUnitPrice = '570.00', productSellHalfPrice = '570.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01547',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '570',lastbuyprice_withDiscount = '513',meanbuyprice = '570',meanbuyprice_withDiscount = '513' , productbuypricereal = '570.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='570',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='570',meanbuyprice_withTax='570',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='513',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1547';
UPDATE buybilldetail SET  lastbuyprice = 570 , meanbuyprice = 570, lastbuyprice_withDiscount = 513, meanbuyprice_withDiscount = 513
        , lastbuyprice_withTax = 570, meanbuyprice_withTax = 570, lastbuyprice_withDiscountAndTax = 513
                where buybilldetailid = 249;
UPDATE productunit SET proUnitBuyPrice  = 570 * productnumber WHERE productid = 1547;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1572';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1547', '1', '24', '0', '44', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 20:50:36','0','0'); -- id=2466
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01548', '44', '111', '1548', '24', '575', '13800.00', '0', '', '2026-10-06 20:52:21', '1548','','','0','0','0','0','0',null,'575','13800','0','0','0','0','0','0','0','0','1'); -- id=250
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-06 20:50:36', 1, 1548, 0, 0
                    , 517.5, 24, 0, 0, 1, '2026-10-06 20:52:21')
                ON DUPLICATE KEY UPDATE buyprice = 517.5,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-06 20:52:21' ; -- id=326
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1548', '575', '24', '0', 'buyBillController.php', '250', '', '0', '0'); -- id=208
UPDATE product SET  productBuyPrice = "575" WHERE productId = 1548 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 250 ;
UPDATE product SET productName = 'كود 706', productDescription = '', productCatId = '111', productBuyPrice = '575.00', productSellAllPrice = '575.00', productSellUnitPrice = '575.00', productSellHalfPrice = '575.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01548',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '575',lastbuyprice_withDiscount = '517.5',meanbuyprice = '575',meanbuyprice_withDiscount = '517.5' , productbuypricereal = '575.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='575',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='575',meanbuyprice_withTax='575',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='517.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1548';
UPDATE buybilldetail SET  lastbuyprice = 575 , meanbuyprice = 575, lastbuyprice_withDiscount = 517.5, meanbuyprice_withDiscount = 517.5
        , lastbuyprice_withTax = 575, meanbuyprice_withTax = 575, lastbuyprice_withDiscountAndTax = 517.5
                where buybilldetailid = 250;
UPDATE productunit SET proUnitBuyPrice  = 575 * productnumber WHERE productid = 1548;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-06' WHERE storedetailid = '1573';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1548', '1', '24', '0', '44', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-06 20:50:36','0','0'); -- id=2467
UPDATE supplier SET  suppliercurrentDebt = '417096',suppliercurrentDebtInCurrency= '417096' , userid = '1', supplierdate = '2026-10-06 20:52:21'   WHERE supplierid = '105';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('105', '334867.50', '82228.5', '0', 'اضافة فاتورة مشتريات', '44', '417096', '2026-10-06 20:50:36', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','82228.5','1','334867.5','82228.5','417096','0',''); -- id=181
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '82228.5', '82228.5', '2026-10-06', '1', '0', '0', '2026-10-06 20:52:21','اضافة فاتورة مشتريات رقم 44','1','0',null,'0','44','buyBillController.php?do=details&id=44'); -- id=1196
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1196', '382', '82228.5', '','0'); -- id=1202
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16327774.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1196', '588', '82228.5', '','0'); -- id=1196
UPDATE accountstree SET name = 'الحريف', customName = 'الحريف', customNameEn = 'الحريف', nameEn = 'الحريف', parent = '81', accountNature = '1', theValue = '417096', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-06 20:25:30' WHERE id = '588';
update buybill set dailyentryid='1196,0' where buybillid=44;
COMMIT;
UPDATE product SET overAllAveragePrice = 481.5 WHERE productId = 1543;UPDATE product SET overAllAveragePrice = 495 WHERE productId = 1544;UPDATE product SET overAllAveragePrice = 517.5 WHERE productId = 1545;UPDATE product SET overAllAveragePrice = 522 WHERE productId = 1546;UPDATE product SET overAllAveragePrice = 513 WHERE productId = 1547;UPDATE product SET overAllAveragePrice = 517.5 WHERE productId = 1548;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:22:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:52:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 20:52:21', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=44'); -- id=3588
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:22:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:52:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:52:24', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=44&type=2'); -- id=3589
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:24:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:54:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:54:31', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=44&type=2'); -- id=3590
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:24:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:54:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:54:43', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3591
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:25:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:55:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:55:06', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3592
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:25:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:55:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:55:41', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3593
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:25:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:55:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-06 20:55:43', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3594
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:26:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:56:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellBillReportsController.php', '2026-10-06 20:56:21', '1', 'sellandreturnreport', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellBillReportsController.php?do=sellandreturnreport'); -- id=3595
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:26:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:56:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellBillReportsController.php', '2026-10-06 20:56:37', '1', 'sellandreturnreport', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellBillReportsController.php?do=sellandreturnreport'); -- id=3596
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:26:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:56:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 20:56:58', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=show'); -- id=3597
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:27:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:57:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 20:57:46', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=show'); -- id=3598
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:29:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 20:59:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 20:59:51', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3599
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:30:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:00:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 21:00:36', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3600
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:30:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:00:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-06 21:00:49', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3601
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:30:49";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-06 21:00:49', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3602
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:30:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:00:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:00:56', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=show'); -- id=3603
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:31:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:01:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:01:01', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=show'); -- id=3604
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:31:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:01:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:01:52', '1', 'delete', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=delete&sellbillid=79&action=1095,0,1096'); -- id=3605

-- ----------------------------------------------------------------------------------------------------
-- bill delete start - sellbill with id = 79
-- ----------------------------------------------------------------------------------------------------

BEGIN;
UPDATE costcenterdetail SET del = 1 WHERE type in( 0) and  modelid = 79;
UPDATE dailyentry SET totalcreditor = '420.00', totaldebtor = '420.00', thedate = '2026-10-05', userid = '4', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-05 12:20:10', entryComment = 'اضافة فاتورة مبيعات رقم 79', fromFlag = '1',related='0',isopeningentry='0',operationId='79',operationDetailLink='sellbillController.php?do=showDetail&sellbillid=79' WHERE id = '1095';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '420.00', '420.00', '2026-10-06', '1', '0', '1095', '2026-10-06 21:01:52','تم عكس القيد رقم 1095 ','1','0','0','0','0',''); -- id=1197
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1197', '501', '420.00', '','0'); -- id=1197
UPDATE accountstree SET name = 'خزينه المحل الارضي', customName = 'خزينه المحل الارضي', customNameEn = 'خزينه المحل الارضي', nameEn = 'خزينه المحل الارضي', parent = '40', accountNature = '0', theValue = '231430', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-30 21:35:47' WHERE id = '501';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1197', '143', '420.00', '','0'); -- id=1203
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1013700', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
UPDATE dailyentry SET totalcreditor = '380.00', totaldebtor = '380.00', thedate = '2026-10-05', userid = '4', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-05 12:20:10', entryComment = 'اضافة فاتورة مبيعات رقم 79 - صرف البضاعة من المخزن', fromFlag = '1',related='0',isopeningentry='0',operationId='79',operationDetailLink='sellbillController.php?do=showDetail&sellbillid=79' WHERE id = '1096';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '380.00', '380.00', '2026-10-06', '1', '0', '1096', '2026-10-06 21:01:52','تم عكس القيد رقم 1096 ','1','0','0','0','0',''); -- id=1198
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1198', '402', '380.00', '','0'); -- id=1198
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '983887.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1198', '492', '380.00', '','0'); -- id=1204
UPDATE accountstree SET name = 'مخزن المحل', customName = 'مخزن المحل', customNameEn = 'مخزن المحل', nameEn = 'مخزن المحل', parent = '49', accountNature = '0', theValue = '849060', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 19:38:59' WHERE id = '492';
UPDATE sellbill SET  sellbillsysdate = '2026-10-06 21:01:52', userid = '4',delbyuserid = '1', conditions = '1'  ,billReservation= 0,billReservationDate='0000-00-00'  WHERE sellbillid = '79';
UPDATE buypriceshistorybook set sellQuantity = sellQuantity-1 where id = 135;
UPDATE sellbilldetail SET  lastbuyprice = 380.00 , meanbuyprice = 380.00, lastbuyprice_withDiscount = 380.00, meanbuyprice_withDiscount = 380.00
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 380
                where sellbilldetailid = 343;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1326, '2026-10-06', 420, 380, 380
                    , 380, 380, 380, 380
                    , 0, 0, 0, 0
                    , 0, 0, 0,1,0, 380, 380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-420, sellCostBuyPrice =sellCostBuyPrice-380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-380, sellCostMeanBuyPrice = sellCostMeanBuyPrice-380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-380
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-1
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-06', 420, 380, 380
                    , 380, 380, 380, 380
                    , 0, 0, 0, 0
                    , 0, 0, 0, 380, 380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-420, sellCostBuyPrice =sellCostBuyPrice-380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-380, sellCostMeanBuyPrice = sellCostMeanBuyPrice-380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-380
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '231', userid = '1', storedetaildate = '2026-10-06 21:01:52' WHERE storedetailid = '1407';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1326', '2', '1', '0', '79', 'حذف فاتورة مبيعات', 'sellbillController.php', '230', '231', '1', '2026-10-06 21:01:52','0','0'); -- id=2468
UPDATE client SET  clientdebt = '0', userid = '1' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0.00','1','حذف فاتورة مبيعات','79', '0', '2026-10-06 21:01:52', '1', 'sellbillController.php', 'حذف فاتورة مبيعات', '420', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 12:20:10','0','0','',''); -- id=191
CALL saveInUse(3,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '231430',  userid = '1' WHERE saveid = '3';
UPDATE save SET  inUse = 0 where saveid = 3;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('231850','420', '1', '3', 'حذف فاتورة مبيعات', '79', '231430', '2026-10-06 21:01:52', '1',  'sellbillController.php','1','','0'); -- id=129
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 420, 380, 380
                    , 380, 380, 380, 380
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,380, 380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-420, sellCostBuyPrice =sellCostBuyPrice-380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-380, sellCostMeanBuyPrice = sellCostMeanBuyPrice-380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-380
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 420, 380, 380
                    , 380, 380, 380, 380
                    , 0, 0, 0, 0
                    , 0, 0, 0, 380, 380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-420, sellCostBuyPrice =sellCostBuyPrice-380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-380, sellCostMeanBuyPrice = sellCostMeanBuyPrice-380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-380
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 420, 380, 380
                    , 380, 380, 380, 380, 380, 380)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal-420, netSellCostBuyPrice = netSellCostBuyPrice-380
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice-380
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice-380
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount-380
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount-380
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice-380
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax-380
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax-380;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill delete end - sellbill with id = 79
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:31:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:01:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:01:52', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=sucess'); -- id=3606
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:31:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:01:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:01:54', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=show'); -- id=3607
UPDATE user SET loginip = "" WHERE userid = 1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:33:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:03:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 21:03:28', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3608
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:34:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:04:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-06 21:04:14', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3609
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:37:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:07:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 21:07:14', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=show'); -- id=3610
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:37:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:07:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-06 21:07:21', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=show'); -- id=3611
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:37:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:07:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:07:32', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php'); -- id=3612
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:37:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:07:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:07:45', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php?do=add'); -- id=3613
BEGIN;
CALL supplierInUse(57,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('57', '34210.00', '10000', '1', 'ايصال دفع لمورد', '1', '24210', '2026-10-06 21:07:32', '1', 'supplierPayedDeptController.php', '', '0','1', '-1','1','1','10000','1','0','0','0','8',''); -- id=182
UPDATE supplierdebtchange SET supplierid = '57', supplierdebtchangebefore = '34210.00', supplierdebtchangeamount = '10000', supplierdebtchangetype = '1', processname = 'ايصال دفع لمورد', supplierdebtchangemodelid = '1', supplierdebtchangeafter = '24210', supplierdebtchangedate = '2026-10-06 21:07:32', userid = '1', tablename = 'supplierPayedDeptController.php', comment = '', dailyentryid = '0',saveid = '1',currencyId='1',conversionFactor='1',payedInCurrency='10000',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='546030',debtchangamountInSupplierCurrency='10000',debtchangafterInSupplierCurrency='24210', paySerialNo='8',tagids='' WHERE supplierdebtchangeid = '182';
UPDATE supplier SET  suppliercurrentDebt = '24210',suppliercurrentDebtInCurrency= '24210' , userid = '1', supplierdate = '2026-10-06 21:07:45'   WHERE supplierid = '57';
UPDATE supplier SET  inUse = 0 where supplierid = 57;
UPDATE save SET  savecurrentvalue = '-1334750',  userid = '1' WHERE saveid = '1';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('-1324750.00','10000', '1', '1', 'ايصال دفع لمورد', '182', '-1334750', '2026-10-06 21:07:45', '1',  'supplierPayedDeptController.php','0','','0'); -- id=130
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '10000', '10000', '2026-10-06', '1', '0', '0', '2026-10-06 21:07:45','ايصال دفع لمورد ( الحرمين - مورد ) ','1','0','0','0','182','supplierReportsController.php?do=show&id=182'); -- id=1199
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1199', '476', '10000', '','0'); -- id=1205
UPDATE accountstree SET name = 'الحرمين - مورد', customName = 'الحرمين - مورد', customNameEn = 'الحرمين - مورد', nameEn = 'الحرمين - مورد', parent = '81', accountNature = '1', theValue = '-10000', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '476';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1199', '383', '10000', '','0'); -- id=1199
UPDATE accountstree SET name = 'الخزنة الرئيسية', customName = 'الخزنة الرئيسية', customNameEn = 'الخزنة الرئيسية', nameEn = 'الخزنة الرئيسية', parent = '40', accountNature = '0', theValue = '-1334750', theOrder = '0', layingOrder = '12010200002', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = 'Bank and Cash ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:28' WHERE id = '383';
UPDATE supplierdebtchange SET supplierid = '57', supplierdebtchangebefore = '34210.00', supplierdebtchangeamount = '10000.00', supplierdebtchangetype = '1', processname = 'ايصال دفع لمورد', supplierdebtchangemodelid = '1', supplierdebtchangeafter = '24210.00', supplierdebtchangedate = '2026-10-06 21:07:32', userid = '1', tablename = 'supplierPayedDeptController.php', comment = '', dailyentryid = '1199',saveid = '1',currencyId='1',conversionFactor='1',payedInCurrency='10000',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='546030',debtchangamountInSupplierCurrency='10000',debtchangafterInSupplierCurrency='24210', paySerialNo='8',tagids='' WHERE supplierdebtchangeid = '182';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:37:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:07:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:07:45', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php?do=sucess'); -- id=3614
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:37:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:07:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:07:47', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php?do=show'); -- id=3615
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:37:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:07:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-06 21:07:47', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php'); -- id=3616
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:37:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:07:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:07:50', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php'); -- id=3617
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:08:05', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php?do=add'); -- id=3618
BEGIN;
CALL supplierInUse(39,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('39', '324250.00', '10000', '1', 'ايصال دفع لمورد', '1', '314250', '2026-10-06 21:07:50', '1', 'supplierPayedDeptController.php', '', '0','1', '-1','1','1','10000','1','0','0','0','9',''); -- id=183
UPDATE supplierdebtchange SET supplierid = '39', supplierdebtchangebefore = '324250.00', supplierdebtchangeamount = '10000', supplierdebtchangetype = '1', processname = 'ايصال دفع لمورد', supplierdebtchangemodelid = '1', supplierdebtchangeafter = '314250', supplierdebtchangedate = '2026-10-06 21:07:50', userid = '1', tablename = 'supplierPayedDeptController.php', comment = '', dailyentryid = '0',saveid = '1',currencyId='1',conversionFactor='1',payedInCurrency='10000',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='572530',debtchangamountInSupplierCurrency='10000',debtchangafterInSupplierCurrency='314250', paySerialNo='9',tagids='' WHERE supplierdebtchangeid = '183';
UPDATE supplier SET  suppliercurrentDebt = '314250',suppliercurrentDebtInCurrency= '314250' , userid = '1', supplierdate = '2026-10-06 21:08:05'   WHERE supplierid = '39';
UPDATE supplier SET  inUse = 0 where supplierid = 39;
UPDATE save SET  savecurrentvalue = '-1344750',  userid = '1' WHERE saveid = '1';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('-1334750.00','10000', '1', '1', 'ايصال دفع لمورد', '183', '-1344750', '2026-10-06 21:08:05', '1',  'supplierPayedDeptController.php','0','','0'); -- id=131
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '10000', '10000', '2026-10-06', '1', '0', '0', '2026-10-06 21:08:05','ايصال دفع لمورد ( غفران - مورد ) ','1','0','0','0','183','supplierReportsController.php?do=show&id=183'); -- id=1200
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1200', '458', '10000', '','0'); -- id=1206
UPDATE accountstree SET name = 'غفران - مورد', customName = 'غفران - مورد', customNameEn = 'غفران - مورد', nameEn = 'غفران - مورد', parent = '81', accountNature = '1', theValue = '16500', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '458';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1200', '383', '10000', '','0'); -- id=1200
UPDATE accountstree SET name = 'الخزنة الرئيسية', customName = 'الخزنة الرئيسية', customNameEn = 'الخزنة الرئيسية', nameEn = 'الخزنة الرئيسية', parent = '40', accountNature = '0', theValue = '-1344750', theOrder = '0', layingOrder = '12010200002', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = 'Bank and Cash ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:28' WHERE id = '383';
UPDATE supplierdebtchange SET supplierid = '39', supplierdebtchangebefore = '324250.00', supplierdebtchangeamount = '10000.00', supplierdebtchangetype = '1', processname = 'ايصال دفع لمورد', supplierdebtchangemodelid = '1', supplierdebtchangeafter = '314250.00', supplierdebtchangedate = '2026-10-06 21:07:50', userid = '1', tablename = 'supplierPayedDeptController.php', comment = '', dailyentryid = '1200',saveid = '1',currencyId='1',conversionFactor='1',payedInCurrency='10000',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='572530',debtchangamountInSupplierCurrency='10000',debtchangafterInSupplierCurrency='314250', paySerialNo='9',tagids='' WHERE supplierdebtchangeid = '183';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:08:05', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php?do=sucess'); -- id=3619
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:08:07', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php?do=show'); -- id=3620
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-06 21:08:07', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php'); -- id=3621
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:08:09', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php'); -- id=3622
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:08:22', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php?do=add'); -- id=3623
BEGIN;
CALL supplierInUse(50,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('50', '475450.00', '56000', '1', 'ايصال دفع لمورد', '1', '419450', '2026-10-06 21:08:09', '1', 'supplierPayedDeptController.php', '', '0','1', '-1','1','1','56000','1','0','0','0','10',''); -- id=184
UPDATE supplierdebtchange SET supplierid = '50', supplierdebtchangebefore = '475450.00', supplierdebtchangeamount = '56000', supplierdebtchangetype = '1', processname = 'ايصال دفع لمورد', supplierdebtchangemodelid = '1', supplierdebtchangeafter = '419450', supplierdebtchangedate = '2026-10-06 21:08:09', userid = '1', tablename = 'supplierPayedDeptController.php', comment = '', dailyentryid = '0',saveid = '1',currencyId='1',conversionFactor='1',payedInCurrency='56000',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='546030',debtchangamountInSupplierCurrency='56000',debtchangafterInSupplierCurrency='419450', paySerialNo='10',tagids='' WHERE supplierdebtchangeid = '184';
UPDATE supplier SET  suppliercurrentDebt = '419450',suppliercurrentDebtInCurrency= '419450' , userid = '1', supplierdate = '2026-10-06 21:08:22'   WHERE supplierid = '50';
UPDATE supplier SET  inUse = 0 where supplierid = 50;
UPDATE save SET  savecurrentvalue = '-1400750',  userid = '1' WHERE saveid = '1';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('-1344750.00','56000', '1', '1', 'ايصال دفع لمورد', '184', '-1400750', '2026-10-06 21:08:22', '1',  'supplierPayedDeptController.php','0','','0'); -- id=132
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '56000', '56000', '2026-10-06', '1', '0', '0', '2026-10-06 21:08:22','ايصال دفع لمورد ( كافاني - مورد ) ','1','0','0','0','184','supplierReportsController.php?do=show&id=184'); -- id=1201
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1201', '469', '56000', '','0'); -- id=1207
UPDATE accountstree SET name = 'كافاني - مورد', customName = 'كافاني - مورد', customNameEn = 'كافاني - مورد', nameEn = 'كافاني - مورد', parent = '81', accountNature = '1', theValue = '-56000', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '469';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1201', '383', '56000', '','0'); -- id=1201
UPDATE accountstree SET name = 'الخزنة الرئيسية', customName = 'الخزنة الرئيسية', customNameEn = 'الخزنة الرئيسية', nameEn = 'الخزنة الرئيسية', parent = '40', accountNature = '0', theValue = '-1400750', theOrder = '0', layingOrder = '12010200002', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = 'Bank and Cash ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:28' WHERE id = '383';
UPDATE supplierdebtchange SET supplierid = '50', supplierdebtchangebefore = '475450.00', supplierdebtchangeamount = '56000.00', supplierdebtchangetype = '1', processname = 'ايصال دفع لمورد', supplierdebtchangemodelid = '1', supplierdebtchangeafter = '419450.00', supplierdebtchangedate = '2026-10-06 21:08:09', userid = '1', tablename = 'supplierPayedDeptController.php', comment = '', dailyentryid = '1201',saveid = '1',currencyId='1',conversionFactor='1',payedInCurrency='56000',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='546030',debtchangamountInSupplierCurrency='56000',debtchangafterInSupplierCurrency='419450', paySerialNo='10',tagids='' WHERE supplierdebtchangeid = '184';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:08:22', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php?do=sucess'); -- id=3624
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:08:24', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php?do=show'); -- id=3625
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-06 21:08:24', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php'); -- id=3626
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:08:26', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php'); -- id=3627
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:08:37', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php?do=add'); -- id=3628
BEGIN;
CALL supplierInUse(84,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('84', '101810.00', '62000', '1', 'ايصال دفع لمورد', '1', '39810', '2026-10-06 21:08:26', '1', 'supplierPayedDeptController.php', '', '0','1', '-1','1','1','62000','1','0','0','0','11',''); -- id=185
UPDATE supplierdebtchange SET supplierid = '84', supplierdebtchangebefore = '101810.00', supplierdebtchangeamount = '62000', supplierdebtchangetype = '1', processname = 'ايصال دفع لمورد', supplierdebtchangemodelid = '1', supplierdebtchangeafter = '39810', supplierdebtchangedate = '2026-10-06 21:08:26', userid = '1', tablename = 'supplierPayedDeptController.php', comment = '', dailyentryid = '0',saveid = '1',currencyId='1',conversionFactor='1',payedInCurrency='62000',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='101810',debtchangamountInSupplierCurrency='62000',debtchangafterInSupplierCurrency='39810', paySerialNo='11',tagids='' WHERE supplierdebtchangeid = '185';
UPDATE supplier SET  suppliercurrentDebt = '39810',suppliercurrentDebtInCurrency= '39810' , userid = '1', supplierdate = '2026-10-06 21:08:37'   WHERE supplierid = '84';
UPDATE supplier SET  inUse = 0 where supplierid = 84;
UPDATE save SET  savecurrentvalue = '-1462750',  userid = '1' WHERE saveid = '1';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('-1400750.00','62000', '1', '1', 'ايصال دفع لمورد', '185', '-1462750', '2026-10-06 21:08:37', '1',  'supplierPayedDeptController.php','0','','0'); -- id=133
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '62000', '62000', '2026-10-06', '1', '0', '0', '2026-10-06 21:08:37','ايصال دفع لمورد ( بلاك اند وايت ) ','1','0','0','0','185','supplierReportsController.php?do=show&id=185'); -- id=1202
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1202', '564', '62000', '','0'); -- id=1208
UPDATE accountstree SET name = 'بلاك اند وايت', customName = 'بلاك اند وايت', customNameEn = 'بلاك اند وايت', nameEn = 'بلاك اند وايت', parent = '81', accountNature = '1', theValue = '39810', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-05 18:25:53' WHERE id = '564';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1202', '383', '62000', '','0'); -- id=1202
UPDATE accountstree SET name = 'الخزنة الرئيسية', customName = 'الخزنة الرئيسية', customNameEn = 'الخزنة الرئيسية', nameEn = 'الخزنة الرئيسية', parent = '40', accountNature = '0', theValue = '-1462750', theOrder = '0', layingOrder = '12010200002', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = 'Bank and Cash ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:28' WHERE id = '383';
UPDATE supplierdebtchange SET supplierid = '84', supplierdebtchangebefore = '101810.00', supplierdebtchangeamount = '62000.00', supplierdebtchangetype = '1', processname = 'ايصال دفع لمورد', supplierdebtchangemodelid = '1', supplierdebtchangeafter = '39810.00', supplierdebtchangedate = '2026-10-06 21:08:26', userid = '1', tablename = 'supplierPayedDeptController.php', comment = '', dailyentryid = '1202',saveid = '1',currencyId='1',conversionFactor='1',payedInCurrency='62000',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='101810',debtchangamountInSupplierCurrency='62000',debtchangafterInSupplierCurrency='39810', paySerialNo='11',tagids='' WHERE supplierdebtchangeid = '185';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:08:37', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php?do=sucess'); -- id=3629
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-06 21:08:39', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierPayedDeptController.php?do=show'); -- id=3630
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:38:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:08:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-06 21:08:39', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php'); -- id=3631
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:39:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:09:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:09:49', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=show'); -- id=3632
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:40:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:10:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:10:19', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=show'); -- id=3633
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:40:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:10:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:10:46', '1', 'editsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=editsellBill&sellbillid=86'); -- id=3634
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:42:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:12:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:12:20', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=update'); -- id=3635
BEGIN;

-- ----------------------------------------------------------------------------------------------------
-- bill update start - with id = 86 and  = sellbillController
-- ----------------------------------------------------------------------------------------------------


-- ----------------------------------------------------------------------------------------------------
-- bill update start - delete start with id = 86 and controlname = sellbillController
-- ----------------------------------------------------------------------------------------------------

UPDATE costcenterdetail SET del = 1 WHERE type in( 0) and  modelid = 86;
UPDATE sellbill SET  sellbillsysdate = '2026-10-06 21:12:20', userid = '2',delbyuserid = '1', conditions = '1'  WHERE sellbillid = '86';
UPDATE sellbilldetail SET  lastbuyprice = 470.00 , meanbuyprice = 470.00, lastbuyprice_withDiscount = 470.00, meanbuyprice_withDiscount = 470.00
        , lastbuyprice_withTax = 470, meanbuyprice_withTax = 470, lastbuyprice_withDiscountAndTax = 470
                where sellbilldetailid = 357;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (946, '2026-10-06', 2450, 2350, 2350
                    , 2350, 2350, 2350, 2350
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 2350, 2350, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2450, sellCostBuyPrice =sellCostBuyPrice-2350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2350, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2350, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2350
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2350
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2350
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2450, 2350, 2350
                    , 2350, 2350, 2350, 2350
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2350, 2350, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2450, sellCostBuyPrice =sellCostBuyPrice-2350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2350, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2350, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2350
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2350
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2350
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '5', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '946';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('946', '1', '5', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '0', '5', '1', '2026-10-05 18:09:23','0','0'); -- id=2469
UPDATE sellbilldetail SET  lastbuyprice = 405.00 , meanbuyprice = 405.00, lastbuyprice_withDiscount = 405.00, meanbuyprice_withDiscount = 405.00
        , lastbuyprice_withTax = 405, meanbuyprice_withTax = 405, lastbuyprice_withDiscountAndTax = 405
                where sellbilldetailid = 358;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (928, '2026-10-06', 4250, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0,10,0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-4250, sellCostBuyPrice =sellCostBuyPrice-4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice-4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-4050
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-10
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 4250, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-4250, sellCostBuyPrice =sellCostBuyPrice-4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice-4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-4050
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '61', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '928';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('928', '1', '10', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '51', '61', '1', '2026-10-05 18:09:23','0','0'); -- id=2470
UPDATE sellbilldetail SET  lastbuyprice = 400.00 , meanbuyprice = 400.00, lastbuyprice_withDiscount = 400.00, meanbuyprice_withDiscount = 400.00
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where sellbilldetailid = 359;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1034, '2026-10-06', 2100, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2100, sellCostBuyPrice =sellCostBuyPrice-2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2000
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2100, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2100, sellCostBuyPrice =sellCostBuyPrice-2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2000
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '95', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '1034';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1034', '1', '5', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '90', '95', '1', '2026-10-05 18:09:23','0','0'); -- id=2471
UPDATE buypriceshistorybook set sellQuantity = sellQuantity-5 where id = 30;
UPDATE sellbilldetail SET  lastbuyprice = 545.00 , meanbuyprice = 545.00, lastbuyprice_withDiscount = 537.64, meanbuyprice_withDiscount = 537.64
        , lastbuyprice_withTax = 545, meanbuyprice_withTax = 545, lastbuyprice_withDiscountAndTax = 537.64
                where sellbilldetailid = 360;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1336, '2026-10-06', 2825, 2725, 2725
                    , 2725, 2688.2, 2688.2, 2688.2
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 2725, 2725, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2825, sellCostBuyPrice =sellCostBuyPrice-2725
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2725, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2725
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2688.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2688.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2688.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2725
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2725
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2825, 2725, 2725
                    , 2725, 2688.2, 2688.2, 2688.2
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2725, 2725, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2825, sellCostBuyPrice =sellCostBuyPrice-2725
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2725, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2725
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2688.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2688.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2688.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2725
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2725
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '20', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '1336';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1336', '1', '5', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '15', '20', '1', '2026-10-05 18:09:23','0','0'); -- id=2472
UPDATE sellbilldetail SET  lastbuyprice = 565.00 , meanbuyprice = 565.00, lastbuyprice_withDiscount = 565.00, meanbuyprice_withDiscount = 565.00
        , lastbuyprice_withTax = 565, meanbuyprice_withTax = 565, lastbuyprice_withDiscountAndTax = 565
                where sellbilldetailid = 361;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (751, '2026-10-06', 2925, 2825, 2825
                    , 2825, 2825, 2825, 2825
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 2825, 2825, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2925, sellCostBuyPrice =sellCostBuyPrice-2825
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2825, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2825
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2825, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2825
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2825
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2825
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2825
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2925, 2825, 2825
                    , 2825, 2825, 2825, 2825
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2825, 2825, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2925, sellCostBuyPrice =sellCostBuyPrice-2825
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2825, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2825
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2825, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2825
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2825
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2825
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2825
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '751';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('751', '1', '5', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '5', '10', '1', '2026-10-05 18:09:23','0','0'); -- id=2473
UPDATE sellbilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where sellbilldetailid = 362;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (684, '2026-10-06', 3500, 3300, 3300
                    , 3300, 3300, 3300, 3300
                    , 0, 0, 0, 0
                    , 0, 0, 0,10,0, 3300, 3300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-3500, sellCostBuyPrice =sellCostBuyPrice-3300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-3300, sellCostMeanBuyPrice = sellCostMeanBuyPrice-3300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-3300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-3300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-3300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-3300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-3300
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-10
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 3500, 3300, 3300
                    , 3300, 3300, 3300, 3300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3300, 3300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-3500, sellCostBuyPrice =sellCostBuyPrice-3300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-3300, sellCostMeanBuyPrice = sellCostMeanBuyPrice-3300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-3300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-3300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-3300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-3300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-3300
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '64', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '684';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('684', '1', '10', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '54', '64', '1', '2026-10-05 18:09:23','0','0'); -- id=2474
UPDATE sellbilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where sellbilldetailid = 363;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (677, '2026-10-06', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1750, sellCostBuyPrice =sellCostBuyPrice-1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1650
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1750, sellCostBuyPrice =sellCostBuyPrice-1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1650
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '48', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '677';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('677', '1', '5', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '43', '48', '1', '2026-10-05 18:09:23','0','0'); -- id=2475
UPDATE sellbilldetail SET  lastbuyprice = 250.00 , meanbuyprice = 250.00, lastbuyprice_withDiscount = 250.00, meanbuyprice_withDiscount = 250.00
        , lastbuyprice_withTax = 250, meanbuyprice_withTax = 250, lastbuyprice_withDiscountAndTax = 250
                where sellbilldetailid = 364;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (867, '2026-10-06', 2700, 2500, 2500
                    , 2500, 2500, 2500, 2500
                    , 0, 0, 0, 0
                    , 0, 0, 0,10,0, 2500, 2500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2700, sellCostBuyPrice =sellCostBuyPrice-2500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2500, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2500
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-10
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2700, 2500, 2500
                    , 2500, 2500, 2500, 2500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2500, 2500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2700, sellCostBuyPrice =sellCostBuyPrice-2500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2500, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2500
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '184', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '867';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('867', '1', '10', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '174', '184', '1', '2026-10-05 18:09:23','0','0'); -- id=2476
UPDATE sellbilldetail SET  lastbuyprice = 480.00 , meanbuyprice = 480.00, lastbuyprice_withDiscount = 480.00, meanbuyprice_withDiscount = 480.00
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 480, lastbuyprice_withDiscountAndTax = 480
                where sellbilldetailid = 365;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (845, '2026-10-06', 2500, 2400, 2400
                    , 2400, 2400, 2400, 2400
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 2400, 2400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2500, sellCostBuyPrice =sellCostBuyPrice-2400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2400, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2400
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2500, 2400, 2400
                    , 2400, 2400, 2400, 2400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2400, 2400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2500, sellCostBuyPrice =sellCostBuyPrice-2400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2400, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2400
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '32', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '845';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('845', '1', '5', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '27', '32', '1', '2026-10-05 18:09:23','0','0'); -- id=2477
UPDATE buypriceshistorybook set sellQuantity = sellQuantity-9 where id = 7;
UPDATE sellbilldetail SET  lastbuyprice = 430.00 , meanbuyprice = 430.00, lastbuyprice_withDiscount = 430.00, meanbuyprice_withDiscount = 430.00
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 430, lastbuyprice_withDiscountAndTax = 430
                where sellbilldetailid = 366;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (833, '2026-10-06', 4050, 3870, 3870
                    , 3870, 3870, 3870, 3870
                    , 0, 0, 0, 0
                    , 0, 0, 0,9,0, 3870, 3870, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-4050, sellCostBuyPrice =sellCostBuyPrice-3870
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-3870, sellCostMeanBuyPrice = sellCostMeanBuyPrice-3870
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-3870, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-3870
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-3870
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-3870
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-3870
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-9
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 4050, 3870, 3870
                    , 3870, 3870, 3870, 3870
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3870, 3870, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-4050, sellCostBuyPrice =sellCostBuyPrice-3870
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-3870, sellCostMeanBuyPrice = sellCostMeanBuyPrice-3870
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-3870, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-3870
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-3870
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-3870
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-3870
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '39', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '833';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('833', '1', '9', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '30', '39', '1', '2026-10-05 18:09:23','0','0'); -- id=2478
UPDATE sellbilldetail SET  lastbuyprice = 315.00 , meanbuyprice = 315.00, lastbuyprice_withDiscount = 315.00, meanbuyprice_withDiscount = 315.00
        , lastbuyprice_withTax = 315, meanbuyprice_withTax = 315, lastbuyprice_withDiscountAndTax = 315
                where sellbilldetailid = 367;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (834, '2026-10-06', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1675, sellCostBuyPrice =sellCostBuyPrice-1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1575
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1675, sellCostBuyPrice =sellCostBuyPrice-1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1575
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '20', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '834';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('834', '1', '5', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '15', '20', '1', '2026-10-05 18:09:23','0','0'); -- id=2479
UPDATE sellbilldetail SET  lastbuyprice = 305.00 , meanbuyprice = 305.00, lastbuyprice_withDiscount = 305.00, meanbuyprice_withDiscount = 305.00
        , lastbuyprice_withTax = 305, meanbuyprice_withTax = 305, lastbuyprice_withDiscountAndTax = 305
                where sellbilldetailid = 368;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (838, '2026-10-06', 1625, 1525, 1525
                    , 1525, 1525, 1525, 1525
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 1525, 1525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1625, sellCostBuyPrice =sellCostBuyPrice-1525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1525, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1525, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1525
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1525
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1525
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1625, 1525, 1525
                    , 1525, 1525, 1525, 1525
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1525, 1525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1625, sellCostBuyPrice =sellCostBuyPrice-1525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1525, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1525, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1525
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1525
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1525
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '45', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '838';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('838', '1', '5', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '40', '45', '1', '2026-10-05 18:09:23','0','0'); -- id=2480
UPDATE sellbilldetail SET  lastbuyprice = 535.00 , meanbuyprice = 535.00, lastbuyprice_withDiscount = 535.00, meanbuyprice_withDiscount = 535.00
        , lastbuyprice_withTax = 535, meanbuyprice_withTax = 535, lastbuyprice_withDiscountAndTax = 535
                where sellbilldetailid = 369;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (744, '2026-10-06', 2775, 2675, 2675
                    , 2675, 2675, 2675, 2675
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 2675, 2675, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2775, sellCostBuyPrice =sellCostBuyPrice-2675
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2675, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2675
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2675, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2675
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2675
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2675
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2675
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2775, 2675, 2675
                    , 2675, 2675, 2675, 2675
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2675, 2675, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2775, sellCostBuyPrice =sellCostBuyPrice-2675
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2675, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2675
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2675, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2675
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2675
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2675
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2675
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '15', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '744';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('744', '1', '5', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '10', '15', '1', '2026-10-05 18:09:23','0','0'); -- id=2481
UPDATE sellbilldetail SET  lastbuyprice = 310.00 , meanbuyprice = 310.00, lastbuyprice_withDiscount = 310.00, meanbuyprice_withDiscount = 310.00
        , lastbuyprice_withTax = 310, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 310
                where sellbilldetailid = 370;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (671, '2026-10-06', 990, 930, 930
                    , 930, 930, 930, 930
                    , 0, 0, 0, 0
                    , 0, 0, 0,3,0, 930, 930, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-990, sellCostBuyPrice =sellCostBuyPrice-930
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-930, sellCostMeanBuyPrice = sellCostMeanBuyPrice-930
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-930, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-930
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-930
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-930
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-930
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-3
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 990, 930, 930
                    , 930, 930, 930, 930
                    , 0, 0, 0, 0
                    , 0, 0, 0, 930, 930, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-990, sellCostBuyPrice =sellCostBuyPrice-930
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-930, sellCostMeanBuyPrice = sellCostMeanBuyPrice-930
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-930, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-930
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-930
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-930
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-930
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '755', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '671';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('671', '1', '3', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '752', '755', '1', '2026-10-05 18:09:23','0','0'); -- id=2482
UPDATE sellbilldetail SET  lastbuyprice = 230.00 , meanbuyprice = 230.00, lastbuyprice_withDiscount = 230.00, meanbuyprice_withDiscount = 230.00
        , lastbuyprice_withTax = 230, meanbuyprice_withTax = 230, lastbuyprice_withDiscountAndTax = 230
                where sellbilldetailid = 371;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1233, '2026-10-06', 1250, 1150, 1150
                    , 1150, 1150, 1150, 1150
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 1150, 1150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1250, sellCostBuyPrice =sellCostBuyPrice-1150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1150, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1150
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1250, 1150, 1150
                    , 1150, 1150, 1150, 1150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1150, 1150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1250, sellCostBuyPrice =sellCostBuyPrice-1150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1150, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1150
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '1233';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1233', '1', '5', '0', '86', 'تعديل فاتورة مبيعات', 'sellbillController.php', '31', '36', '1', '2026-10-05 18:09:23','0','0'); -- id=2483
UPDATE client SET  clientdebt = '0', userid = '1' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0.00','1','تعديل فاتورة مبيعات','86', '0', '2026-10-05 18:09:23', '1', 'sellbillController.php', 'تعديل فاتورة مبيعات', '37365', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 18:09:23','0','0','',''); -- id=192
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '334275',  userid = '1' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('371640','37365', '1', '2', 'تعديل فاتورة مبيعات', '86', '334275', '2026-10-06 21:12:20', '1',  'sellbillController.php','1','','0'); -- id=134
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,35525, 35525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-37365, sellCostBuyPrice =sellCostBuyPrice-35525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-35525, sellCostMeanBuyPrice = sellCostMeanBuyPrice-35525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-35488.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-35488.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-35488.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-35525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-35525
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2
                    , 0, 0, 0, 0
                    , 0, 0, 0, 35525, 35525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-37365, sellCostBuyPrice =sellCostBuyPrice-35525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-35525, sellCostMeanBuyPrice = sellCostMeanBuyPrice-35525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-35488.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-35488.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-35488.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-35525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-35525
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2, 35525, 35525)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal-37365, netSellCostBuyPrice = netSellCostBuyPrice-35525
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice-35525
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice-35525
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount-35488.2
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount-35488.2
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice-35488.2
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax-35525
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax-35525;

-- ----------------------------------------------------------------------------------------------------
-- bill update start - delete end - with id = 86 and controlname = sellbillController
-- ----------------------------------------------------------------------------------------------------


-- ----------------------------------------------------------------------------------------------------
-- bill update start - new add start - with id = 86 and controlname = sellbillController
-- ----------------------------------------------------------------------------------------------------

COMMIT;
BEGIN;
CALL clientInUse(41,@clientdebt,@clientname,@treeIdis);
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,deletedsellid,controlname,tax, carnumber, cartype, carchase, carmotor,costcenterid,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,obygyVisitId,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,shipfrom,shipto,paymethodshipping,whatShippingCost,sellbilltypeclientid,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-05 18:09:23', '06ac3b421ef3ad', '41', '97945.90', '97945.9', '0', '1', '37365', '37365', '37365', '0', '1', '2026-10-05 18:09:23', '', '1', '0', 'علي ايكا - عميل', '2', '1', '3', '0', 'علي ايكا - عميل', '92', '86', 'sellbillController', '0','','','','','-1','0','0','37365','0','0','0','0','0','0','0','0','0','0000-00-00','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','0','0',''); -- id=106
UPDATE client SET  clientdebt = '97945.9', userid = '1' WHERE clientid = '41';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('41','97945.90','0','0','اضافة فاتورة مبيعات (معدله)','106', '97945.9', '2026-10-06 21:12:20', '1', 'sellbillController.php', 'اضافة فاتورة مبيعات (معدله)', '37365', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 18:09:23','0','0','',''); -- id=193
UPDATE client SET  inUse = 0 where clientid = 41;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('470','09728', '106', '28', '946', '5.00', '490', '2450', '0', '', '0', '2026-10-06 21:12:20', '946', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','490','2450','0','','0','0.00','0','0','0','0'); -- id=417
UPDATE sellbilldetail SET  lastbuyprice = 470.00 , meanbuyprice = 470.00, lastbuyprice_withDiscount = 470.00, meanbuyprice_withDiscount = 470.00
        , lastbuyprice_withTax = 470, meanbuyprice_withTax = 470, lastbuyprice_withDiscountAndTax = 470
                where sellbilldetailid = 417;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (946, '2026-10-06', 2450, 2350, 2350
                    , 2350, 2350, 2350, 2350
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2350, 2350, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2450, sellCostBuyPrice =sellCostBuyPrice+2350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2350, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2350, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2350
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2350
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2350
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2450, 2350, 2350
                    , 2350, 2350, 2350, 2350
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2350, 2350, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2450, sellCostBuyPrice =sellCostBuyPrice+2350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2350, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2350, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2350
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2350
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2350
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '946';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('946', '1', '5', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '5', '0', '1', '2026-10-06 21:12:20','0','0'); -- id=2484
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('405','90202', '106', '28', '928', '10.00', '425', '4250', '0', '', '0', '2026-10-06 21:12:20', '928', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','425','4250','0','','0','0.00','0','0','0','0'); -- id=418
UPDATE sellbilldetail SET  lastbuyprice = 405.00 , meanbuyprice = 405.00, lastbuyprice_withDiscount = 405.00, meanbuyprice_withDiscount = 405.00
        , lastbuyprice_withTax = 405, meanbuyprice_withTax = 405, lastbuyprice_withDiscountAndTax = 405
                where sellbilldetailid = 418;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (928, '2026-10-06', 4250, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4250, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 4250, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4250, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '51', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '928';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('928', '1', '10', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '61', '51', '1', '2026-10-06 21:12:20','0','0'); -- id=2485
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('400','09822', '106', '32', '1034', '5.00', '420', '2100', '0', '', '0', '2026-10-06 21:12:20', '1034', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','420','2100','0','','0','0.00','0','0','0','0'); -- id=419
UPDATE sellbilldetail SET  lastbuyprice = 400.00 , meanbuyprice = 400.00, lastbuyprice_withDiscount = 400.00, meanbuyprice_withDiscount = 400.00
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where sellbilldetailid = 419;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1034, '2026-10-06', 2100, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2100, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '90', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '1034';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1034', '1', '5', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '95', '90', '1', '2026-10-06 21:12:20','0','0'); -- id=2486
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 30;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('537.64','01336', '106', '8', '1336', '5.00', '565', '2825', '0', '', '0', '2026-10-06 21:12:20', '1336', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','30-5,','1','1','0','0','565','2825','0','','0','0.00','0','0','0','0'); -- id=420
UPDATE sellbilldetail SET  lastbuyprice = 545.00 , meanbuyprice = 545.00, lastbuyprice_withDiscount = 537.64, meanbuyprice_withDiscount = 537.64
        , lastbuyprice_withTax = 545, meanbuyprice_withTax = 545, lastbuyprice_withDiscountAndTax = 537.64
                where sellbilldetailid = 420;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1336, '2026-10-06', 2825, 2725, 2725
                    , 2725, 2688.2, 2688.2, 2688.2
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2725, 2725, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2825, sellCostBuyPrice =sellCostBuyPrice+2725
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2725, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2725
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2688.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2688.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2688.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2725
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2725
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2825, 2725, 2725
                    , 2725, 2688.2, 2688.2, 2688.2
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2725, 2725, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2825, sellCostBuyPrice =sellCostBuyPrice+2725
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2725, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2725
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2688.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2688.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2688.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2725
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2725
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '1336';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1336', '1', '5', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '20', '15', '1', '2026-10-06 21:12:20','0','0'); -- id=2487
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('565','09783', '106', '8', '751', '5.00', '585', '2925', '0', '', '0', '2026-10-06 21:12:20', '751', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','585','2925','0','','0','0.00','0','0','0','0'); -- id=421
UPDATE sellbilldetail SET  lastbuyprice = 565.00 , meanbuyprice = 565.00, lastbuyprice_withDiscount = 565.00, meanbuyprice_withDiscount = 565.00
        , lastbuyprice_withTax = 565, meanbuyprice_withTax = 565, lastbuyprice_withDiscountAndTax = 565
                where sellbilldetailid = 421;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (751, '2026-10-06', 2925, 2825, 2825
                    , 2825, 2825, 2825, 2825
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2825, 2825, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2925, sellCostBuyPrice =sellCostBuyPrice+2825
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2825, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2825
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2825, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2825
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2825
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2825
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2825
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2925, 2825, 2825
                    , 2825, 2825, 2825, 2825
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2825, 2825, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2925, sellCostBuyPrice =sellCostBuyPrice+2825
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2825, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2825
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2825, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2825
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2825
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2825
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2825
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '5', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '751';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('751', '1', '5', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '10', '5', '1', '2026-10-06 21:12:20','0','0'); -- id=2488
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('330','09773', '106', '6', '684', '10.00', '350', '3500', '0', '', '0', '2026-10-06 21:12:20', '684', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','350','3500','0','','0','0.00','0','0','0','0'); -- id=422
UPDATE sellbilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where sellbilldetailid = 422;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (684, '2026-10-06', 3500, 3300, 3300
                    , 3300, 3300, 3300, 3300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 3300, 3300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3300, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3300
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 3500, 3300, 3300
                    , 3300, 3300, 3300, 3300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3300, 3300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3300, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3300
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '54', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '684';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('684', '1', '10', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '64', '54', '1', '2026-10-06 21:12:20','0','0'); -- id=2489
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('330','09518', '106', '6', '677', '5.00', '350', '1750', '0', '', '0', '2026-10-06 21:12:20', '677', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','350','1750','0','','0','0.00','0','0','0','0'); -- id=423
UPDATE sellbilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where sellbilldetailid = 423;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (677, '2026-10-06', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1750, sellCostBuyPrice =sellCostBuyPrice+1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1750, sellCostBuyPrice =sellCostBuyPrice+1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '43', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '677';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('677', '1', '5', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '48', '43', '1', '2026-10-06 21:12:20','0','0'); -- id=2490
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('250','04563', '106', '21', '867', '10.00', '270', '2700', '0', '', '0', '2026-10-06 21:12:20', '867', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','270','2700','0','','0','0.00','0','0','0','0'); -- id=424
UPDATE sellbilldetail SET  lastbuyprice = 250.00 , meanbuyprice = 250.00, lastbuyprice_withDiscount = 250.00, meanbuyprice_withDiscount = 250.00
        , lastbuyprice_withTax = 250, meanbuyprice_withTax = 250, lastbuyprice_withDiscountAndTax = 250
                where sellbilldetailid = 424;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (867, '2026-10-06', 2700, 2500, 2500
                    , 2500, 2500, 2500, 2500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 2500, 2500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2700, sellCostBuyPrice =sellCostBuyPrice+2500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2500
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2700, 2500, 2500
                    , 2500, 2500, 2500, 2500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2500, 2500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2700, sellCostBuyPrice =sellCostBuyPrice+2500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2500
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '174', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '867';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('867', '1', '10', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '184', '174', '1', '2026-10-06 21:12:20','0','0'); -- id=2491
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('480','09810', '106', '19', '845', '5.00', '500', '2500', '0', '', '0', '2026-10-06 21:12:20', '845', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','500','2500','0','','0','0.00','0','0','0','0'); -- id=425
UPDATE sellbilldetail SET  lastbuyprice = 480.00 , meanbuyprice = 480.00, lastbuyprice_withDiscount = 480.00, meanbuyprice_withDiscount = 480.00
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 480, lastbuyprice_withDiscountAndTax = 480
                where sellbilldetailid = 425;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (845, '2026-10-06', 2500, 2400, 2400
                    , 2400, 2400, 2400, 2400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2400, 2400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2500, sellCostBuyPrice =sellCostBuyPrice+2400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2500, 2400, 2400
                    , 2400, 2400, 2400, 2400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2400, 2400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2500, sellCostBuyPrice =sellCostBuyPrice+2400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '27', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '845';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('845', '1', '5', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '32', '27', '1', '2026-10-06 21:12:20','0','0'); -- id=2492
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 7;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('430','07429', '106', '19', '833', '9.00', '450', '4050', '0', '', '0', '2026-10-06 21:12:20', '833', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','7-9,','1','1','0','0','450','4050','0','','0','0.00','0','0','0','0'); -- id=426
UPDATE sellbilldetail SET  lastbuyprice = 430.00 , meanbuyprice = 430.00, lastbuyprice_withDiscount = 430.00, meanbuyprice_withDiscount = 430.00
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 430, lastbuyprice_withDiscountAndTax = 430
                where sellbilldetailid = 426;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (833, '2026-10-06', 4050, 3870, 3870
                    , 3870, 3870, 3870, 3870
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 3870, 3870, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4050, sellCostBuyPrice =sellCostBuyPrice+3870
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3870, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3870
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3870, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3870
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3870
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3870
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3870
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+9
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 4050, 3870, 3870
                    , 3870, 3870, 3870, 3870
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3870, 3870, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4050, sellCostBuyPrice =sellCostBuyPrice+3870
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3870, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3870
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3870, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3870
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3870
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3870
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3870
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '833';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('833', '1', '9', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '39', '30', '1', '2026-10-06 21:12:20','0','0'); -- id=2493
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('315','78068', '106', '19', '834', '5.00', '335', '1675', '0', '', '0', '2026-10-06 21:12:20', '834', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','335','1675','0','','0','0.00','0','0','0','0'); -- id=427
UPDATE sellbilldetail SET  lastbuyprice = 315.00 , meanbuyprice = 315.00, lastbuyprice_withDiscount = 315.00, meanbuyprice_withDiscount = 315.00
        , lastbuyprice_withTax = 315, meanbuyprice_withTax = 315, lastbuyprice_withDiscountAndTax = 315
                where sellbilldetailid = 427;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (834, '2026-10-06', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1675, sellCostBuyPrice =sellCostBuyPrice+1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1575
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1675, sellCostBuyPrice =sellCostBuyPrice+1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1575
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '834';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('834', '1', '5', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '20', '15', '1', '2026-10-06 21:12:20','0','0'); -- id=2494
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('305','08778', '106', '19', '838', '5.00', '325', '1625', '0', '', '0', '2026-10-06 21:12:20', '838', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','325','1625','0','','0','0.00','0','0','0','0'); -- id=428
UPDATE sellbilldetail SET  lastbuyprice = 305.00 , meanbuyprice = 305.00, lastbuyprice_withDiscount = 305.00, meanbuyprice_withDiscount = 305.00
        , lastbuyprice_withTax = 305, meanbuyprice_withTax = 305, lastbuyprice_withDiscountAndTax = 305
                where sellbilldetailid = 428;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (838, '2026-10-06', 1625, 1525, 1525
                    , 1525, 1525, 1525, 1525
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1525, 1525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1625, sellCostBuyPrice =sellCostBuyPrice+1525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1525, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1525, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1525
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1525
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1525
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1625, 1525, 1525
                    , 1525, 1525, 1525, 1525
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1525, 1525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1625, sellCostBuyPrice =sellCostBuyPrice+1525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1525, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1525, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1525
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1525
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1525
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '40', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '838';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('838', '1', '5', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '45', '40', '1', '2026-10-06 21:12:20','0','0'); -- id=2495
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('535','09720', '106', '8', '744', '5.00', '555', '2775', '0', '', '0', '2026-10-06 21:12:20', '744', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','555','2775','0','','0','0.00','0','0','0','0'); -- id=429
UPDATE sellbilldetail SET  lastbuyprice = 535.00 , meanbuyprice = 535.00, lastbuyprice_withDiscount = 535.00, meanbuyprice_withDiscount = 535.00
        , lastbuyprice_withTax = 535, meanbuyprice_withTax = 535, lastbuyprice_withDiscountAndTax = 535
                where sellbilldetailid = 429;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (744, '2026-10-06', 2775, 2675, 2675
                    , 2675, 2675, 2675, 2675
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2675, 2675, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2775, sellCostBuyPrice =sellCostBuyPrice+2675
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2675, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2675
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2675, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2675
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2675
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2675
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2675
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2775, 2675, 2675
                    , 2675, 2675, 2675, 2675
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2675, 2675, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2775, sellCostBuyPrice =sellCostBuyPrice+2675
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2675, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2675
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2675, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2675
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2675
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2675
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2675
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '744';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('744', '1', '5', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '15', '10', '1', '2026-10-06 21:12:20','0','0'); -- id=2496
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('310','08746', '106', '6', '671', '3.00', '330', '990', '0', '', '0', '2026-10-06 21:12:20', '671', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','330','990','0','','0','0.00','0','0','0','0'); -- id=430
UPDATE sellbilldetail SET  lastbuyprice = 310.00 , meanbuyprice = 310.00, lastbuyprice_withDiscount = 310.00, meanbuyprice_withDiscount = 310.00
        , lastbuyprice_withTax = 310, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 310
                where sellbilldetailid = 430;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (671, '2026-10-06', 990, 930, 930
                    , 930, 930, 930, 930
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 930, 930, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+990, sellCostBuyPrice =sellCostBuyPrice+930
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+930, sellCostMeanBuyPrice = sellCostMeanBuyPrice+930
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+930, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+930
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+930
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+930
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+930
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 990, 930, 930
                    , 930, 930, 930, 930
                    , 0, 0, 0, 0
                    , 0, 0, 0, 930, 930, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+990, sellCostBuyPrice =sellCostBuyPrice+930
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+930, sellCostMeanBuyPrice = sellCostMeanBuyPrice+930
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+930, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+930
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+930
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+930
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+930
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '752', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '671';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('671', '1', '3', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '755', '752', '1', '2026-10-06 21:12:20','0','0'); -- id=2497
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('230','08703', '106', '68', '1233', '5.00', '250', '1250', '0', '', '0', '2026-10-06 21:12:20', '1233', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','250','1250','0','','0','0.00','0','0','0','0'); -- id=431
UPDATE sellbilldetail SET  lastbuyprice = 230.00 , meanbuyprice = 230.00, lastbuyprice_withDiscount = 230.00, meanbuyprice_withDiscount = 230.00
        , lastbuyprice_withTax = 230, meanbuyprice_withTax = 230, lastbuyprice_withDiscountAndTax = 230
                where sellbilldetailid = 431;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1233, '2026-10-06', 1250, 1150, 1150
                    , 1150, 1150, 1150, 1150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1150, 1150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1250, sellCostBuyPrice =sellCostBuyPrice+1150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1150
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1250, 1150, 1150
                    , 1150, 1150, 1150, 1150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1150, 1150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1250, sellCostBuyPrice =sellCostBuyPrice+1150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1150
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '31', userid = '1', storedetaildate = '2026-10-06 21:12:20' WHERE storedetailid = '1233';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1233', '1', '5', '1', '106', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '36', '31', '1', '2026-10-06 21:12:20','0','0'); -- id=2498
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '371640',  userid = '1' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('334275','37365', '0', '2', 'اضافة فاتورة مبيعات (معدله)', '106', '371640', '2026-10-06 21:12:20', '1',  'sellbillController.php','41','','0'); -- id=135
UPDATE dailyentry SET totalcreditor = '37365.00', totaldebtor = '37365.00', thedate = '2026-10-05', userid = '2', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-05 18:09:23', entryComment = 'اضافة فاتورة مبيعات رقم 86', fromFlag = '1',related='0',isopeningentry='0',operationId='86',operationDetailLink='sellbillController.php?do=showDetail&sellbillid=86' WHERE id = '1121';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '37365.00', '37365.00', '2026-10-06', '1', '0', '1121', '2026-10-06 21:12:20','تم عكس القيد رقم 1121 ','1','0','0','0','0',''); -- id=1203
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1203', '419', '37365.00', '','0'); -- id=1203
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '334275', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1203', '143', '37365.00', '','0'); -- id=1209
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '976335', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
UPDATE dailyentry SET totalcreditor = '35488.20', totaldebtor = '35488.20', thedate = '2026-10-05', userid = '2', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-05 18:09:23', entryComment = 'اضافة فاتورة مبيعات رقم 86 - صرف البضاعة من المخزن', fromFlag = '1',related='0',isopeningentry='0',operationId='86',operationDetailLink='sellbillController.php?do=showDetail&sellbillid=86' WHERE id = '1122';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '35488.20', '35488.20', '2026-10-06', '1', '0', '1122', '2026-10-06 21:12:20','تم عكس القيد رقم 1122 ','1','0','0','0','0',''); -- id=1204
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1204', '402', '35488.20', '','0'); -- id=1204
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '948399.56', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1204', '382', '35488.20', '','0'); -- id=1210
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16363262.44', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '37365', '37365', '2026-10-06', '1', '0', '0', '2026-10-06 21:12:20','اضافة فاتورة مبيعات رقم 106','1','0',null,'0','106','sellbillController.php?do=showDetail&sellbillid=106'); -- id=1205
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1205', '539', '37365', '','0'); -- id=1211
UPDATE accountstree SET name = 'علي ايكا - عميل', customName = 'علي ايكا - عميل', customNameEn = 'علي ايكا - عميل', nameEn = 'علي ايكا - عميل', parent = '58', accountNature = '0', theValue = '37365', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2026-10-01 21:23:06' WHERE id = '539';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1205', '143', '37365', '','0'); -- id=1205
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1013700', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '37365', '37365', '2026-10-06', '1', '0', '0', '2026-10-06 21:12:20','اضافة فاتورة مبيعات رقم 106 - تحصيل الفاتورة من العميل','1','0',null,'0','106','sellbillController.php?do=showDetail&sellbillid=106'); -- id=1206
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1206', '419', '37365', '','0'); -- id=1212
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '371640', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1206', '539', '37365', '','0'); -- id=1206
UPDATE accountstree SET name = 'علي ايكا - عميل', customName = 'علي ايكا - عميل', customNameEn = 'علي ايكا - عميل', nameEn = 'علي ايكا - عميل', parent = '58', accountNature = '0', theValue = '0', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2026-10-01 21:23:06' WHERE id = '539';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '35488.2', '35488.2', '2026-10-06', '1', '0', '0', '2026-10-06 21:12:20','اضافة فاتورة مبيعات رقم 106 - صرف البضاعة من المخزن','1','0',null,'0','106','sellbillController.php?do=showDetail&sellbillid=106'); -- id=1207
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1207', '402', '35488.2', '','0'); -- id=1213
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '983887.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1207', '382', '35488.2', '','0'); -- id=1207
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16327774.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1205,1206,1207' where sellbillid=106;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,35525, 35525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+37365, sellCostBuyPrice =sellCostBuyPrice+35525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+35525, sellCostMeanBuyPrice = sellCostMeanBuyPrice+35525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+35488.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+35488.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+35488.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+35525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+35525
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (41, '2026-10-06', 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,35525, 35525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+37365, sellCostBuyPrice =sellCostBuyPrice+35525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+35525, sellCostMeanBuyPrice = sellCostMeanBuyPrice+35525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+35488.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+35488.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+35488.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+35525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+35525
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2, 35525, 35525)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+37365, netSellCostBuyPrice = netSellCostBuyPrice+35525
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+35525
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+35525
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+35488.2
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+35488.2
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+35488.2
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+35525
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+35525;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill update end - new add end - with oldid = 86 and newid=106 and controlname = sellbillController
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:42:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:12:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:12:20', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=editprint&id=106'); -- id=3636
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:42:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:12:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:12:30', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=show'); -- id=3637
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:42:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:12:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:12:49', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=show'); -- id=3638
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:42:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:12:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:12:59', '1', 'editsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=editsellBill&sellbillid=106'); -- id=3639
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:43:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:13:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:13:10', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=update'); -- id=3640
BEGIN;

-- ----------------------------------------------------------------------------------------------------
-- bill update start - with id = 106 and  = sellbillController
-- ----------------------------------------------------------------------------------------------------


-- ----------------------------------------------------------------------------------------------------
-- bill update start - delete start with id = 106 and controlname = sellbillController
-- ----------------------------------------------------------------------------------------------------

UPDATE costcenterdetail SET del = 1 WHERE type in( 0) and  modelid = 106;
UPDATE sellbill SET  sellbillsysdate = '2026-10-06 21:13:10', userid = '1',delbyuserid = '1', conditions = '1'  WHERE sellbillid = '106';
UPDATE sellbilldetail SET  lastbuyprice = 470.00 , meanbuyprice = 470.00, lastbuyprice_withDiscount = 470.00, meanbuyprice_withDiscount = 470.00
        , lastbuyprice_withTax = 470, meanbuyprice_withTax = 470, lastbuyprice_withDiscountAndTax = 470
                where sellbilldetailid = 417;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (946, '2026-10-06', 2450, 2350, 2350
                    , 2350, 2350, 2350, 2350
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 2350, 2350, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2450, sellCostBuyPrice =sellCostBuyPrice-2350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2350, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2350, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2350
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2350
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2350
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2450, 2350, 2350
                    , 2350, 2350, 2350, 2350
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2350, 2350, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2450, sellCostBuyPrice =sellCostBuyPrice-2350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2350, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2350, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2350
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2350
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2350
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '5', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '946';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('946', '1', '5', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '0', '5', '1', '2026-10-05 18:09:23','0','0'); -- id=2499
UPDATE sellbilldetail SET  lastbuyprice = 405.00 , meanbuyprice = 405.00, lastbuyprice_withDiscount = 405.00, meanbuyprice_withDiscount = 405.00
        , lastbuyprice_withTax = 405, meanbuyprice_withTax = 405, lastbuyprice_withDiscountAndTax = 405
                where sellbilldetailid = 418;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (928, '2026-10-06', 4250, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0,10,0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-4250, sellCostBuyPrice =sellCostBuyPrice-4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice-4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-4050
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-10
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 4250, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-4250, sellCostBuyPrice =sellCostBuyPrice-4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice-4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-4050
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '61', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '928';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('928', '1', '10', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '51', '61', '1', '2026-10-05 18:09:23','0','0'); -- id=2500
UPDATE sellbilldetail SET  lastbuyprice = 400.00 , meanbuyprice = 400.00, lastbuyprice_withDiscount = 400.00, meanbuyprice_withDiscount = 400.00
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where sellbilldetailid = 419;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1034, '2026-10-06', 2100, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2100, sellCostBuyPrice =sellCostBuyPrice-2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2000
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2100, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2100, sellCostBuyPrice =sellCostBuyPrice-2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2000
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '95', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '1034';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1034', '1', '5', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '90', '95', '1', '2026-10-05 18:09:23','0','0'); -- id=2501
UPDATE buypriceshistorybook set sellQuantity = sellQuantity-5 where id = 30;
UPDATE sellbilldetail SET  lastbuyprice = 545.00 , meanbuyprice = 545.00, lastbuyprice_withDiscount = 537.64, meanbuyprice_withDiscount = 537.64
        , lastbuyprice_withTax = 545, meanbuyprice_withTax = 545, lastbuyprice_withDiscountAndTax = 537.64
                where sellbilldetailid = 420;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1336, '2026-10-06', 2825, 2725, 2725
                    , 2725, 2688.2, 2688.2, 2688.2
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 2725, 2725, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2825, sellCostBuyPrice =sellCostBuyPrice-2725
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2725, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2725
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2688.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2688.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2688.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2725
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2725
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2825, 2725, 2725
                    , 2725, 2688.2, 2688.2, 2688.2
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2725, 2725, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2825, sellCostBuyPrice =sellCostBuyPrice-2725
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2725, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2725
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2688.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2688.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2688.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2725
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2725
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '20', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '1336';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1336', '1', '5', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '15', '20', '1', '2026-10-05 18:09:23','0','0'); -- id=2502
UPDATE sellbilldetail SET  lastbuyprice = 565.00 , meanbuyprice = 565.00, lastbuyprice_withDiscount = 565.00, meanbuyprice_withDiscount = 565.00
        , lastbuyprice_withTax = 565, meanbuyprice_withTax = 565, lastbuyprice_withDiscountAndTax = 565
                where sellbilldetailid = 421;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (751, '2026-10-06', 2925, 2825, 2825
                    , 2825, 2825, 2825, 2825
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 2825, 2825, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2925, sellCostBuyPrice =sellCostBuyPrice-2825
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2825, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2825
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2825, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2825
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2825
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2825
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2825
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2925, 2825, 2825
                    , 2825, 2825, 2825, 2825
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2825, 2825, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2925, sellCostBuyPrice =sellCostBuyPrice-2825
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2825, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2825
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2825, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2825
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2825
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2825
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2825
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '751';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('751', '1', '5', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '5', '10', '1', '2026-10-05 18:09:23','0','0'); -- id=2503
UPDATE sellbilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where sellbilldetailid = 422;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (684, '2026-10-06', 3500, 3300, 3300
                    , 3300, 3300, 3300, 3300
                    , 0, 0, 0, 0
                    , 0, 0, 0,10,0, 3300, 3300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-3500, sellCostBuyPrice =sellCostBuyPrice-3300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-3300, sellCostMeanBuyPrice = sellCostMeanBuyPrice-3300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-3300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-3300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-3300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-3300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-3300
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-10
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 3500, 3300, 3300
                    , 3300, 3300, 3300, 3300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3300, 3300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-3500, sellCostBuyPrice =sellCostBuyPrice-3300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-3300, sellCostMeanBuyPrice = sellCostMeanBuyPrice-3300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-3300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-3300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-3300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-3300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-3300
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '64', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '684';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('684', '1', '10', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '54', '64', '1', '2026-10-05 18:09:23','0','0'); -- id=2504
UPDATE sellbilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where sellbilldetailid = 423;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (677, '2026-10-06', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1750, sellCostBuyPrice =sellCostBuyPrice-1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1650
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1750, sellCostBuyPrice =sellCostBuyPrice-1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1650
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '48', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '677';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('677', '1', '5', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '43', '48', '1', '2026-10-05 18:09:23','0','0'); -- id=2505
UPDATE sellbilldetail SET  lastbuyprice = 250.00 , meanbuyprice = 250.00, lastbuyprice_withDiscount = 250.00, meanbuyprice_withDiscount = 250.00
        , lastbuyprice_withTax = 250, meanbuyprice_withTax = 250, lastbuyprice_withDiscountAndTax = 250
                where sellbilldetailid = 424;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (867, '2026-10-06', 2700, 2500, 2500
                    , 2500, 2500, 2500, 2500
                    , 0, 0, 0, 0
                    , 0, 0, 0,10,0, 2500, 2500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2700, sellCostBuyPrice =sellCostBuyPrice-2500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2500, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2500
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-10
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2700, 2500, 2500
                    , 2500, 2500, 2500, 2500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2500, 2500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2700, sellCostBuyPrice =sellCostBuyPrice-2500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2500, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2500
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '184', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '867';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('867', '1', '10', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '174', '184', '1', '2026-10-05 18:09:23','0','0'); -- id=2506
UPDATE sellbilldetail SET  lastbuyprice = 480.00 , meanbuyprice = 480.00, lastbuyprice_withDiscount = 480.00, meanbuyprice_withDiscount = 480.00
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 480, lastbuyprice_withDiscountAndTax = 480
                where sellbilldetailid = 425;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (845, '2026-10-06', 2500, 2400, 2400
                    , 2400, 2400, 2400, 2400
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 2400, 2400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2500, sellCostBuyPrice =sellCostBuyPrice-2400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2400, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2400
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2500, 2400, 2400
                    , 2400, 2400, 2400, 2400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2400, 2400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2500, sellCostBuyPrice =sellCostBuyPrice-2400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2400, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2400
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '32', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '845';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('845', '1', '5', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '27', '32', '1', '2026-10-05 18:09:23','0','0'); -- id=2507
UPDATE buypriceshistorybook set sellQuantity = sellQuantity-9 where id = 7;
UPDATE sellbilldetail SET  lastbuyprice = 430.00 , meanbuyprice = 430.00, lastbuyprice_withDiscount = 430.00, meanbuyprice_withDiscount = 430.00
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 430, lastbuyprice_withDiscountAndTax = 430
                where sellbilldetailid = 426;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (833, '2026-10-06', 4050, 3870, 3870
                    , 3870, 3870, 3870, 3870
                    , 0, 0, 0, 0
                    , 0, 0, 0,9,0, 3870, 3870, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-4050, sellCostBuyPrice =sellCostBuyPrice-3870
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-3870, sellCostMeanBuyPrice = sellCostMeanBuyPrice-3870
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-3870, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-3870
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-3870
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-3870
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-3870
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-9
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 4050, 3870, 3870
                    , 3870, 3870, 3870, 3870
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3870, 3870, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-4050, sellCostBuyPrice =sellCostBuyPrice-3870
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-3870, sellCostMeanBuyPrice = sellCostMeanBuyPrice-3870
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-3870, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-3870
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-3870
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-3870
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-3870
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '39', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '833';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('833', '1', '9', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '30', '39', '1', '2026-10-05 18:09:23','0','0'); -- id=2508
UPDATE sellbilldetail SET  lastbuyprice = 315.00 , meanbuyprice = 315.00, lastbuyprice_withDiscount = 315.00, meanbuyprice_withDiscount = 315.00
        , lastbuyprice_withTax = 315, meanbuyprice_withTax = 315, lastbuyprice_withDiscountAndTax = 315
                where sellbilldetailid = 427;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (834, '2026-10-06', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1675, sellCostBuyPrice =sellCostBuyPrice-1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1575
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1675, sellCostBuyPrice =sellCostBuyPrice-1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1575
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '20', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '834';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('834', '1', '5', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '15', '20', '1', '2026-10-05 18:09:23','0','0'); -- id=2509
UPDATE sellbilldetail SET  lastbuyprice = 305.00 , meanbuyprice = 305.00, lastbuyprice_withDiscount = 305.00, meanbuyprice_withDiscount = 305.00
        , lastbuyprice_withTax = 305, meanbuyprice_withTax = 305, lastbuyprice_withDiscountAndTax = 305
                where sellbilldetailid = 428;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (838, '2026-10-06', 1625, 1525, 1525
                    , 1525, 1525, 1525, 1525
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 1525, 1525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1625, sellCostBuyPrice =sellCostBuyPrice-1525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1525, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1525, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1525
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1525
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1525
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1625, 1525, 1525
                    , 1525, 1525, 1525, 1525
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1525, 1525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1625, sellCostBuyPrice =sellCostBuyPrice-1525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1525, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1525, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1525
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1525
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1525
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '45', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '838';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('838', '1', '5', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '40', '45', '1', '2026-10-05 18:09:23','0','0'); -- id=2510
UPDATE sellbilldetail SET  lastbuyprice = 535.00 , meanbuyprice = 535.00, lastbuyprice_withDiscount = 535.00, meanbuyprice_withDiscount = 535.00
        , lastbuyprice_withTax = 535, meanbuyprice_withTax = 535, lastbuyprice_withDiscountAndTax = 535
                where sellbilldetailid = 429;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (744, '2026-10-06', 2775, 2675, 2675
                    , 2675, 2675, 2675, 2675
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 2675, 2675, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2775, sellCostBuyPrice =sellCostBuyPrice-2675
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2675, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2675
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2675, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2675
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2675
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2675
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2675
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2775, 2675, 2675
                    , 2675, 2675, 2675, 2675
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2675, 2675, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-2775, sellCostBuyPrice =sellCostBuyPrice-2675
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-2675, sellCostMeanBuyPrice = sellCostMeanBuyPrice-2675
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-2675, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-2675
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-2675
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-2675
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-2675
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '15', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '744';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('744', '1', '5', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '10', '15', '1', '2026-10-05 18:09:23','0','0'); -- id=2511
UPDATE sellbilldetail SET  lastbuyprice = 310.00 , meanbuyprice = 310.00, lastbuyprice_withDiscount = 310.00, meanbuyprice_withDiscount = 310.00
        , lastbuyprice_withTax = 310, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 310
                where sellbilldetailid = 430;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (671, '2026-10-06', 990, 930, 930
                    , 930, 930, 930, 930
                    , 0, 0, 0, 0
                    , 0, 0, 0,3,0, 930, 930, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-990, sellCostBuyPrice =sellCostBuyPrice-930
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-930, sellCostMeanBuyPrice = sellCostMeanBuyPrice-930
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-930, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-930
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-930
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-930
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-930
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-3
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 990, 930, 930
                    , 930, 930, 930, 930
                    , 0, 0, 0, 0
                    , 0, 0, 0, 930, 930, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-990, sellCostBuyPrice =sellCostBuyPrice-930
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-930, sellCostMeanBuyPrice = sellCostMeanBuyPrice-930
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-930, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-930
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-930
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-930
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-930
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '755', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '671';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('671', '1', '3', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '752', '755', '1', '2026-10-05 18:09:23','0','0'); -- id=2512
UPDATE sellbilldetail SET  lastbuyprice = 230.00 , meanbuyprice = 230.00, lastbuyprice_withDiscount = 230.00, meanbuyprice_withDiscount = 230.00
        , lastbuyprice_withTax = 230, meanbuyprice_withTax = 230, lastbuyprice_withDiscountAndTax = 230
                where sellbilldetailid = 431;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1233, '2026-10-06', 1250, 1150, 1150
                    , 1150, 1150, 1150, 1150
                    , 0, 0, 0, 0
                    , 0, 0, 0,5,0, 1150, 1150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1250, sellCostBuyPrice =sellCostBuyPrice-1150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1150, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1150
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0
                        , netQuantity = netQuantity-5
                        , netQuantityRet = netQuantityRet-0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1250, 1150, 1150
                    , 1150, 1150, 1150, 1150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1150, 1150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-1250, sellCostBuyPrice =sellCostBuyPrice-1150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-1150, sellCostMeanBuyPrice = sellCostMeanBuyPrice-1150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-1150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-1150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-1150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-1150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-1150
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '1233';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1233', '1', '5', '0', '106', 'تعديل فاتورة مبيعات', 'sellbillController.php', '31', '36', '1', '2026-10-05 18:09:23','0','0'); -- id=2513
CALL clientInUse(41,@clientdebt,@clientname,@treeIdis);
UPDATE client SET  clientdebt = '97945.9', userid = '1' WHERE clientid = '41';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('41','97945.90','0.00','1','تعديل فاتورة مبيعات','106', '97945.9', '2026-10-05 18:09:23', '1', 'sellbillController.php', 'تعديل فاتورة مبيعات', '37365', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 18:09:23','0','0','',''); -- id=194
UPDATE client SET  inUse = 0 where clientid = 41;
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '334275',  userid = '1' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('371640','37365', '1', '2', 'تعديل فاتورة مبيعات', '106', '334275', '2026-10-06 21:13:10', '1',  'sellbillController.php','41','','0'); -- id=136
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,35525, 35525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-37365, sellCostBuyPrice =sellCostBuyPrice-35525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-35525, sellCostMeanBuyPrice = sellCostMeanBuyPrice-35525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-35488.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-35488.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-35488.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-35525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-35525
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (41, '2026-10-06', 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2
                    , 0, 0, 0, 0
                    , 0, 0, 0, 35525, 35525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal-37365, sellCostBuyPrice =sellCostBuyPrice-35525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice-35525, sellCostMeanBuyPrice = sellCostMeanBuyPrice-35525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount-35488.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount-35488.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice-35488.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax-35525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax-35525
                        , returnSellVal = returnSellVal-0, returnSellCostBuyPrice = returnSellCostBuyPrice-0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice-0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice-0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount-0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount-0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice-0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax-0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax-0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2, 35525, 35525)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal-37365, netSellCostBuyPrice = netSellCostBuyPrice-35525
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice-35525
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice-35525
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount-35488.2
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount-35488.2
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice-35488.2
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax-35525
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax-35525;

-- ----------------------------------------------------------------------------------------------------
-- bill update start - delete end - with id = 106 and controlname = sellbillController
-- ----------------------------------------------------------------------------------------------------


-- ----------------------------------------------------------------------------------------------------
-- bill update start - new add start - with id = 106 and controlname = sellbillController
-- ----------------------------------------------------------------------------------------------------

COMMIT;
BEGIN;
CALL clientInUse(41,@clientdebt,@clientname,@treeIdis);
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,deletedsellid,controlname,tax, carnumber, cartype, carchase, carmotor,costcenterid,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,obygyVisitId,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,shipfrom,shipto,paymethodshipping,whatShippingCost,sellbilltypeclientid,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-05 18:09:23', '06ac3b421ef3ad', '41', '97945.90', '135310.9', '0', '1', '37365', '37365', '0', '37365', '1', '2026-10-05 18:09:23', '', '1', '0', 'علي ايكا - عميل', '2', '1', '3', '0', 'علي ايكا - عميل', '92', '106', 'sellbillController', '0','','','','','-1','0','0','0','0','0','0','0','0','0','0','0','0','0000-00-00','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','0','0',''); -- id=107
UPDATE client SET  clientdebt = '135310.9', userid = '1' WHERE clientid = '41';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('41','97945.90','37365','0','اضافة فاتورة مبيعات (معدله)','107', '135310.9', '2026-10-06 21:13:10', '1', 'sellbillController.php', 'اضافة فاتورة مبيعات (معدله)', '37365', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 18:09:23','0','0','',''); -- id=195
UPDATE client SET  inUse = 0 where clientid = 41;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('470','09728', '107', '28', '946', '5.00', '490', '2450', '0', '', '0', '2026-10-06 21:13:10', '946', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','490','2450','0','','0','0.00','0','0','0','0'); -- id=432
UPDATE sellbilldetail SET  lastbuyprice = 470.00 , meanbuyprice = 470.00, lastbuyprice_withDiscount = 470.00, meanbuyprice_withDiscount = 470.00
        , lastbuyprice_withTax = 470, meanbuyprice_withTax = 470, lastbuyprice_withDiscountAndTax = 470
                where sellbilldetailid = 432;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (946, '2026-10-06', 2450, 2350, 2350
                    , 2350, 2350, 2350, 2350
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2350, 2350, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2450, sellCostBuyPrice =sellCostBuyPrice+2350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2350, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2350, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2350
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2350
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2350
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2450, 2350, 2350
                    , 2350, 2350, 2350, 2350
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2350, 2350, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2450, sellCostBuyPrice =sellCostBuyPrice+2350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2350, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2350, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2350
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2350
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2350
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '946';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('946', '1', '5', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '5', '0', '1', '2026-10-06 21:13:10','0','0'); -- id=2514
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('405','90202', '107', '28', '928', '10.00', '425', '4250', '0', '', '0', '2026-10-06 21:13:10', '928', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','425','4250','0','','0','0.00','0','0','0','0'); -- id=433
UPDATE sellbilldetail SET  lastbuyprice = 405.00 , meanbuyprice = 405.00, lastbuyprice_withDiscount = 405.00, meanbuyprice_withDiscount = 405.00
        , lastbuyprice_withTax = 405, meanbuyprice_withTax = 405, lastbuyprice_withDiscountAndTax = 405
                where sellbilldetailid = 433;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (928, '2026-10-06', 4250, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4250, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 4250, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4250, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '51', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '928';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('928', '1', '10', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '61', '51', '1', '2026-10-06 21:13:10','0','0'); -- id=2515
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('400','09822', '107', '32', '1034', '5.00', '420', '2100', '0', '', '0', '2026-10-06 21:13:10', '1034', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','420','2100','0','','0','0.00','0','0','0','0'); -- id=434
UPDATE sellbilldetail SET  lastbuyprice = 400.00 , meanbuyprice = 400.00, lastbuyprice_withDiscount = 400.00, meanbuyprice_withDiscount = 400.00
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where sellbilldetailid = 434;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1034, '2026-10-06', 2100, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2100, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '90', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '1034';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1034', '1', '5', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '95', '90', '1', '2026-10-06 21:13:10','0','0'); -- id=2516
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 30;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('537.64','01336', '107', '8', '1336', '5.00', '565', '2825', '0', '', '0', '2026-10-06 21:13:10', '1336', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','30-5,','1','1','0','0','565','2825','0','','0','0.00','0','0','0','0'); -- id=435
UPDATE sellbilldetail SET  lastbuyprice = 545.00 , meanbuyprice = 545.00, lastbuyprice_withDiscount = 537.64, meanbuyprice_withDiscount = 537.64
        , lastbuyprice_withTax = 545, meanbuyprice_withTax = 545, lastbuyprice_withDiscountAndTax = 537.64
                where sellbilldetailid = 435;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1336, '2026-10-06', 2825, 2725, 2725
                    , 2725, 2688.2, 2688.2, 2688.2
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2725, 2725, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2825, sellCostBuyPrice =sellCostBuyPrice+2725
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2725, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2725
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2688.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2688.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2688.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2725
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2725
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2825, 2725, 2725
                    , 2725, 2688.2, 2688.2, 2688.2
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2725, 2725, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2825, sellCostBuyPrice =sellCostBuyPrice+2725
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2725, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2725
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2688.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2688.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2688.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2725
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2725
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '1336';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1336', '1', '5', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '20', '15', '1', '2026-10-06 21:13:10','0','0'); -- id=2517
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('565','09783', '107', '8', '751', '5.00', '585', '2925', '0', '', '0', '2026-10-06 21:13:10', '751', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','585','2925','0','','0','0.00','0','0','0','0'); -- id=436
UPDATE sellbilldetail SET  lastbuyprice = 565.00 , meanbuyprice = 565.00, lastbuyprice_withDiscount = 565.00, meanbuyprice_withDiscount = 565.00
        , lastbuyprice_withTax = 565, meanbuyprice_withTax = 565, lastbuyprice_withDiscountAndTax = 565
                where sellbilldetailid = 436;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (751, '2026-10-06', 2925, 2825, 2825
                    , 2825, 2825, 2825, 2825
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2825, 2825, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2925, sellCostBuyPrice =sellCostBuyPrice+2825
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2825, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2825
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2825, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2825
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2825
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2825
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2825
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2925, 2825, 2825
                    , 2825, 2825, 2825, 2825
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2825, 2825, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2925, sellCostBuyPrice =sellCostBuyPrice+2825
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2825, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2825
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2825, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2825
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2825
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2825
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2825
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '5', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '751';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('751', '1', '5', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '10', '5', '1', '2026-10-06 21:13:10','0','0'); -- id=2518
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('330','09773', '107', '6', '684', '10.00', '350', '3500', '0', '', '0', '2026-10-06 21:13:10', '684', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','350','3500','0','','0','0.00','0','0','0','0'); -- id=437
UPDATE sellbilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where sellbilldetailid = 437;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (684, '2026-10-06', 3500, 3300, 3300
                    , 3300, 3300, 3300, 3300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 3300, 3300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3300, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3300
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 3500, 3300, 3300
                    , 3300, 3300, 3300, 3300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3300, 3300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3300, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3300
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '54', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '684';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('684', '1', '10', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '64', '54', '1', '2026-10-06 21:13:10','0','0'); -- id=2519
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('330','09518', '107', '6', '677', '5.00', '350', '1750', '0', '', '0', '2026-10-06 21:13:10', '677', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','350','1750','0','','0','0.00','0','0','0','0'); -- id=438
UPDATE sellbilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where sellbilldetailid = 438;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (677, '2026-10-06', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1750, sellCostBuyPrice =sellCostBuyPrice+1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1750, sellCostBuyPrice =sellCostBuyPrice+1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '43', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '677';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('677', '1', '5', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '48', '43', '1', '2026-10-06 21:13:10','0','0'); -- id=2520
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('250','04563', '107', '21', '867', '10.00', '270', '2700', '0', '', '0', '2026-10-06 21:13:10', '867', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','270','2700','0','','0','0.00','0','0','0','0'); -- id=439
UPDATE sellbilldetail SET  lastbuyprice = 250.00 , meanbuyprice = 250.00, lastbuyprice_withDiscount = 250.00, meanbuyprice_withDiscount = 250.00
        , lastbuyprice_withTax = 250, meanbuyprice_withTax = 250, lastbuyprice_withDiscountAndTax = 250
                where sellbilldetailid = 439;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (867, '2026-10-06', 2700, 2500, 2500
                    , 2500, 2500, 2500, 2500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 2500, 2500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2700, sellCostBuyPrice =sellCostBuyPrice+2500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2500
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2700, 2500, 2500
                    , 2500, 2500, 2500, 2500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2500, 2500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2700, sellCostBuyPrice =sellCostBuyPrice+2500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2500
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '174', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '867';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('867', '1', '10', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '184', '174', '1', '2026-10-06 21:13:10','0','0'); -- id=2521
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('480','09810', '107', '19', '845', '5.00', '500', '2500', '0', '', '0', '2026-10-06 21:13:10', '845', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','500','2500','0','','0','0.00','0','0','0','0'); -- id=440
UPDATE sellbilldetail SET  lastbuyprice = 480.00 , meanbuyprice = 480.00, lastbuyprice_withDiscount = 480.00, meanbuyprice_withDiscount = 480.00
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 480, lastbuyprice_withDiscountAndTax = 480
                where sellbilldetailid = 440;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (845, '2026-10-06', 2500, 2400, 2400
                    , 2400, 2400, 2400, 2400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2400, 2400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2500, sellCostBuyPrice =sellCostBuyPrice+2400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2500, 2400, 2400
                    , 2400, 2400, 2400, 2400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2400, 2400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2500, sellCostBuyPrice =sellCostBuyPrice+2400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '27', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '845';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('845', '1', '5', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '32', '27', '1', '2026-10-06 21:13:10','0','0'); -- id=2522
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 7;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('430','07429', '107', '19', '833', '9.00', '450', '4050', '0', '', '0', '2026-10-06 21:13:10', '833', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','7-9,','1','1','0','0','450','4050','0','','0','0.00','0','0','0','0'); -- id=441
UPDATE sellbilldetail SET  lastbuyprice = 430.00 , meanbuyprice = 430.00, lastbuyprice_withDiscount = 430.00, meanbuyprice_withDiscount = 430.00
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 430, lastbuyprice_withDiscountAndTax = 430
                where sellbilldetailid = 441;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (833, '2026-10-06', 4050, 3870, 3870
                    , 3870, 3870, 3870, 3870
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 3870, 3870, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4050, sellCostBuyPrice =sellCostBuyPrice+3870
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3870, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3870
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3870, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3870
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3870
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3870
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3870
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+9
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 4050, 3870, 3870
                    , 3870, 3870, 3870, 3870
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3870, 3870, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4050, sellCostBuyPrice =sellCostBuyPrice+3870
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3870, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3870
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3870, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3870
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3870
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3870
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3870
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '833';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('833', '1', '9', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '39', '30', '1', '2026-10-06 21:13:10','0','0'); -- id=2523
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('315','78068', '107', '19', '834', '5.00', '335', '1675', '0', '', '0', '2026-10-06 21:13:10', '834', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','335','1675','0','','0','0.00','0','0','0','0'); -- id=442
UPDATE sellbilldetail SET  lastbuyprice = 315.00 , meanbuyprice = 315.00, lastbuyprice_withDiscount = 315.00, meanbuyprice_withDiscount = 315.00
        , lastbuyprice_withTax = 315, meanbuyprice_withTax = 315, lastbuyprice_withDiscountAndTax = 315
                where sellbilldetailid = 442;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (834, '2026-10-06', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1675, sellCostBuyPrice =sellCostBuyPrice+1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1575
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1675, sellCostBuyPrice =sellCostBuyPrice+1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1575
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '834';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('834', '1', '5', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '20', '15', '1', '2026-10-06 21:13:10','0','0'); -- id=2524
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('305','08778', '107', '19', '838', '5.00', '325', '1625', '0', '', '0', '2026-10-06 21:13:10', '838', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','325','1625','0','','0','0.00','0','0','0','0'); -- id=443
UPDATE sellbilldetail SET  lastbuyprice = 305.00 , meanbuyprice = 305.00, lastbuyprice_withDiscount = 305.00, meanbuyprice_withDiscount = 305.00
        , lastbuyprice_withTax = 305, meanbuyprice_withTax = 305, lastbuyprice_withDiscountAndTax = 305
                where sellbilldetailid = 443;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (838, '2026-10-06', 1625, 1525, 1525
                    , 1525, 1525, 1525, 1525
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1525, 1525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1625, sellCostBuyPrice =sellCostBuyPrice+1525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1525, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1525, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1525
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1525
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1525
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1625, 1525, 1525
                    , 1525, 1525, 1525, 1525
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1525, 1525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1625, sellCostBuyPrice =sellCostBuyPrice+1525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1525, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1525, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1525
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1525
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1525
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '40', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '838';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('838', '1', '5', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '45', '40', '1', '2026-10-06 21:13:10','0','0'); -- id=2525
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('535','09720', '107', '8', '744', '5.00', '555', '2775', '0', '', '0', '2026-10-06 21:13:10', '744', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','555','2775','0','','0','0.00','0','0','0','0'); -- id=444
UPDATE sellbilldetail SET  lastbuyprice = 535.00 , meanbuyprice = 535.00, lastbuyprice_withDiscount = 535.00, meanbuyprice_withDiscount = 535.00
        , lastbuyprice_withTax = 535, meanbuyprice_withTax = 535, lastbuyprice_withDiscountAndTax = 535
                where sellbilldetailid = 444;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (744, '2026-10-06', 2775, 2675, 2675
                    , 2675, 2675, 2675, 2675
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2675, 2675, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2775, sellCostBuyPrice =sellCostBuyPrice+2675
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2675, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2675
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2675, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2675
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2675
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2675
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2675
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 2775, 2675, 2675
                    , 2675, 2675, 2675, 2675
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2675, 2675, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2775, sellCostBuyPrice =sellCostBuyPrice+2675
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2675, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2675
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2675, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2675
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2675
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2675
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2675
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '744';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('744', '1', '5', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '15', '10', '1', '2026-10-06 21:13:10','0','0'); -- id=2526
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('310','08746', '107', '6', '671', '3.00', '330', '990', '0', '', '0', '2026-10-06 21:13:10', '671', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','330','990','0','','0','0.00','0','0','0','0'); -- id=445
UPDATE sellbilldetail SET  lastbuyprice = 310.00 , meanbuyprice = 310.00, lastbuyprice_withDiscount = 310.00, meanbuyprice_withDiscount = 310.00
        , lastbuyprice_withTax = 310, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 310
                where sellbilldetailid = 445;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (671, '2026-10-06', 990, 930, 930
                    , 930, 930, 930, 930
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 930, 930, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+990, sellCostBuyPrice =sellCostBuyPrice+930
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+930, sellCostMeanBuyPrice = sellCostMeanBuyPrice+930
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+930, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+930
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+930
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+930
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+930
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 990, 930, 930
                    , 930, 930, 930, 930
                    , 0, 0, 0, 0
                    , 0, 0, 0, 930, 930, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+990, sellCostBuyPrice =sellCostBuyPrice+930
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+930, sellCostMeanBuyPrice = sellCostMeanBuyPrice+930
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+930, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+930
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+930
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+930
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+930
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '752', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '671';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('671', '1', '3', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '755', '752', '1', '2026-10-06 21:13:10','0','0'); -- id=2527
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('230','08703', '107', '68', '1233', '5.00', '250', '1250', '0', '', '0', '2026-10-06 21:13:10', '1233', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','250','1250','0','','0','0.00','0','0','0','0'); -- id=446
UPDATE sellbilldetail SET  lastbuyprice = 230.00 , meanbuyprice = 230.00, lastbuyprice_withDiscount = 230.00, meanbuyprice_withDiscount = 230.00
        , lastbuyprice_withTax = 230, meanbuyprice_withTax = 230, lastbuyprice_withDiscountAndTax = 230
                where sellbilldetailid = 446;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1233, '2026-10-06', 1250, 1150, 1150
                    , 1150, 1150, 1150, 1150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1150, 1150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1250, sellCostBuyPrice =sellCostBuyPrice+1150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1150
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-06', 1250, 1150, 1150
                    , 1150, 1150, 1150, 1150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1150, 1150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1250, sellCostBuyPrice =sellCostBuyPrice+1150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1150
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '31', userid = '1', storedetaildate = '2026-10-06 21:13:10' WHERE storedetailid = '1233';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1233', '1', '5', '1', '107', 'اضافة فاتورة مبيعات (معدله)', 'sellbillController.php', '36', '31', '1', '2026-10-06 21:13:10','0','0'); -- id=2528
UPDATE dailyentry SET totalcreditor = '37365.00', totaldebtor = '37365.00', thedate = '2026-10-06', userid = '1', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-06 21:12:20', entryComment = 'اضافة فاتورة مبيعات رقم 106', fromFlag = '1',related='0',isopeningentry='0',operationId='106',operationDetailLink='sellbillController.php?do=showDetail&sellbillid=106' WHERE id = '1205';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '37365.00', '37365.00', '2026-10-06', '1', '0', '1205', '2026-10-06 21:13:10','تم عكس القيد رقم 1205 ','1','0','0','0','0',''); -- id=1208
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1208', '539', '37365.00', '','0'); -- id=1208
UPDATE accountstree SET name = 'علي ايكا - عميل', customName = 'علي ايكا - عميل', customNameEn = 'علي ايكا - عميل', nameEn = 'علي ايكا - عميل', parent = '58', accountNature = '0', theValue = '-37365', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2026-10-01 21:23:06' WHERE id = '539';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1208', '143', '37365.00', '','0'); -- id=1214
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '976335', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
UPDATE dailyentry SET totalcreditor = '37365.00', totaldebtor = '37365.00', thedate = '2026-10-06', userid = '1', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-06 21:12:20', entryComment = 'اضافة فاتورة مبيعات رقم 106 - تحصيل الفاتورة من العميل', fromFlag = '1',related='0',isopeningentry='0',operationId='106',operationDetailLink='sellbillController.php?do=showDetail&sellbillid=106' WHERE id = '1206';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '37365.00', '37365.00', '2026-10-06', '1', '0', '1206', '2026-10-06 21:13:10','تم عكس القيد رقم 1206 ','1','0','0','0','0',''); -- id=1209
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1209', '419', '37365.00', '','0'); -- id=1209
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '334275', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1209', '539', '37365.00', '','0'); -- id=1215
UPDATE accountstree SET name = 'علي ايكا - عميل', customName = 'علي ايكا - عميل', customNameEn = 'علي ايكا - عميل', nameEn = 'علي ايكا - عميل', parent = '58', accountNature = '0', theValue = '0', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2026-10-01 21:23:06' WHERE id = '539';
UPDATE dailyentry SET totalcreditor = '35488.20', totaldebtor = '35488.20', thedate = '2026-10-06', userid = '1', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-06 21:12:20', entryComment = 'اضافة فاتورة مبيعات رقم 106 - صرف البضاعة من المخزن', fromFlag = '1',related='0',isopeningentry='0',operationId='106',operationDetailLink='sellbillController.php?do=showDetail&sellbillid=106' WHERE id = '1207';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '35488.20', '35488.20', '2026-10-06', '1', '0', '1207', '2026-10-06 21:13:10','تم عكس القيد رقم 1207 ','1','0','0','0','0',''); -- id=1210
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1210', '402', '35488.20', '','0'); -- id=1210
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '948399.56', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1210', '382', '35488.20', '','0'); -- id=1216
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16363262.44', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '37365', '37365', '2026-10-06', '1', '0', '0', '2026-10-06 21:13:10','اضافة فاتورة مبيعات رقم 107','1','0',null,'0','107','sellbillController.php?do=showDetail&sellbillid=107'); -- id=1211
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1211', '539', '37365', '','0'); -- id=1217
UPDATE accountstree SET name = 'علي ايكا - عميل', customName = 'علي ايكا - عميل', customNameEn = 'علي ايكا - عميل', nameEn = 'علي ايكا - عميل', parent = '58', accountNature = '0', theValue = '37365', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2026-10-01 21:23:06' WHERE id = '539';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1211', '143', '37365', '','0'); -- id=1211
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1013700', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '35488.2', '35488.2', '2026-10-06', '1', '0', '0', '2026-10-06 21:13:10','اضافة فاتورة مبيعات رقم 107 - صرف البضاعة من المخزن','1','0',null,'0','107','sellbillController.php?do=showDetail&sellbillid=107'); -- id=1212
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1212', '402', '35488.2', '','0'); -- id=1218
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '983887.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1212', '382', '35488.2', '','0'); -- id=1212
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16327774.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1211,0,1212' where sellbillid=107;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-06', 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,35525, 35525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+37365, sellCostBuyPrice =sellCostBuyPrice+35525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+35525, sellCostMeanBuyPrice = sellCostMeanBuyPrice+35525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+35488.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+35488.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+35488.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+35525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+35525
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (41, '2026-10-06', 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,35525, 35525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+37365, sellCostBuyPrice =sellCostBuyPrice+35525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+35525, sellCostMeanBuyPrice = sellCostMeanBuyPrice+35525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+35488.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+35488.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+35488.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+35525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+35525
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2, 35525, 35525)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+37365, netSellCostBuyPrice = netSellCostBuyPrice+35525
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+35525
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+35525
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+35488.2
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+35488.2
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+35488.2
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+35525
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+35525;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill update end - new add end - with oldid = 106 and newid=107 and controlname = sellbillController
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:43:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:13:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:13:10', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=editprint&id=107'); -- id=3641
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:43:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:13:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientDeficitController.php', '2026-10-06 21:13:31', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientDeficitController.php'); -- id=3642
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:44:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:14:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientDeficitController.php', '2026-10-06 21:14:05', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientDeficitController.php?do=add'); -- id=3643

-- ----------------------------------------------------------------------------------------------------
-- clientDeficitController add - with clientid =41
-- ----------------------------------------------------------------------------------------------------

BEGIN;
CALL clientInUse(41,@clientdebt,@clientname,@treeIdis);
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('41','135310.90','11700','0','تسوية عجز عميل بالزيادة','-1', '147010.9', '2026-10-06 21:14:05', '1', 'clientDeficitController.php', 'فاتورة صيفي من السيتم القديم', '11700', '0', null, '0', null, null,'', '0','1','1','11700','1','','0','0','',''); -- id=196
UPDATE client SET  clientdebt = '147010.9' , clientdate = '2026-10-06', userid = '1' WHERE clientid = '41';
UPDATE client SET  inUse = 0 where clientid = 41;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '11700', '11700', '2026-10-06', '1', '0', '0', '2026-10-06 21:14:05','تم اضافة معالجة عجز للعميل علي ايكا - عميل(تسوية بالاضافة)','1','0','0','0','0',''); -- id=1213
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1213', '539', '11700', '','0'); -- id=1219
UPDATE accountstree SET name = 'علي ايكا - عميل', customName = 'علي ايكا - عميل', customNameEn = 'علي ايكا - عميل', nameEn = 'علي ايكا - عميل', parent = '58', accountNature = '0', theValue = '49065', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2026-10-01 21:23:06' WHERE id = '539';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1213', '146', '11700', '','0'); -- id=1213
UPDATE accountstree SET name = 'ايرادات الخصم المكتسب', customName = 'ايرادات الخصم المكتسب', customNameEn = 'Acquired Discount Revenues', nameEn = 'Acquired Discount Revenues', parent = '147', accountNature = '1', theValue = '5307138', theOrder = '0', layingOrder = '4203', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Other Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:41' WHERE id = '146';
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- clientDeficitController add end- with clientid =41 ,id=196
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:44:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:14:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientDeficitController.php', '2026-10-06 21:14:05', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientDeficitController.php?do=sucess'); -- id=3644
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:44:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:14:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientDeficitController.php', '2026-10-06 21:14:07', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientDeficitController.php?do=show'); -- id=3645
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:44:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:14:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:14:23', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=show'); -- id=3646
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:44:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:14:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-06 21:14:41', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=show'); -- id=3647
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:52:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:22:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientDeficitController.php', '2026-10-06 21:22:16', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientDeficitController.php'); -- id=3648
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:52:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:22:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientDeficitController.php', '2026-10-06 21:22:54', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientDeficitController.php?do=add'); -- id=3649

-- ----------------------------------------------------------------------------------------------------
-- clientDeficitController add - with clientid =6
-- ----------------------------------------------------------------------------------------------------

BEGIN;
CALL clientInUse(6,@clientdebt,@clientname,@treeIdis);
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('6','770338.00','126735','0','تسوية عجز عميل بالزيادة','-1', '897073', '2026-10-06 21:22:54', '1', 'clientDeficitController.php', 'فاتورة صيفي', '126735', '0', null, '0', null, null,'', '0','1','1','126735','1','','0','0','',''); -- id=197
UPDATE client SET  clientdebt = '897073' , clientdate = '2026-10-06', userid = '1' WHERE clientid = '6';
UPDATE client SET  inUse = 0 where clientid = 6;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '126735', '126735', '2026-10-06', '1', '0', '0', '2026-10-06 21:22:54','تم اضافة معالجة عجز للعميل محل الشاذلي بني سويف(تسوية بالاضافة)','1','0','0','0','0',''); -- id=1214
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1214', '498', '126735', '','0'); -- id=1220
UPDATE accountstree SET name = 'محل الشاذلي بني سويف', customName = 'محل الشاذلي بني سويف', customNameEn = 'بني سويف', nameEn = 'بني سويف', parent = '58', accountNature = '0', theValue = '897073', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-30 20:39:57' WHERE id = '498';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1214', '146', '126735', '','0'); -- id=1214
UPDATE accountstree SET name = 'ايرادات الخصم المكتسب', customName = 'ايرادات الخصم المكتسب', customNameEn = 'Acquired Discount Revenues', nameEn = 'Acquired Discount Revenues', parent = '147', accountNature = '1', theValue = '5433873', theOrder = '0', layingOrder = '4203', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Other Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:41' WHERE id = '146';
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- clientDeficitController add end- with clientid =6 ,id=197
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:52:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:22:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientDeficitController.php', '2026-10-06 21:22:54', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientDeficitController.php?do=sucess'); -- id=3650
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:52:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:22:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientDeficitController.php', '2026-10-06 21:22:56', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientDeficitController.php?do=show'); -- id=3651
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:59:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:29:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnsellbillController.php', '2026-10-06 21:29:40', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnsellbillController.php?do=show'); -- id=3652
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-06 17:59:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-06 21:29:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnsellbillController.php', '2026-10-06 21:29:43', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnsellbillController.php?do=show'); -- id=3653
