UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 22:47:00";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 10:56:46";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 10:59: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 programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 10:59:22";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:29:22", deviceType = "MOBILE" WHERE userid = -1;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 10:59:22";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 14:29:23", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 10:59:26";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:29:26", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:00: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 programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:00:15";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:30:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 14:30:15', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=214
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 11:00:15";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 14:30:15', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=215
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:00:29";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:30:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 14:30:29', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=216
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:00:51";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:30:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:30:51', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=217
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:00:55";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:30:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:30:55', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=edit&id=3'); -- id=218
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:01:01";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:31:01", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:01:11";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:31:11", deviceType = "MOBILE" WHERE userid = -1;
BEGIN;
INSERT INTO save (savename, savecurrentvalue, savedetails, savedate, conditions, userid, currencyId, sortby,treeId,saveTreeParentType,webApiId,savetypeid) VALUES ('فودافون كاش', '', '', '2026-10-08 14:31:11', '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-08 14:31:11', '-1',  'saveController.php','0','','0'); -- id=5
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-08 14:31:11'); -- id=429
UPDATE save SET savename = 'فودافون كاش', savecurrentvalue = '', savedetails = '', savedate = '2026-10-08 14:31:11', conditions = '0', userid = '-1', sortby= '0',treeId='429',saveTreeParentType='0',savetypeid='0' WHERE saveid = '4';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:01:11";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:31:11", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:01:13";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:31:13", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:01:17";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:31:17", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:01:20";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:31:20", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:02:01";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:32:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 14:32:01', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=219
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:02:03";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:32:03", deviceType = "MOBILE" WHERE userid = -1;
UPDATE billname SET name = 'فاتورة مبيعات', userid = '-1', conditions = '0', billnamedate = '2026-10-08', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '0',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '1' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '0' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '1' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '0' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '1' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '0' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:02:04";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:32:04", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:02:06";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:32:06", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:02:06";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:32:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:32:06', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=220
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:02:08";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:32:08", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:02:09";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:32:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:32:09', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=edit&id=3'); -- id=221
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:02:22";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:32:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:32:22', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=222
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-10-08', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '0',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '0' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '0' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '1' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '0' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '1' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '0' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:02:22";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:32:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:32:22', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=223
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:02:24";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:32:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:32:24', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=224
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:02:25";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:32:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 14:32:25', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=225
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:03:05";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:33:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:33:05', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=226
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:03:07";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:33:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:33:07', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=edit&id=3'); -- id=227
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:03:30";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:33:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:33:30', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=228
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-10-08', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '1',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '0' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '0' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '1' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '1' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '1' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '0' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:03:31";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:33:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:33:31', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=229
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:03:32";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:33:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:33:32', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=230
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:03:32";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:33:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 14:33:32', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=231
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:05:18";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:35:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 14:35:18', '1', 'addAndRetuen', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=232

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac77f8cb6bfe
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbillandrutern (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, sellbillprice, returnsellbillprice, tempclientName,sellQuantity, returnsellQuantity, tax, carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,delbyuserid,billReservation,billReservationDate,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,autoSaveFlag,obgyBillType,billoperationid,pricetype,currencyId,totalprodiscount,sellbillno,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue) VALUES ('2026-10-08 14:35:18', '06ac77f8cb6bfe', '1', '0.00', '0', '0', '1', '50.00', '50', '50', '0', '1', '2026-10-08 14:35:18', '', '1', '0', 'نقدي', '1', '0', '3', '5', '700', '650', 'نقدي', '1', '1', '0', '', '', '','','-1','0','0','0','','1','50','0','0','0','0','0','0','0','0','-1','0','1','0','','0','0','0','0','0','0'); -- id=1
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','0','اضافة فاتورة مبيعات ومردودات','1', '0', '2026-10-08 14:35:18', '1', 'sellbillandruternController.php', 'اضافة فاتورة مبيعات ومردودات', '50', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-08 14:35:18','0','0','',''); -- id=3
INSERT INTO sellandruternbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, selltype, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,pricetypepro,buyPricesHistoryBookIdQuantity,proHeight,proWidth,soldSerialsInDetails,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,categorydiscount,lastbuyprice_withDiscountAndTax) VALUES ('500','00003', '1', '2', '3', '1', '700', '700', '0', '', '0', '2026-10-08 14:35:18', '0', '3', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','','1','1','','0','0','700','700','0','','','0'); -- id=1
UPDATE sellandruternbilldetail SET  lastbuyprice = 500.00 , meanbuyprice = 500.00, lastbuyprice_withDiscount = 500.00, meanbuyprice_withDiscount = 500.00
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where sellbilldetailid = 1;
 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 (3, '2026-10-08', 700, 500, 500
                    , 500, 500, 500, 500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 500, 500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+700, sellCostBuyPrice =sellCostBuyPrice+500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+500
                        , 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 (1, '2026-10-08', 700, 500, 500
                    , 500, 500, 500, 500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 500, 500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+700, sellCostBuyPrice =sellCostBuyPrice+500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+500
                        , 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 = '9', userid = '1', storedetaildate = '2026-10-08 14:35:18' WHERE storedetailid = '3';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('3', '1', '1', '1', '1', 'فاتوره مبيعات ومردودات', 'sellbillandruternController.php', '10', '9', '1', '2026-10-08 14:35:18','0','0'); -- id=68
INSERT INTO sellandruternbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, selltype, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,pricetypepro,buyPricesHistoryBookIdQuantity,proHeight,proWidth,soldSerialsInDetails,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,categorydiscount,lastbuyprice_withDiscountAndTax) VALUES ('500.00','00004', '1', '2', '4', '1', '650', '650', '0', '', '0', '2026-10-08 14:35:18', '1', '4', '0.00', '-1', '1','0','','','0','0','0','0','0','0','','1','1','','0','0','650','650','0','','','0'); -- id=2
UPDATE sellandruternbilldetail SET  lastbuyprice = 500.00 , meanbuyprice = 500.00, lastbuyprice_withDiscount = 500.00, meanbuyprice_withDiscount = 500.00
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where sellbilldetailid = 2;
 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 (4, '2026-10-08', 0, 0, 0
                    , 0, 0, 0, 0
                    , 650, 500, 500, 500
                    , 500, 500, 500, 0, 1, 0, 0, 500, 500)
                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+650, returnSellCostBuyPrice = returnSellCostBuyPrice+500, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+500
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+500, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+500
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+500
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+500
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+500
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+500
                        , netQuantity = netQuantity+0
                        , netQuantityRet = netQuantityRet+1;
 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-08', 0, 0, 0
                    , 0, 0, 0, 0
                    , 650, 500, 500, 500
                    , 500, 500, 500, 0, 0, 500, 500)
                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+650, returnSellCostBuyPrice = returnSellCostBuyPrice+500, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+500
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+500, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+500
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+500
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+500
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+500
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+500;
UPDATE storedetail SET  productquantity = '9', userid = '1', storedetaildate = '2026-10-08 14:35:18' WHERE storedetailid = '4';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('4', '1', '1', '0', '1', 'اضافة فاتورة مردودات مبيعات', 'sellbillandruternController.php', '8', '9', '1', '2026-10-08 14:35:18','0','0'); -- id=69
CALL saveInUse(1,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '750',  userid = '1' WHERE saveid = '1';
UPDATE save SET  inUse = 0 where saveid = 1;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('700','50', '0', '1', 'اضافة فاتورة مبيعات ومردودات', '1', '750', '2026-10-08 14:35:18', '1',  'sellbillandruternController.php','1','','0'); -- id=6
UPDATE client SET  delegateid = 5 where clientid = 1;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '50', '50', '2026-10-08', '1', '0', '0', '2026-10-08 14:35:18','اضافة فاتورة مبيعات و مردود رقم 1','1','0',null,'0','1','sellbillandruternController.php?do=showDetail&sellbillid=1'); -- id=18
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('18', '143', '50', '','0'); -- id=18
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '4050', 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 ('18', '383', '50', '','0'); -- id=18
UPDATE accountstree SET name = 'الخزنة الرئيسية', customName = 'الخزنة الرئيسية', customNameEn = 'الخزنة الرئيسية', nameEn = 'الخزنة الرئيسية', parent = '40', accountNature = '0', theValue = '650', 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';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1000', '1000', '2026-10-08', '1', '0', '0', '2026-10-08 14:35:18','اضافة فاتورة مبيعات و مردود رقم 1 - صرف البضاعة من المخزن','1','0',null,'0','1','sellbillandruternController.php?do=showDetail&sellbillid=1'); -- id=19
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('19', '382', '1000', '','0'); -- id=19
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14600', 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 ('19', '402', '1000', '','0'); -- id=19
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '2150', 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 sellbillandrutern set dailyentryid='18,0,19' where sellbillid=1;
 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-08', 700, 500, 500
                    , 500, 500, 500, 500
                    , 650, 500, 500, 500
                    , 500, 500, 500 ,500, 500, 500, 500)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+700, sellCostBuyPrice =sellCostBuyPrice+500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+500
                        , returnSellVal = returnSellVal+650, returnSellCostBuyPrice = returnSellCostBuyPrice+500, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+500
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+500, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+500
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+500
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+500
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+500
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+500;
 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-08', 700, 500, 500
                    , 500, 500, 500, 500
                    , 650, 500, 500, 500
                    , 500, 500, 500 ,500, 500, 500, 500)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+700, sellCostBuyPrice =sellCostBuyPrice+500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+500
                        , returnSellVal = returnSellVal+650, returnSellCostBuyPrice = returnSellCostBuyPrice+500, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+500
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+500, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+500
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+500
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+500
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+500
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+500;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 50, 0, 0
                    , 0, 0, 0, 0, 0, 0)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+50, netSellCostBuyPrice = netSellCostBuyPrice+0
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+0
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+0
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+0
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+0
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+0
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+0
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+0;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac77f8cb6bfe and sellbillId = 1 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:05:18";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:35:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 14:35:18', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=233
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:05:26";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:35:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-08 14:35:26', '1', 'o.royalgt4.com:443/erp/controllers/supplierPayedDeptController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/supplierPayedDeptController.php'); -- id=234
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:05:26";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:35:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 14:35:26', '1', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=235
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:05:48";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:35:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 14:35:48', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php?do=show'); -- id=236
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:06:02";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:36:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 14:36:02', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=237
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-08 14:36:54', '1', '0','','0','','-10','0','10000',',','-1','0','.','0','0','.','2026-10-08','0','0','','0','0','0','','','0','0','','','','','','','','','','-1','','','','0','','','0','0',''); -- id=2
INSERT INTO tamweenclientdetail (clientid, noOfPersonsTamween, noOfPersonsDa3m, cardNum, cardPassword) VALUES ('2', '0', '0', '', ''); -- id=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 ('2','0','0','0','إضافة عميل جديد','2', '0', '2026-10-08 14:36:54', '1', 'clientController.php', '', '0', '0', null, '0', null, null,'', '0','1','1','0','1','','0','0','',''); -- id=4
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-08 14:36:54'); -- id=430
UPDATE client SET clientname = 'عماد', clientaddress = '', clientphone = '', clientmobile = '', clientdebt = '0.00', clientdetails = '', conditions = '0', clientdate = '2026-10-08', 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='430',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 = '2';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:07:18";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:37:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 14:37:18', '1', 'addAndRetuen', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=238

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac780224a146
-- ----------------------------------------------------------------------------------------------------

BEGIN;
CALL clientInUse(2,@clientdebt,@clientname,@treeIdis);
INSERT INTO sellbillandrutern (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, sellbillprice, returnsellbillprice, tempclientName,sellQuantity, returnsellQuantity, tax, carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,delbyuserid,billReservation,billReservationDate,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,autoSaveFlag,obgyBillType,billoperationid,pricetype,currencyId,totalprodiscount,sellbillno,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue) VALUES ('2026-10-08 14:37:18', '06ac780224a146', '2', '0.00', '0', '0', '1', '-50.00', '-50', '50', '0', '1', '2026-10-08 14:37:18', '', '1', '0', 'عماد', '1', '1', '3', '5', '650', '700', 'عماد', '1', '1', '0', '', '', '','','-1','0','0','0','','1','50','0','0','0','0','0','0','0','0','-1','0','1','0','','0','0','0','0','0','0'); -- id=2
UPDATE client SET  clientdebt = '0', userid = '1' WHERE clientid = '2';
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 ('2','0.00','-0','1','اضافة فاتورة مبيعات ومردودات','2', '0', '2026-10-08 14:37:18', '1', 'sellbillandruternController.php', 'اضافة فاتورة مبيعات ومردودات', '50', '0', null, '0', null, null,'', '0','1','1','-0','1','2026-10-08 14:37:18','0','0','',''); -- id=5
UPDATE client SET  inUse = 0 where clientid = 2;
INSERT INTO sellandruternbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, selltype, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,pricetypepro,buyPricesHistoryBookIdQuantity,proHeight,proWidth,soldSerialsInDetails,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,categorydiscount,lastbuyprice_withDiscountAndTax) VALUES ('500','00004', '2', '2', '4', '1', '650', '650', '0', '', '0', '2026-10-08 14:37:18', '0', '4', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','','1','1','','0','0','650','650','0','','','0'); -- id=3
UPDATE sellandruternbilldetail SET  lastbuyprice = 500.00 , meanbuyprice = 500.00, lastbuyprice_withDiscount = 500.00, meanbuyprice_withDiscount = 500.00
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where sellbilldetailid = 3;
 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 (4, '2026-10-08', 650, 500, 500
                    , 500, 500, 500, 500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 500, 500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+650, sellCostBuyPrice =sellCostBuyPrice+500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+500
                        , 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 (1, '2026-10-08', 650, 500, 500
                    , 500, 500, 500, 500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 500, 500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+650, sellCostBuyPrice =sellCostBuyPrice+500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+500
                        , 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 = '1', storedetaildate = '2026-10-08 14:37:18' WHERE storedetailid = '4';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('4', '1', '1', '1', '2', 'فاتوره مبيعات ومردودات', 'sellbillandruternController.php', '9', '8', '1', '2026-10-08 14:37:18','0','0'); -- id=70
INSERT INTO sellandruternbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, selltype, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,pricetypepro,buyPricesHistoryBookIdQuantity,proHeight,proWidth,soldSerialsInDetails,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,categorydiscount,lastbuyprice_withDiscountAndTax) VALUES ('500.00','00003', '2', '2', '3', '1', '700', '700', '0', '', '0', '2026-10-08 14:37:18', '1', '3', '0.00', '-1', '1','0','','','0','0','0','0','0','0','','1','1','','0','0','700','700','0','','','0'); -- id=4
UPDATE sellandruternbilldetail SET  lastbuyprice = 500.00 , meanbuyprice = 500.00, lastbuyprice_withDiscount = 500.00, meanbuyprice_withDiscount = 500.00
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where sellbilldetailid = 4;
 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 (3, '2026-10-08', 0, 0, 0
                    , 0, 0, 0, 0
                    , 700, 500, 500, 500
                    , 500, 500, 500, 0, 1, 0, 0, 500, 500)
                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+700, returnSellCostBuyPrice = returnSellCostBuyPrice+500, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+500
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+500, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+500
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+500
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+500
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+500
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+500
                        , netQuantity = netQuantity+0
                        , netQuantityRet = netQuantityRet+1;
 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-08', 0, 0, 0
                    , 0, 0, 0, 0
                    , 700, 500, 500, 500
                    , 500, 500, 500, 0, 0, 500, 500)
                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+700, returnSellCostBuyPrice = returnSellCostBuyPrice+500, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+500
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+500, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+500
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+500
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+500
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+500
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+500;
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-08 14:37:18' WHERE storedetailid = '3';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('3', '1', '1', '0', '2', 'اضافة فاتورة مردودات مبيعات', 'sellbillandruternController.php', '9', '10', '1', '2026-10-08 14:37:18','0','0'); -- id=71
CALL saveInUse(1,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '700',  userid = '1' WHERE saveid = '1';
UPDATE save SET  inUse = 0 where saveid = 1;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('750','50', '1', '1', 'اضافة فاتورة مبيعات ومردودات', '2', '700', '2026-10-08 14:37:18', '1',  'sellbillandruternController.php','2','','0'); -- id=7
UPDATE client SET  delegateid = 5 where clientid = 2;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '50', '50', '2026-10-08', '1', '0', '0', '2026-10-08 14:37:18','اضافة فاتورة مبيعات و مردود رقم 2','1','0',null,'0','2','sellbillandruternController.php?do=showDetail&sellbillid=2'); -- id=20
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('20', '143', '50', '','0'); -- id=20
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '4000', 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 ('20', '430', '50', '','0'); -- id=20
UPDATE accountstree SET name = 'عماد', customName = 'عماد', customNameEn = 'عماد', nameEn = 'عماد', parent = '58', accountNature = '0', theValue = '-50', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:36:54' WHERE id = '430';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '50', '50', '2026-10-08', '1', '0', '0', '2026-10-08 14:37:18','اضافة فاتورة مبيعات و مردود رقم 2 - تحصيل الفاتورة من العميل','1','0',null,'0','2','sellbillandruternController.php?do=showDetail&sellbillid=2'); -- id=21
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('21', '430', '50', '','0'); -- id=21
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 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:36:54' WHERE id = '430';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('21', '383', '50', '','0'); -- id=21
UPDATE accountstree SET name = 'الخزنة الرئيسية', customName = 'الخزنة الرئيسية', customNameEn = 'الخزنة الرئيسية', nameEn = 'الخزنة الرئيسية', parent = '40', accountNature = '0', theValue = '600', 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';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1000', '1000', '2026-10-08', '1', '0', '0', '2026-10-08 14:37:18','اضافة فاتورة مبيعات و مردود رقم 2 - صرف البضاعة من المخزن','1','0',null,'0','2','sellbillandruternController.php?do=showDetail&sellbillid=2'); -- id=22
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('22', '382', '1000', '','0'); -- id=22
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15600', 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 ('22', '402', '1000', '','0'); -- id=22
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1150', 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 sellbillandrutern set dailyentryid='20,21,22' where sellbillid=2;
 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-08', 650, 500, 500
                    , 500, 500, 500, 500
                    , 700, 500, 500, 500
                    , 500, 500, 500 ,500, 500, 500, 500)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+650, sellCostBuyPrice =sellCostBuyPrice+500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+500
                        , returnSellVal = returnSellVal+700, returnSellCostBuyPrice = returnSellCostBuyPrice+500, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+500
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+500, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+500
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+500
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+500
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+500
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+500;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-08', 650, 500, 500
                    , 500, 500, 500, 500
                    , 700, 500, 500, 500
                    , 500, 500, 500 ,500, 500, 500, 500)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+650, sellCostBuyPrice =sellCostBuyPrice+500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+500
                        , returnSellVal = returnSellVal+700, returnSellCostBuyPrice = returnSellCostBuyPrice+500, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+500
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+500, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+500
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+500
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+500
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+500
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+500;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, -50, 0, 0
                    , 0, 0, 0, 0, 0, 0)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+-50, netSellCostBuyPrice = netSellCostBuyPrice+0
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+0
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+0
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+0
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+0
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+0
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+0
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+0;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac780224a146 and sellbillId = 2 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:07:19";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:37:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 14:37:19', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=239
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:07:25";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:37:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 14:37:25', '1', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=240
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:08:21";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:38:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 14:38:21', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=241
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:08:58";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:38:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 14:38:58', '1', 'add', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=add'); -- id=242
BEGIN;
CALL insertUniqueOptNum(8,2,1,5,4,'2026-10-08',1,0, '' , '' ,0,0,0,0,0,'2026-10-08 14:38:58',0,'',0,'','hide',0,@id,@optnum);
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '11';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 5, 0, 0
                    , 1150.00, 4, 0, 0, 1, '2026-10-08 14:38:58')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-4, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-08 14:38:58' ; -- id=8
UPDATE storemovement SET  buyPricesHistoryBookData = "4*2026-10-07*1150.00," WHERE transferproductid = 22;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '2', '4', '1', '22', 'تحويل منتجات من المخزن', 'storemovementController.php', '14', '10', '1', '2026-10-08','0','0'); -- id=72
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '5';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 5, 0, 0
                    , 1150.00, 4, 0, 0, 1, '2026-10-08 14:38:58')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 14:38:58' ; -- id=1
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '4', '0', '22', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '-4', '0', '1', '2026-10-08','0','0'); -- id=73
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('2', '1', '6', '5', '2026-10-08', '1', '0','8','0','0','2026-10-08 14:38:58','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=23
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '12';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 6, 0, 0
                    , 1250.00, 5, 0, 0, 1, '2026-10-08 14:38:58')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-5, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-08 14:38:58' ; -- id=10
UPDATE storemovement SET  buyPricesHistoryBookData = "5*2026-10-07*1250.00," WHERE transferproductid = 23;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '2', '5', '1', '23', 'تحويل منتجات من المخزن', 'storemovementController.php', '9', '4', '1', '2026-10-08','0','0'); -- id=74
UPDATE storedetail SET  productquantity = '5', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '6';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 6, 0, 0
                    , 1250.00, 5, 0, 0, 1, '2026-10-08 14:38:58')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+5, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 14:38:58' ; -- id=2
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '1', '5', '0', '23', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '5', '1', '2026-10-08','0','0'); -- id=75
UPDATE storedetail SET inUse = 0 WHERE storedetailid=11;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=5;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=12;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=6;
COMMIT;
BEGIN;
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '10850', '10850', '2026-10-08', '1', '0', '0', '2026-10-08 14:38:58','تحويل من مخزن مخزن المتاجر الى مخزن المخزن الرئيسي','1','0',null,'0','8','storemovementController.php?do=show&operationnum=8'); -- id=23
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('23', '382', '10850', '','0'); -- id=23
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '26450', 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 ('23', '421', '10850', '','0'); -- id=23
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '60100', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 13:19:12' WHERE id = '421';
COMMIT;
COMMIT;
UPDATE storemovement SET  dailyentryid =23 WHERE operationnum = 8;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:08:59";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:38:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 14:38:59', '1', 'editshow', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=editshow&operationnum=8'); -- id=243
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:09:01";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 14:39:01", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:09:09";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:39:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 14:39:09', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=244
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:09:46";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:39:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 14:39:46', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=245
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:09:57";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:39:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('gt4setting.php', '2026-10-08 14:39:57', '1', 'o.royalgt4.com:443/erp/controllers/gt4setting.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/gt4setting.php'); -- id=246
UPDATE user SET loginip = "" WHERE userid = 1;
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 = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:10:08";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:40:08", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 11:10:08";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 14:40:08", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:10:52";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:40:52", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:11:07";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:41:07", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:11:08";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:41:08", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:11:10";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:41:10", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:11:12";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:41:12", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:11:28";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:41:28", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:11:59";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:41:59", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:12:32";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:42:32", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:12:46";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:42:46", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:12:51";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:42:51", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:12:57";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:42:57", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:13:06";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:43:06", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:13:38";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:43:38", deviceType = "DESKTOP" WHERE userid = -1;
BEGIN;
INSERT INTO save (savename, savecurrentvalue, savedetails, savedate, conditions, userid, currencyId, sortby,treeId,saveTreeParentType,webApiId,savetypeid) VALUES ('الحزنة الرئيسية', '0', '', '2026-10-08 14:43:38', '0', '-1', '1', '0','0','0','0','0'); -- id=1
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('0','', '0', '1', 'تم اضافة  خزنة باسم   [ الحزنة الرئيسية ] ', '1', '', '2026-10-08 14:43:38', '-1',  'saveController.php','0','','0'); -- id=1
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', '', '0', '0', '', '0', '3', '1', '', '-1', '0', '2026-10-08 14:43:38'); -- id=1
UPDATE save SET savename = 'الحزنة الرئيسية', savecurrentvalue = '0', savedetails = '', savedate = '2026-10-08 14:43:38', conditions = '0', userid = '-1', sortby= '0',treeId='1',saveTreeParentType='0',savetypeid='0' WHERE saveid = '1';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:13:38";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:43:38", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:13:39";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:43:39", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:13:47";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:43:47", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:13:54";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:43:54", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:14:05";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:44:05", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:14:24";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:44:24", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 08:19:43";
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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` = 'D', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2024-02-13',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
update user set blockedByLimits = 0;
INSERT INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder) VALUES (1, 511, 1,0),(1, 512, 0,0),(1, 513, 0,0),(1, 514, 0,0),(1, 515, 0,0),(1, 516, 0,0),(1, 517, 0,0),(1, 518, 0,0),(1, 519, 0,0),(1, 520, 0,0),(1, 521, 0,0),(1, 522, 1,0),(1, 523, 0,0),(1, 524, 0,0),(1, 525, 0,0),(1, 526, 0,0),(1, 527, 1,0),(1, 528, 1,0),(1, 529, 1,0),(1, 530, 0,0),(1, 531, 0,0),(1, 532, 0,0),(1, 533, 0,0),(1, 534, 1,0),(1, 535, 1,0),(1, 536, 1,0),(1, 537, 1,0),(1, 538, 1,0),(1, 539, 1,0),(1, 540, 0,0),(1, 541, 0,0),(1, 542, 0,0),(1, 543, 1,0),(1, 544, 0,0),(1, 545, 0,0),(1, 546, 0,0),(1, 547, 0,0),(1, 548, 0,0),(1, 549, 1,0),(1, 550, 0,0),(1, 551, 0,0),(1, 552, 0,0),(1, 553, 0,0),(1, 554, 0,0),(1, 555, 0,0),(1, 556, 0,0),(1, 557, 0,0),(1, 558, 0,0),(1, 559, 0,0),(1, 560, 0,0),(1, 561, 0,0),(1, 562, 0,0),(1, 563, 0,0),(1, 564, 0,0),(1, 565, 0,0),(1, 566, 0,0),(1, 567, 0,0),(1, 568, 0,0),(1, 569, 0,0),(1, 570, 1,0),(1, 571, 1,0),(1, 572, 1,0),(1, 573, 1,0),(1, 574, 1,0),(1, 575, 1,0),(1, 576, 1,0),(1, 577, 1,0),(1, 578, 1,0),(1, 579, 0,0),(1, 580, 0,0),(1, 581, 0,0),(1, 582, 0,0),(1, 583, 0,0),(1, 584, 0,0),(1, 585, 1,0),(1, 586, 1,0),(1, 587, 0,0),(1, 588, 1,0),(1, 589, 1,0),(1, 590, 1,0),(1, 591, 1,0),(1, 592, 1,0),(1, 593, 1,0),(1, 594, 1,0),(1, 595, 0,0),(1, 596, 0,0),(1, 597, 0,0),(1, 598, 0,0),(1, 599, 0,0),(1, 600, 0,0),(1, 601, 0,0),(1, 602, 0,0),(1, 603, 1,0),(1, 604, 1,0),(1, 605, 1,0),(1, 606, 1,0),(1, 607, 1,0),(1, 608, 1,0),(1, 609, 1,0),(1, 610, 1,0),(1, 611, 0,0),(1, 612, 1,0),(1, 613, 1,0),(1, 614, 1,0),(1, 615, 1,0),(1, 616, 0,0),(1, 617, 0,0),(1, 618, 0,0),(1, 619, 1,0),(1, 620, 1,0),(1, 621, 1,0),(1, 622, 1,0),(1, 623, 1,0),(1, 624, 1,0),(1, 625, 0,0),(1, 626, 0,0),(1, 627, 1,0),(1, 628, 1,0),(1, 629, 1,0),(1, 630, 0,0),(1, 631, 1,0),(1, 632, 0,0),(1, 633, 0,0),(1, 634, 0,0),(1, 635, 0,0),(1, 636, 1,0),(1, 637, 1,0),(1, 638, 1,0),(1, 639, 1,0),(1, 640, 0,0),(1, 641, 1,0),(1, 642, 1,0),(1, 643, 1,0),(1, 644, 1,0),(1, 645, 1,0),(1, 646, 1,0),(1, 647, 1,0),(1, 648, 1,0),(1, 649, 1,0),(1, 650, 1,0),(1, 651, 1,0),(1, 652, 1,0),(1, 653, 1,0),(1, 654, 1,0),(1, 655, 1,0),(1, 656, 1,0),(1, 657, 1,0),(1, 658, 1,0),(1, 659, 1,0),(1, 660, 1,0),(1, 661, 1,0),(1, 662, 1,0),(1, 663, 1,0),(1, 664, 1,0),(1, 665, 1,0),(1, 666, 1,0),(1, 667, 1,0),(1, 668, 1,0),(1, 669, 1,0),(1, 670, 1,0),(1, 671, 1,0),(1, 672, 1,0),(1, 673, 1,0),(1, 674, 1,0),(1, 675, 1,0),(1, 676, 1,0),(1, 677, 1,0),(1, 678, 1,0),(1, 679, 1,0),(1, 680, 1,0),(1, 681, 1,0),(1, 682, 1,0),(1, 683, 1,0),(1, 684, 1,0),(1, 685, 1,0),(1, 686, 1,0),(1, 687, 1,0),(1, 688, 1,0),(1, 689, 1,0),(1, 690, 1,0),(1, 691, 1,0),(1, 692, 1,0),(1, 693, 1,0),(1, 694, 1,0),(1, 695, 1,0),(1, 696, 1,0),(1, 697, 1,0),(1, 698, 1,0),(1, 699, 1,0),(1, 700, 1,0),(1, 701, 1,0),(1, 702, 1,0),(1, 703, 1,0),(1, 704, 1,0),(1, 705, 1,0),(1, 706, 1,0),(1, 707, 1,0),(1, 708, 1,0),(1, 709, 1,0),(1, 710, 1,0),(1, 711, 1,0),(1, 712, 1,0),(1, 713, 1,0),(1, 714, 1,0),(1, 715, 1,0),(1, 716, 1,0),(1, 717, 1,0),(1, 718, 1,0),(1, 719, 1,0),(1, 720, 1,0),(1, 721, 1,0),(1, 722, 1,0),(1, 723, 1,0),(1, 724, 1,0),(1, 725, 1,0),(1, 726, 1,0),(1, 727, 1,0),(1, 728, 1,0),(1, 729, 1,0),(1, 730, 1,0),(1, 731, 1,0),(1, 732, 1,0),(1, 733, 1,0),(1, 734, 1,0),(1, 735, 1,0),(1, 736, 1,0),(1, 737, 1,0),(1, 738, 1,0),(1, 739, 1,0),(1, 740, 1,0),(1, 741, 1,0),(1, 742, 1,0),(1, 743, 1,0),(1, 744, 1,0),(1, 745, 1,0),(1, 746, 1,0),(1, 747, 1,0),(1, 748, 1,0),(1, 749, 1,0),(1, 750, 1,0),(1, 751, 1,0),(1, 752, 1,0),(1, 753, 1,0),(1, 754, 1,0),(1, 755, 1,0),(1, 756, 1,0),(1, 757, 1,0),(1, 758, 1,0),(1, 759, 1,0),(1, 760, 1,0),(1, 761, 1,0),(1, 762, 1,0),(1, 763, 1,0),(1, 764, 1,0),(1, 765, 1,0),(1, 766, 1,0),(1, 767, 1,0),(1, 768, 1,0),(1, 769, 1,0),(1, 770, 1,0),(1, 771, 1,0),(1, 772, 1,0),(1, 773, 1,0),(1, 774, 1,0),(1, 775, 1,0),(1, 776, 1,0),(1, 777, 1,0),(1, 778, 1,0),(1, 779, 1,0),(1, 780, 1,0),(1, 781, 1,0),(1, 782, 1,0),(1, 783, 1,0),(1, 784, 1,0),(1, 785, 1,0),(1, 786, 1,0),(1, 787, 1,0),(1, 788, 1,0),(1, 789, 1,0),(1, 790, 1,0),(1, 791, 1,0),(1, 792, 1,0),(1, 793, 1,0),(1, 794, 1,0),(1, 795, 1,0),(1, 796, 1,0),(1, 797, 1,0),(1, 798, 1,0),(1, 799, 1,0),(1, 800, 1,0),(1, 801, 0,0),(1, 802, 1,0),(1, 803, 1,0),(1, 804, 0,0),(1, 805, 0,0),(1, 806, 1,0),(1, 807, 1,0),(1, 808, 1,0),(1, 809, 1,0),(1, 810, 1,0),(1, 811, 1,0),(1, 812, 1,0),(1, 813, 1,0),(1, 814, 1,0),(1, 815, 1,0),(1, 816, 1,0),(1, 817, 1,0),(1, 818, 1,0),(1, 819, 1,0),(1, 820, 1,0),(1, 821, 1,0),(1, 822, 1,0),(1, 823, 1,0),(1, 824, 1,0),(1, 825, 1,0),(1, 826, 1,0),(1, 827, 1,0),(1, 828, 1,0),(1, 829, 1,0),(1, 830, 1,0),(1, 831, 1,0),(1, 832, 1,0),(1, 833, 1,0),(1, 834, 1,0),(1, 835, 1,0),(1, 836, 1,0),(2, 511, 1,0),(2, 512, 0,0),(2, 513, 0,0),(2, 514, 0,0),(2, 515, 0,0),(2, 516, 0,0),(2, 517, 0,0),(2, 518, 0,0),(2, 519, 0,0),(2, 520, 0,0),(2, 521, 0,0),(2, 522, 1,0),(2, 523, 0,0),(2, 524, 0,0),(2, 525, 0,0),(2, 526, 0,0),(2, 527, 1,0),(2, 528, 1,0),(2, 529, 1,0),(2, 530, 0,0),(2, 531, 0,0),(2, 532, 0,0),(2, 533, 0,0),(2, 534, 1,0),(2, 535, 1,0),(2, 536, 1,0),(2, 537, 1,0),(2, 538, 1,0),(2, 539, 1,0),(2, 540, 0,0),(2, 541, 0,0),(2, 542, 0,0),(2, 543, 1,0),(2, 544, 0,0),(2, 545, 0,0),(2, 546, 0,0),(2, 547, 0,0),(2, 548, 0,0),(2, 549, 1,0),(2, 550, 0,0),(2, 551, 0,0),(2, 552, 0,0),(2, 553, 0,0),(2, 554, 0,0),(2, 555, 0,0),(2, 556, 0,0),(2, 557, 0,0),(2, 558, 0,0),(2, 559, 0,0),(2, 560, 0,0),(2, 561, 0,0),(2, 562, 0,0),(2, 563, 0,0),(2, 564, 0,0),(2, 565, 0,0),(2, 566, 0,0),(2, 567, 0,0),(2, 568, 0,0),(2, 569, 0,0),(2, 570, 1,0),(2, 571, 1,0),(2, 572, 1,0),(2, 573, 1,0),(2, 574, 1,0),(2, 575, 1,0),(2, 576, 1,0),(2, 577, 1,0),(2, 578, 1,0),(2, 579, 0,0),(2, 580, 0,0),(2, 581, 0,0),(2, 582, 0,0),(2, 583, 0,0),(2, 584, 0,0),(2, 585, 1,0),(2, 586, 1,0),(2, 587, 0,0),(2, 588, 1,0),(2, 589, 1,0),(2, 590, 1,0),(2, 591, 1,0),(2, 592, 1,0),(2, 593, 1,0),(2, 594, 1,0),(2, 595, 0,0),(2, 596, 0,0),(2, 597, 0,0),(2, 598, 0,0),(2, 599, 0,0),(2, 600, 0,0),(2, 601, 0,0),(2, 602, 0,0),(2, 603, 1,0),(2, 604, 1,0),(2, 605, 1,0),(2, 606, 1,0),(2, 607, 1,0),(2, 608, 1,0),(2, 609, 1,0),(2, 610, 1,0),(2, 611, 0,0),(2, 612, 1,0),(2, 613, 1,0),(2, 614, 1,0),(2, 615, 1,0),(2, 616, 0,0),(2, 617, 0,0),(2, 618, 0,0),(2, 619, 1,0),(2, 620, 1,0),(2, 621, 1,0),(2, 622, 1,0),(2, 623, 1,0),(2, 624, 1,0),(2, 625, 0,0),(2, 626, 0,0),(2, 627, 1,0),(2, 628, 1,0),(2, 629, 1,0),(2, 630, 0,0),(2, 631, 1,0),(2, 632, 0,0),(2, 633, 0,0),(2, 634, 0,0),(2, 635, 0,0),(2, 636, 1,0),(2, 637, 1,0),(2, 638, 1,0),(2, 639, 1,0),(2, 640, 0,0),(2, 641, 1,0),(2, 642, 1,0),(2, 643, 1,0),(2, 644, 1,0),(2, 645, 1,0),(2, 646, 1,0),(2, 647, 1,0),(2, 648, 1,0),(2, 649, 1,0),(2, 650, 1,0),(2, 651, 1,0),(2, 652, 1,0),(2, 653, 1,0),(2, 654, 1,0),(2, 655, 1,0),(2, 656, 1,0),(2, 657, 1,0),(2, 658, 1,0),(2, 659, 1,0),(2, 660, 1,0),(2, 661, 1,0),(2, 662, 1,0),(2, 663, 1,0),(2, 664, 1,0),(2, 665, 1,0),(2, 666, 1,0),(2, 667, 1,0),(2, 668, 1,0),(2, 669, 1,0),(2, 670, 1,0),(2, 671, 1,0),(2, 672, 1,0),(2, 673, 1,0),(2, 674, 1,0),(2, 675, 1,0),(2, 676, 1,0),(2, 677, 1,0),(2, 678, 1,0),(2, 679, 1,0),(2, 680, 1,0),(2, 681, 1,0),(2, 682, 1,0),(2, 683, 1,0),(2, 684, 1,0),(2, 685, 1,0),(2, 686, 1,0),(2, 687, 1,0),(2, 688, 1,0),(2, 689, 1,0),(2, 690, 1,0),(2, 691, 1,0),(2, 692, 1,0),(2, 693, 1,0),(2, 694, 1,0),(2, 695, 1,0),(2, 696, 1,0),(2, 697, 1,0),(2, 698, 1,0),(2, 699, 1,0),(2, 700, 1,0),(2, 701, 1,0),(2, 702, 1,0),(2, 703, 1,0),(2, 704, 1,0),(2, 705, 1,0),(2, 706, 1,0),(2, 707, 1,0),(2, 708, 1,0),(2, 709, 1,0),(2, 710, 1,0),(2, 711, 1,0),(2, 712, 1,0),(2, 713, 1,0),(2, 714, 1,0),(2, 715, 1,0),(2, 716, 1,0),(2, 717, 1,0),(2, 718, 1,0),(2, 719, 1,0),(2, 720, 1,0),(2, 721, 1,0),(2, 722, 1,0),(2, 723, 1,0),(2, 724, 1,0),(2, 725, 1,0),(2, 726, 1,0),(2, 727, 1,0),(2, 728, 1,0),(2, 729, 1,0),(2, 730, 1,0),(2, 731, 1,0),(2, 732, 1,0),(2, 733, 1,0),(2, 734, 1,0),(2, 735, 1,0),(2, 736, 1,0),(2, 737, 1,0),(2, 738, 1,0),(2, 739, 1,0),(2, 740, 1,0),(2, 741, 1,0),(2, 742, 1,0),(2, 743, 1,0),(2, 744, 1,0),(2, 745, 1,0),(2, 746, 1,0),(2, 747, 1,0),(2, 748, 1,0),(2, 749, 1,0),(2, 750, 1,0),(2, 751, 1,0),(2, 752, 1,0),(2, 753, 1,0),(2, 754, 1,0),(2, 755, 1,0),(2, 756, 1,0),(2, 757, 1,0),(2, 758, 1,0),(2, 759, 1,0),(2, 760, 1,0),(2, 761, 1,0),(2, 762, 1,0),(2, 763, 1,0),(2, 764, 1,0),(2, 765, 1,0),(2, 766, 1,0),(2, 767, 1,0),(2, 768, 1,0),(2, 769, 1,0),(2, 770, 1,0),(2, 771, 1,0),(2, 772, 1,0),(2, 773, 1,0),(2, 774, 1,0),(2, 775, 1,0),(2, 776, 1,0),(2, 777, 1,0),(2, 778, 1,0),(2, 779, 1,0),(2, 780, 1,0),(2, 781, 1,0),(2, 782, 1,0),(2, 783, 1,0),(2, 784, 1,0),(2, 785, 1,0),(2, 786, 1,0),(2, 787, 1,0),(2, 788, 1,0),(2, 789, 1,0),(2, 790, 1,0),(2, 791, 1,0),(2, 792, 1,0),(2, 793, 1,0),(2, 794, 1,0),(2, 795, 1,0),(2, 796, 1,0),(2, 797, 1,0),(2, 798, 1,0),(2, 799, 1,0),(2, 800, 1,0),(2, 801, 0,0),(2, 802, 1,0),(2, 803, 1,0),(2, 804, 0,0),(2, 805, 0,0),(2, 806, 1,0),(2, 807, 1,0),(2, 808, 1,0),(2, 809, 1,0),(2, 810, 1,0),(2, 811, 1,0),(2, 812, 1,0),(2, 813, 1,0),(2, 814, 1,0),(2, 815, 1,0),(2, 816, 1,0),(2, 817, 1,0),(2, 818, 1,0),(2, 819, 1,0),(2, 820, 1,0),(2, 821, 1,0),(2, 822, 1,0),(2, 823, 1,0),(2, 824, 1,0),(2, 825, 1,0),(2, 826, 1,0),(2, 827, 1,0),(2, 828, 1,0),(2, 829, 1,0),(2, 830, 1,0),(2, 831, 1,0),(2, 832, 1,0),(2, 833, 1,0),(2, 834, 1,0),(2, 835, 1,0),(2, 836, 1,0),(3, 511, 1,0),(3, 512, 0,0),(3, 513, 0,0),(3, 514, 0,0),(3, 515, 0,0),(3, 516, 0,0),(3, 517, 0,0),(3, 518, 0,0),(3, 519, 0,0),(3, 520, 0,0),(3, 521, 0,0),(3, 522, 1,0),(3, 523, 0,0),(3, 524, 0,0),(3, 525, 0,0),(3, 526, 0,0),(3, 527, 1,0),(3, 528, 1,0),(3, 529, 1,0),(3, 530, 0,0),(3, 531, 0,0),(3, 532, 0,0),(3, 533, 0,0),(3, 534, 1,0),(3, 535, 1,0),(3, 536, 1,0),(3, 537, 1,0),(3, 538, 1,0),(3, 539, 1,0),(3, 540, 0,0),(3, 541, 0,0),(3, 542, 0,0),(3, 543, 1,0),(3, 544, 0,0),(3, 545, 0,0),(3, 546, 0,0),(3, 547, 0,0),(3, 548, 0,0),(3, 549, 1,0),(3, 550, 0,0),(3, 551, 0,0),(3, 552, 0,0),(3, 553, 0,0),(3, 554, 0,0),(3, 555, 0,0),(3, 556, 0,0),(3, 557, 0,0),(3, 558, 0,0),(3, 559, 0,0),(3, 560, 0,0),(3, 561, 0,0),(3, 562, 0,0),(3, 563, 0,0),(3, 564, 0,0),(3, 565, 0,0),(3, 566, 0,0),(3, 567, 0,0),(3, 568, 0,0),(3, 569, 0,0),(3, 570, 1,0),(3, 571, 1,0),(3, 572, 1,0),(3, 573, 1,0),(3, 574, 1,0),(3, 575, 1,0),(3, 576, 1,0),(3, 577, 1,0),(3, 578, 1,0),(3, 579, 0,0),(3, 580, 0,0),(3, 581, 0,0),(3, 582, 0,0),(3, 583, 0,0),(3, 584, 0,0),(3, 585, 1,0),(3, 586, 1,0),(3, 587, 0,0),(3, 588, 1,0),(3, 589, 1,0),(3, 590, 1,0),(3, 591, 1,0),(3, 592, 1,0),(3, 593, 1,0),(3, 594, 1,0),(3, 595, 0,0),(3, 596, 0,0),(3, 597, 0,0),(3, 598, 0,0),(3, 599, 0,0),(3, 600, 0,0),(3, 601, 0,0),(3, 602, 0,0),(3, 603, 1,0),(3, 604, 1,0),(3, 605, 1,0),(3, 606, 1,0),(3, 607, 1,0),(3, 608, 1,0),(3, 609, 1,0),(3, 610, 1,0),(3, 611, 0,0),(3, 612, 1,0),(3, 613, 1,0),(3, 614, 1,0),(3, 615, 1,0),(3, 616, 0,0),(3, 617, 0,0),(3, 618, 0,0),(3, 619, 1,0),(3, 620, 1,0),(3, 621, 1,0),(3, 622, 1,0),(3, 623, 1,0),(3, 624, 1,0),(3, 625, 0,0),(3, 626, 0,0),(3, 627, 1,0),(3, 628, 1,0),(3, 629, 1,0),(3, 630, 0,0),(3, 631, 1,0),(3, 632, 0,0),(3, 633, 0,0),(3, 634, 0,0),(3, 635, 0,0),(3, 636, 1,0),(3, 637, 1,0),(3, 638, 1,0),(3, 639, 1,0),(3, 640, 0,0),(3, 641, 1,0),(3, 642, 1,0),(3, 643, 1,0),(3, 644, 1,0),(3, 645, 1,0),(3, 646, 1,0),(3, 647, 1,0),(3, 648, 1,0),(3, 649, 1,0),(3, 650, 1,0),(3, 651, 1,0),(3, 652, 1,0),(3, 653, 1,0),(3, 654, 1,0),(3, 655, 1,0),(3, 656, 1,0),(3, 657, 1,0),(3, 658, 1,0),(3, 659, 1,0),(3, 660, 1,0),(3, 661, 1,0),(3, 662, 1,0),(3, 663, 1,0),(3, 664, 1,0),(3, 665, 1,0),(3, 666, 1,0),(3, 667, 1,0),(3, 668, 1,0),(3, 669, 1,0),(3, 670, 1,0),(3, 671, 1,0),(3, 672, 1,0),(3, 673, 1,0),(3, 674, 1,0),(3, 675, 1,0),(3, 676, 1,0),(3, 677, 1,0),(3, 678, 1,0),(3, 679, 1,0),(3, 680, 1,0),(3, 681, 1,0),(3, 682, 1,0),(3, 683, 1,0),(3, 684, 1,0),(3, 685, 1,0),(3, 686, 1,0),(3, 687, 1,0),(3, 688, 1,0),(3, 689, 1,0),(3, 690, 1,0),(3, 691, 1,0),(3, 692, 1,0),(3, 693, 1,0),(3, 694, 1,0),(3, 695, 1,0),(3, 696, 1,0),(3, 697, 1,0),(3, 698, 1,0),(3, 699, 1,0),(3, 700, 1,0),(3, 701, 1,0),(3, 702, 1,0),(3, 703, 1,0),(3, 704, 1,0),(3, 705, 1,0),(3, 706, 1,0),(3, 707, 1,0),(3, 708, 1,0),(3, 709, 1,0),(3, 710, 1,0),(3, 711, 1,0),(3, 712, 1,0),(3, 713, 1,0),(3, 714, 1,0),(3, 715, 1,0),(3, 716, 1,0),(3, 717, 1,0),(3, 718, 1,0),(3, 719, 1,0),(3, 720, 1,0),(3, 721, 1,0),(3, 722, 1,0),(3, 723, 1,0),(3, 724, 1,0),(3, 725, 1,0),(3, 726, 1,0),(3, 727, 1,0),(3, 728, 1,0),(3, 729, 1,0),(3, 730, 1,0),(3, 731, 1,0),(3, 732, 1,0),(3, 733, 1,0),(3, 734, 1,0),(3, 735, 1,0),(3, 736, 1,0),(3, 737, 1,0),(3, 738, 1,0),(3, 739, 1,0),(3, 740, 1,0),(3, 741, 1,0),(3, 742, 1,0),(3, 743, 1,0),(3, 744, 1,0),(3, 745, 1,0),(3, 746, 1,0),(3, 747, 1,0),(3, 748, 1,0),(3, 749, 1,0),(3, 750, 1,0),(3, 751, 1,0),(3, 752, 1,0),(3, 753, 1,0),(3, 754, 1,0),(3, 755, 1,0),(3, 756, 1,0),(3, 757, 1,0),(3, 758, 1,0),(3, 759, 1,0),(3, 760, 1,0),(3, 761, 1,0),(3, 762, 1,0),(3, 763, 1,0),(3, 764, 1,0),(3, 765, 1,0),(3, 766, 1,0),(3, 767, 1,0),(3, 768, 1,0),(3, 769, 1,0),(3, 770, 1,0),(3, 771, 1,0),(3, 772, 1,0),(3, 773, 1,0),(3, 774, 1,0),(3, 775, 1,0),(3, 776, 1,0),(3, 777, 1,0),(3, 778, 1,0),(3, 779, 1,0),(3, 780, 1,0),(3, 781, 1,0),(3, 782, 1,0),(3, 783, 1,0),(3, 784, 1,0),(3, 785, 1,0),(3, 786, 1,0),(3, 787, 1,0),(3, 788, 1,0),(3, 789, 1,0),(3, 790, 1,0),(3, 791, 1,0),(3, 792, 1,0),(3, 793, 1,0),(3, 794, 1,0),(3, 795, 1,0),(3, 796, 1,0),(3, 797, 1,0),(3, 798, 1,0),(3, 799, 1,0),(3, 800, 1,0),(3, 801, 0,0),(3, 802, 1,0),(3, 803, 1,0),(3, 804, 0,0),(3, 805, 0,0),(3, 806, 1,0),(3, 807, 1,0),(3, 808, 1,0),(3, 809, 1,0),(3, 810, 1,0),(3, 811, 1,0),(3, 812, 1,0),(3, 813, 1,0),(3, 814, 1,0),(3, 815, 1,0),(3, 816, 1,0),(3, 817, 1,0),(3, 818, 1,0),(3, 819, 1,0),(3, 820, 1,0),(3, 821, 1,0),(3, 822, 1,0),(3, 823, 1,0),(3, 824, 1,0),(3, 825, 1,0),(3, 826, 1,0),(3, 827, 1,0),(3, 828, 1,0),(3, 829, 1,0),(3, 830, 1,0),(3, 831, 1,0),(3, 832, 1,0),(3, 833, 1,0),(3, 834, 1,0),(3, 835, 1,0),(3, 836, 1,0),(4, 511, 1,0),(4, 512, 0,0),(4, 513, 0,0),(4, 514, 0,0),(4, 515, 0,0),(4, 516, 0,0),(4, 517, 0,0),(4, 518, 0,0),(4, 519, 0,0),(4, 520, 0,0),(4, 521, 0,0),(4, 522, 1,0),(4, 523, 0,0),(4, 524, 0,0),(4, 525, 0,0),(4, 526, 0,0),(4, 527, 1,0),(4, 528, 1,0),(4, 529, 1,0),(4, 530, 0,0),(4, 531, 0,0),(4, 532, 0,0),(4, 533, 0,0),(4, 534, 1,0),(4, 535, 1,0),(4, 536, 1,0),(4, 537, 1,0),(4, 538, 1,0),(4, 539, 1,0),(4, 540, 0,0),(4, 541, 0,0),(4, 542, 0,0),(4, 543, 1,0),(4, 544, 0,0),(4, 545, 0,0),(4, 546, 0,0),(4, 547, 0,0),(4, 548, 0,0),(4, 549, 1,0),(4, 550, 0,0),(4, 551, 0,0),(4, 552, 0,0),(4, 553, 0,0),(4, 554, 0,0),(4, 555, 0,0),(4, 556, 0,0),(4, 557, 0,0),(4, 558, 0,0),(4, 559, 0,0),(4, 560, 0,0),(4, 561, 0,0),(4, 562, 0,0),(4, 563, 0,0),(4, 564, 0,0),(4, 565, 0,0),(4, 566, 0,0),(4, 567, 0,0),(4, 568, 0,0),(4, 569, 0,0),(4, 570, 1,0),(4, 571, 1,0),(4, 572, 1,0),(4, 573, 1,0),(4, 574, 1,0),(4, 575, 1,0),(4, 576, 1,0),(4, 577, 1,0),(4, 578, 1,0),(4, 579, 0,0),(4, 580, 0,0),(4, 581, 0,0),(4, 582, 0,0),(4, 583, 0,0),(4, 584, 0,0),(4, 585, 1,0),(4, 586, 1,0),(4, 587, 0,0),(4, 588, 1,0),(4, 589, 1,0),(4, 590, 1,0),(4, 591, 1,0),(4, 592, 1,0),(4, 593, 1,0),(4, 594, 1,0),(4, 595, 0,0),(4, 596, 0,0),(4, 597, 0,0),(4, 598, 0,0),(4, 599, 0,0),(4, 600, 0,0),(4, 601, 0,0),(4, 602, 0,0),(4, 603, 1,0),(4, 604, 1,0),(4, 605, 1,0),(4, 606, 1,0),(4, 607, 1,0),(4, 608, 1,0),(4, 609, 1,0),(4, 610, 1,0),(4, 611, 0,0),(4, 612, 1,0),(4, 613, 1,0),(4, 614, 1,0),(4, 615, 1,0),(4, 616, 0,0),(4, 617, 0,0),(4, 618, 0,0),(4, 619, 1,0),(4, 620, 1,0),(4, 621, 1,0),(4, 622, 1,0),(4, 623, 1,0),(4, 624, 1,0),(4, 625, 0,0),(4, 626, 0,0),(4, 627, 1,0),(4, 628, 1,0),(4, 629, 1,0),(4, 630, 0,0),(4, 631, 1,0),(4, 632, 0,0),(4, 633, 0,0),(4, 634, 0,0),(4, 635, 0,0),(4, 636, 1,0),(4, 637, 1,0),(4, 638, 1,0),(4, 639, 1,0),(4, 640, 0,0),(4, 641, 1,0),(4, 642, 1,0),(4, 643, 1,0),(4, 644, 1,0),(4, 645, 1,0),(4, 646, 1,0),(4, 647, 1,0),(4, 648, 1,0),(4, 649, 1,0),(4, 650, 1,0),(4, 651, 1,0),(4, 652, 1,0),(4, 653, 1,0),(4, 654, 1,0),(4, 655, 1,0),(4, 656, 1,0),(4, 657, 1,0),(4, 658, 1,0),(4, 659, 1,0),(4, 660, 1,0),(4, 661, 1,0),(4, 662, 1,0),(4, 663, 1,0),(4, 664, 1,0),(4, 665, 1,0),(4, 666, 1,0),(4, 667, 1,0),(4, 668, 1,0),(4, 669, 1,0),(4, 670, 1,0),(4, 671, 1,0),(4, 672, 1,0),(4, 673, 1,0),(4, 674, 1,0),(4, 675, 1,0),(4, 676, 1,0),(4, 677, 1,0),(4, 678, 1,0),(4, 679, 1,0),(4, 680, 1,0),(4, 681, 1,0),(4, 682, 1,0),(4, 683, 1,0),(4, 684, 1,0),(4, 685, 1,0),(4, 686, 1,0),(4, 687, 1,0),(4, 688, 1,0),(4, 689, 1,0),(4, 690, 1,0),(4, 691, 1,0),(4, 692, 1,0),(4, 693, 1,0),(4, 694, 1,0),(4, 695, 1,0),(4, 696, 1,0),(4, 697, 1,0),(4, 698, 1,0),(4, 699, 1,0),(4, 700, 1,0),(4, 701, 1,0),(4, 702, 1,0),(4, 703, 1,0),(4, 704, 1,0),(4, 705, 1,0),(4, 706, 1,0),(4, 707, 1,0),(4, 708, 1,0),(4, 709, 1,0),(4, 710, 1,0),(4, 711, 1,0),(4, 712, 1,0),(4, 713, 1,0),(4, 714, 1,0),(4, 715, 1,0),(4, 716, 1,0),(4, 717, 1,0),(4, 718, 1,0),(4, 719, 1,0),(4, 720, 1,0),(4, 721, 1,0),(4, 722, 1,0),(4, 723, 1,0),(4, 724, 1,0),(4, 725, 1,0),(4, 726, 1,0),(4, 727, 1,0),(4, 728, 1,0),(4, 729, 1,0),(4, 730, 1,0),(4, 731, 1,0),(4, 732, 1,0),(4, 733, 1,0),(4, 734, 1,0),(4, 735, 1,0),(4, 736, 1,0),(4, 737, 1,0),(4, 738, 1,0),(4, 739, 1,0),(4, 740, 1,0),(4, 741, 1,0),(4, 742, 1,0),(4, 743, 1,0),(4, 744, 1,0),(4, 745, 1,0),(4, 746, 1,0),(4, 747, 1,0),(4, 748, 1,0),(4, 749, 1,0),(4, 750, 1,0),(4, 751, 1,0),(4, 752, 1,0),(4, 753, 1,0),(4, 754, 1,0),(4, 755, 1,0),(4, 756, 1,0),(4, 757, 1,0),(4, 758, 1,0),(4, 759, 1,0),(4, 760, 1,0),(4, 761, 1,0),(4, 762, 1,0),(4, 763, 1,0),(4, 764, 1,0),(4, 765, 1,0),(4, 766, 1,0),(4, 767, 1,0),(4, 768, 1,0),(4, 769, 1,0),(4, 770, 1,0),(4, 771, 1,0),(4, 772, 1,0),(4, 773, 1,0),(4, 774, 1,0),(4, 775, 1,0),(4, 776, 1,0),(4, 777, 1,0),(4, 778, 1,0),(4, 779, 1,0),(4, 780, 1,0),(4, 781, 1,0),(4, 782, 1,0),(4, 783, 1,0),(4, 784, 1,0),(4, 785, 1,0),(4, 786, 1,0),(4, 787, 1,0),(4, 788, 1,0),(4, 789, 1,0),(4, 790, 1,0),(4, 791, 1,0),(4, 792, 1,0),(4, 793, 1,0),(4, 794, 1,0),(4, 795, 1,0),(4, 796, 1,0),(4, 797, 1,0),(4, 798, 1,0),(4, 799, 1,0),(4, 800, 1,0),(4, 801, 0,0),(4, 802, 1,0),(4, 803, 1,0),(4, 804, 0,0),(4, 805, 0,0),(4, 806, 1,0),(4, 807, 1,0),(4, 808, 1,0),(4, 809, 1,0),(4, 810, 1,0),(4, 811, 1,0),(4, 812, 1,0),(4, 813, 1,0),(4, 814, 1,0),(4, 815, 1,0),(4, 816, 1,0),(4, 817, 1,0),(4, 818, 1,0),(4, 819, 1,0),(4, 820, 1,0),(4, 821, 1,0),(4, 822, 1,0),(4, 823, 1,0),(4, 824, 1,0),(4, 825, 1,0),(4, 826, 1,0),(4, 827, 1,0),(4, 828, 1,0),(4, 829, 1,0),(4, 830, 1,0),(4, 831, 1,0),(4, 832, 1,0),(4, 833, 1,0),(4, 834, 1,0),(4, 835, 1,0),(4, 836, 1,0); -- id=2256
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=3560
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=1
UPDATE usergroupadmin
                INNER JOIN relusergroupproperties ON (usergroupadmin.propertyid = relusergroupproperties.propertyid and relusergroupproperties.usergroupid = 1)
                SET usergroupadmin.isallowed = relusergroupproperties.propertyvalue;
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,treeId) VALUES ('admin', 'manager', '1', 'admin', '2026-10-08', '0', '1', '0' ,'0' ,'0','0','what is my question','how','0','0','1','0','0','','1','1','1','1','0','0','0','1','0','0','0','','','0','0','0','',''); -- id=1
INSERT INTO user (userid, username, password, usergroupid, employeename, currentdate, conditions, saveid,userstoreid ,awardrate,searchinonesave, branchId,question, answer,blockedByLimits,loginip,lastactivetime,directSaveBills,userstoreidDef,storeSupervisor,storeSupervisorStores,awardrategomla,awardratehalf,dellaternakdipayed) VALUES ('-1', 'GT4', '456', '-1', 'GT4', '2026-10-08', '0', '1' ,'0' ,'0','0','0','what is','my company is GT4','0','81.10.55.229','2026-10-08 14:50:33','0','0','1','1','0','0','0'); -- id=18446744073709551615
INSERT INTO billsettings (`billnameid`, `billpropertyid`, `billsettingsvalue`) VALUES (1, 105, 0),(1, 106, 0),(1, 107, 0),(1, 108, 0),(1, 109, 0),(1, 110, 0),(1, 111, 0),(1, 112, 0),(1, 113, 0),(1, 114, 0),(1, 115, 0),(1, 116, 0),(1, 117, 0),(1, 118, 0),(1, 119, 0),(1, 120, 0),(1, 121, 0),(1, 122, 0),(1, 123, 0),(1, 124, 0),(1, 125, 0),(1, 126, 0),(1, 127, 0),(1, 128, 0),(1, 129, 0); -- id=1093
INSERT INTO billsettings (`billnameid`, `billpropertyid`, `billsettingsvalue`) VALUES (3, 107, 0),(3, 109, 0),(3, 110, 0),(3, 111, 0),(3, 117, 0),(3, 118, 0),(3, 119, 0),(3, 120, 0),(3, 121, 0),(3, 122, 0),(3, 123, 0),(3, 124, 0),(3, 125, 0),(3, 126, 0),(3, 127, 0),(3, 128, 0),(3, 129, 0); -- id=1118
INSERT INTO billsettings (`billnameid`, `billpropertyid`, `billsettingsvalue`) VALUES (4, 106, 0),(4, 107, 0),(4, 108, 0),(4, 109, 0),(4, 110, 0),(4, 111, 0),(4, 112, 0),(4, 117, 0),(4, 118, 0),(4, 119, 0),(4, 120, 0),(4, 121, 0),(4, 122, 0),(4, 123, 0),(4, 124, 0),(4, 125, 0),(4, 126, 0),(4, 127, 0),(4, 128, 0),(4, 129, 0); -- id=1135
INSERT INTO billsettings (`billnameid`, `billpropertyid`, `billsettingsvalue`) VALUES (5, 106, 0),(5, 107, 0),(5, 108, 0),(5, 109, 0),(5, 110, 0),(5, 111, 0),(5, 112, 0),(5, 117, 0),(5, 118, 0),(5, 119, 0),(5, 120, 0),(5, 121, 0),(5, 122, 0),(5, 123, 0),(5, 124, 0),(5, 125, 0),(5, 126, 0),(5, 127, 0),(5, 128, 0),(5, 129, 0); -- id=1155
INSERT INTO billsettings (`billnameid`, `billpropertyid`, `billsettingsvalue`) VALUES (6, 105, 0),(6, 106, 0),(6, 107, 0),(6, 108, 0),(6, 109, 0),(6, 110, 0),(6, 111, 0),(6, 112, 0),(6, 117, 0),(6, 118, 0),(6, 119, 0),(6, 120, 0),(6, 121, 0),(6, 122, 0),(6, 123, 0),(6, 124, 0),(6, 125, 0),(6, 126, 0),(6, 127, 0),(6, 128, 0),(6, 129, 0); -- id=1175
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2024-02-13',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:20:33";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:50:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 14:50:33', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=1
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
INSERT INTO simplemanufacturesetting (storeid, reducestoreamount,productsproductionequation,orderclient,taskOrderName,lowOutPriceAlert) VALUES ('1', '1', '0','0','0','0'); -- id=1
INSERT INTO currency (name, symbol, conversionFactor, conditions, userid, sysDate,otherconversionFactor) VALUES ('جنيه', 'EGP', '1', '0', '1', '2026-10-08 14:50:34','1'); -- id=1
INSERT INTO save (saveid, savename, savecurrentvalue, savedetails, savedate, conditions, userid,treeId) VALUES ('1', 'الخزنة الرئيسية', '0', '', '2026-10-08', '0', '1','383'); -- id=1
INSERT INTO unit (unitName, unitSymbol, unitDescription, unitDate, conditions, userId) VALUES ('قطعة', '', '', '2026-10-08', '0', '1'); -- id=1
INSERT INTO store (storeId, storeName, storeDate, storeDescription, conditions, userId,treeId,treeIdBetween) VALUES ('1', 'المخزن الرئيسي', '2026-10-08', "المخزن الرئيسي", '0', '1','382','51'); -- id=1
INSERT INTO sparepartstore (sparepartstoreId, storeName, storeDate, storeDescription, conditions, userId) VALUES ('1', 'مخزن قطع الغيار', '2026-10-08', 'مخزن قطع الغيار', '0', '1'); -- id=1
INSERT INTO supplier (supplierid, suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate) VALUES ('1', 'مباشر', '', '', '0', 'مباشر', '0', '1', '2026-10-08'); -- id=1
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-08', '1', '1','','0','','-10','0','0','','0','0','','0','0','','','0','0','','0','0','0','','','0','384','','','','','','','','','','0','','','','0','','','0','0',''); -- id=1
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
CALL generateParcodes (99999);
DELETE availableparcode FROM availableparcode
                join product on product.parcode = availableparcode.value;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 11:20:36";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 14:50:36', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:21:09";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:51:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 14:51:09', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=edit&userid=4'); -- id=3
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:21:19";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:51:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-10-08 14:51:19', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/usergroupController.php?do=show'); -- id=4
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:21:25";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:51:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-10-08 14:51:25', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/usergroupController.php?do=edit&id=1'); -- id=5
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:21:55";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:51:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-10-08 14:51:55', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/usergroupController.php?do=update'); -- id=6
UPDATE relusergroupproperties SET usergroupid = '1', propertyid = '632', propertyvalue = '1',theorder = '0' WHERE relusergrouppropertiesid = '2377';
UPDATE relusergroupproperties SET usergroupid = '1', propertyid = '640', propertyvalue = '1',theorder = '0' WHERE relusergrouppropertiesid = '2385';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:21:55";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:51:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-10-08 14:51:55', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/usergroupController.php?do=sucess'); -- id=7
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:21:57";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:51:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-10-08 14:51:57', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/usergroupController.php?do=show'); -- id=8
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:22:04";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:52:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-08 14:52:04', '1', 'o.royalgt4.com:443/erp/controllers/storedetailController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php'); -- id=9
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:22:20";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:52:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-08 14:52:20', '1', 'o.royalgt4.com:443/erp/controllers/storeController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php'); -- id=10
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:03";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-08 14:53:03', '1', 'add', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=add'); -- id=11
INSERT INTO store (storeName, nameEn, branchId, addressAr, addressEn, phone, email, storeDate, storeDescription, conditions, userId, treeId, treeIdBetween, webApiId) VALUES ('مخزن المتاجر', '', '0', '', '', '', '', '2026-10-08', "", '0', '1', '0', '0', '0'); -- id=2
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('مخزن المتاجر', 'مخزن المتاجر', 'مخزن المتاجر', 'مخزن المتاجر', '49', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-08 14:53:03'); -- id=419
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('مخزن المتاجر وسيط', 'مخزن المتاجر وسيط', 'مخزن المتاجر وسيط', 'مخزن المتاجر وسيط', '49', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-08 14:53:03'); -- id=420
UPDATE store SET storeName = 'مخزن المتاجر', nameEn = '', branchId = '0', addressAr = '', addressEn = '', phone = '', email = '', storeDate = '2026-10-08', storeDescription = "", conditions = '0', userId = '1', treeId = '419', treeIdBetween = '420', updatedAt = CURRENT_TIMESTAMP WHERE storeId = '2';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:03";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-08 14:53:03', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=sucess'); -- id=12
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:05";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-08 14:53:05', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=show'); -- id=13
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:08";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-08 14:53:08', '1', 'o.royalgt4.com:443/erp/controllers/storeController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php'); -- id=14
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:15";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-08 14:53:15', '1', 'add', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=add'); -- id=15
INSERT INTO store (storeName, nameEn, branchId, addressAr, addressEn, phone, email, storeDate, storeDescription, conditions, userId, treeId, treeIdBetween, webApiId) VALUES ('مخزن المنشية', '', '0', '', '', '', '', '2026-10-08', "", '0', '1', '0', '0', '0'); -- id=3
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('مخزن المنشية', 'مخزن المنشية', 'مخزن المنشية', 'مخزن المنشية', '49', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-08 14:53:15'); -- id=421
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('مخزن المنشية وسيط', 'مخزن المنشية وسيط', 'مخزن المنشية وسيط', 'مخزن المنشية وسيط', '49', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-08 14:53:15'); -- id=422
UPDATE store SET storeName = 'مخزن المنشية', nameEn = '', branchId = '0', addressAr = '', addressEn = '', phone = '', email = '', storeDate = '2026-10-08', storeDescription = "", conditions = '0', userId = '1', treeId = '421', treeIdBetween = '422', updatedAt = CURRENT_TIMESTAMP WHERE storeId = '3';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:16";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-08 14:53:16', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=sucess'); -- id=16
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:17";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-08 14:53:17', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=show'); -- id=17
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:25";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:53:25', '1', 'o.royalgt4.com:443/erp/controllers/saveController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php'); -- id=18
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:42";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:53:42', '1', 'add', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=add'); -- id=19
BEGIN;
INSERT INTO save (savename, savecurrentvalue, savedetails, savedate, conditions, userid, currencyId, sortby,treeId,saveTreeParentType,webApiId,savetypeid) VALUES ('خزنة المتاجر', '', '', '2026-10-08 14:53:42', '0', '1', '1', '0','0','0','0','0'); -- id=2
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('0','0', '0', '2', 'تم اضافة  خزنة باسم   [ خزنة المتاجر ] ', '2', '0', '2026-10-08 14:53:42', '1',  'saveController.php','0','','0'); -- id=1
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-08 14:53:42'); -- id=423
UPDATE save SET savename = 'خزنة المتاجر', savecurrentvalue = '', savedetails = '', savedate = '2026-10-08 14:53:42', conditions = '0', userid = '1', sortby= '0',treeId='423',saveTreeParentType='0',savetypeid='0' WHERE saveid = '2';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:42";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:53:42', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=sucess'); -- id=20
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:44";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:53:44', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=show'); -- id=21
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:46";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:53:46', '1', 'o.royalgt4.com:443/erp/controllers/saveController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php'); -- id=22
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:58";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:53:58', '1', 'add', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=add'); -- id=23
BEGIN;
INSERT INTO save (savename, savecurrentvalue, savedetails, savedate, conditions, userid, currencyId, sortby,treeId,saveTreeParentType,webApiId,savetypeid) VALUES ('خزنة الجمعية', '0', '', '2026-10-08 14:53:58', '0', '1', '1', '0','0','0','0','0'); -- id=3
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('0','0', '0', '3', 'تم اضافة  خزنة باسم   [ خزنة الجمعية ] ', '3', '0', '2026-10-08 14:53:58', '1',  'saveController.php','0','','0'); -- id=2
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-08 14:53:58'); -- id=424
UPDATE save SET savename = 'خزنة الجمعية', savecurrentvalue = '0', savedetails = '', savedate = '2026-10-08 14:53:58', conditions = '0', userid = '1', sortby= '0',treeId='424',saveTreeParentType='0',savetypeid='0' WHERE saveid = '3';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:58";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:53:58', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=sucess'); -- id=24
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:23:59";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:53:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:53:59', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=show'); -- id=25
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:24:23";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:54:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('expensesReportController.php', '2026-10-08 14:54:23', '1', 'showByType', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/expensesReportController.php?do=showByType'); -- id=26
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:25:22";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:55:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankController.php', '2026-10-08 14:55:22', '1', 'o.royalgt4.com:443/erp/controllers/bankController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankController.php'); -- id=27
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:25:31";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:55:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankController.php', '2026-10-08 14:55:31', '1', 'add', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankController.php?do=add'); -- id=28
INSERT INTO bank (bankname, bankdetails, userid, conditions, bankdate,webApiId) VALUES ('البنك الاهلى', "", '1', '0', '2026-10-08','0'); -- id=1
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:25:31";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:55:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankController.php', '2026-10-08 14:55:31', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankController.php?do=sucess'); -- id=29
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:25:32";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:55:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankController.php', '2026-10-08 14:55:32', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankController.php?do=show'); -- id=30
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:25:39";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:55:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankaccountController.php', '2026-10-08 14:55:39', '1', 'o.royalgt4.com:443/erp/controllers/bankaccountController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankaccountController.php'); -- id=31
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:25:59";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:55:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankaccountController.php', '2026-10-08 14:55:59', '1', 'add', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankaccountController.php?do=add'); -- id=32
BEGIN;
INSERT INTO bankaccount (accountname, comment, accountnumber, accountbeginingbalance, accountdate, accountcurrencytype, bankid, userid, conditions,visa,visaDisPer,treeId,webApiId) VALUES ('حساب انستا', "", '123', '0', '2026-10-08', 'مصرى', '1', '1', '0','1','0','0','0'); -- id=1
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('حساب انستا / البنك الاهلى', 'حساب انستا / البنك الاهلى', 'حساب انستا / البنك الاهلى', 'حساب انستا / البنك الاهلى', '38', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-08 14:55:59'); -- id=425
UPDATE bankaccount SET accountname = 'حساب انستا', comment = "", accountnumber = '123', accountbeginingbalance = '0', accountdate = '2026-10-08', accountcurrencytype = 'مصرى', bankid = '1', userid = '1', conditions = '0',visa = '1',visaDisPer = '0',treeId='425' WHERE accountid = '1';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:25:59";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:55:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankaccountController.php', '2026-10-08 14:55:59', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankaccountController.php?do=sucess'); -- id=33
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:26:00";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:56:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankaccountController.php', '2026-10-08 14:56:00', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankaccountController.php?do=show'); -- id=34
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:26:04";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:56:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:56:04', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=35
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:26:06";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:56:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:56:06', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=edit&id=3'); -- id=36
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:26:33";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:56:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:56:33', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=37
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-10-08', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '1',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '1' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '1' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '0' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '1' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '0' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '1' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:26:33";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:56:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:56:33', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=38
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:26:34";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:56:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 14:56:34', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=39
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:27:11";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:57:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 14:57:11', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=40
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:27:24";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:57:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientController.php', '2026-10-08 14:57:24', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/clientController.php?do=show'); -- id=41
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:27:28";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:57:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientController.php', '2026-10-08 14:57:28', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/clientController.php?do=edit&id=1'); -- id=42
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:27:41";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:57:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientController.php', '2026-10-08 14:57:41', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/clientController.php?do=update'); -- id=43
INSERT INTO tamweenclientdetail (clientid, noOfPersonsTamween, noOfPersonsDa3m, cardNum, cardPassword) VALUES ('1', '0', '0', '', ''); -- id=1
UPDATE accountstree SET name = 'نقدي', customName = 'نقدي', customNameEn = 'نقدي', nameEn = 'نقدي', parent = '58', accountNature = '0', theValue = '0.00', theOrder = '0', layingOrder = '12030100002', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = 'Receivable', userid = '1', del = '0', sysdate = '2026-10-08 14:57:41' WHERE id = '384';
UPDATE client SET clientname = 'نقدي', clientaddress = '', clientphone = '', clientmobile = '', clientdetails = 'نقدي', conditions = '0', clientdate = '2026-10-08 14:57:41', userid = '1'  , clientareaid = '1'  ,clientcode = '',dailyentryid = '0' , rondomtxt = '',clientStoreIds = '-10', obygyPatientId = '0' , debtLimit='0' , typeclientid=',',priceTypeId='1',lastEditUser = '1',inUse = '0',card_number = '0',file_faida = '',specialDiscount = '0',specialDiscountVal = '0',file = '',mandobCollectRatio='0',clientRFID = '',postponeDays='0',taxnumber='', password='',clientTypeForTree='0',treeId='384',clientaddress2='',country='',delegateid='-1',webStoreType='0',clientaddress3='',taxfile='',fileimg='',tagids='',txtemail='' WHERE clientid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:27:41";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:57:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientController.php', '2026-10-08 14:57:41', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/clientController.php?do=sucess'); -- id=44
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:27:43";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:57:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientController.php', '2026-10-08 14:57:43', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/clientController.php?do=show'); -- id=45
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:27:45";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:57:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 14:57:45', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=46
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:27:57";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:57:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:57:57', '1', 'o.royalgt4.com:443/erp/controllers/saveController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php'); -- id=47
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:28:13";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:58:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:58:13', '1', 'add', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=add'); -- id=48
BEGIN;
INSERT INTO save (savename, savecurrentvalue, savedetails, savedate, conditions, userid, currencyId, sortby,treeId,saveTreeParentType,webApiId,savetypeid) VALUES ('خزنة فودافون كاش', '0', '', '2026-10-08 14:58:13', '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-08 14:58:13', '1',  'saveController.php','0','','0'); -- id=3
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-08 14:58:13'); -- id=426
UPDATE save SET savename = 'خزنة فودافون كاش', savecurrentvalue = '0', savedetails = '', savedate = '2026-10-08 14:58:13', conditions = '0', userid = '1', sortby= '0',treeId='426',saveTreeParentType='0',savetypeid='0' WHERE saveid = '4';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:28:13";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:58:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:58:13', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=sucess'); -- id=49
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:28:15";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:58:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:58:15', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=show'); -- id=50
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:29:22";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:59:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:59:22', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=edit&saveid=3'); -- id=51
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:29:36";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:59:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:59:36', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=update'); -- id=52
BEGIN;
UPDATE save SET savename = 'خزنة المنشية', savecurrentvalue = '0.00', savedetails = '', savedate = '2026-10-08 14:53:58', conditions = '0', userid = '1', sortby= '0',treeId='424',saveTreeParentType='0',savetypeid='0' WHERE saveid = '3';
UPDATE accountstree SET name = 'خزنة المنشية', customName = 'خزنة المنشية', customNameEn = 'خزنة الجمعية', nameEn = 'خزنة الجمعية', parent = '40', accountNature = '0', theValue = '0.00', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:59:36' WHERE id = '424';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:29:36";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:59:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:59:36', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=sucess'); -- id=53
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:29:38";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 14:59:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-08 14:59:38', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=show'); -- id=54
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:41:17";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 15:11:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 15:11:17', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=55
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 11:41:44";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 15:11:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 15:11:44', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=56
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 11:41:44";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 15:11:44', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=57
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 13:59:10";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 13:59:33";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 14:00:17";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:39:21";
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 = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:39:29";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:09:29", deviceType = "MOBILE" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 19:09:29', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'MOBILE','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=58
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 15:39:29";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 19:09:29', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=59
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 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 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 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-08 15:44: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 programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:44:25";
UPDATE user SET loginip = "197.193.253.247", lastactivetime = "2026-10-08 19:14:25", deviceType = "MOBILE" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 19:14:25', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '197.193.253.247', '', 'MOBILE','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=60
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 15:44:26";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 19:14:26', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=61
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 = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:44:53";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:14:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 19:14:53', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=62
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 15:44:54";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 19:14:54', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=63
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:45:24";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:15:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:15:24', '1', 'o.royalgt4.com:443/erp/controllers/productCatController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php'); -- id=64
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:50:13";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:20:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:20:13', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=65
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-08','','0', '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=1
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (1, 1,'2026-10-08 19:20:13',1)
                ON DUPLICATE KEY UPDATE catid = 1, edited = 1, sysdate = '2026-10-08 19:20:13', userid = 1; -- id=1
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '1', '1', '2026-10-08', '1', '0'); -- id=1
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:50:13";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:20:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:20:13', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=66
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:50:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:20:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:20:15', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=67
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:50:19";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:20:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:20:19', '1', 'o.royalgt4.com:443/erp/controllers/productCatController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php'); -- id=68
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:50:48";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:20:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:20:48', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=69
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-08','','0', '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=2
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (2, 1,'2026-10-08 19:20:48',1)
                ON DUPLICATE KEY UPDATE catid = 2, edited = 1, sysdate = '2026-10-08 19:20:48', userid = 1; -- id=2
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '2', '1', '2026-10-08', '1', '0'); -- id=2
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:50:48";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:20:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:20:48', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=70
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:50:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:20:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:20:50', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=71
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:50:53";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:20:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:20:53', '1', 'o.royalgt4.com:443/erp/controllers/productCatController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php'); -- id=72
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:51:39";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:21:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:21:39', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=73
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-08','','0', '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=3
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (3, 1,'2026-10-08 19:21:39',1)
                ON DUPLICATE KEY UPDATE catid = 3, edited = 1, sysdate = '2026-10-08 19:21:39', userid = 1; -- id=3
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '3', '1', '2026-10-08', '1', '0'); -- id=3
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:51:40";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:21:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:21:40', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=74
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:51:41";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:21:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:21:41', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=75
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:51:41";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:21:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:21:41', '1', 'o.royalgt4.com:443/erp/controllers/productCatController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php'); -- id=76
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:52:00";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:22:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:22:00', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=77
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-08','','0', '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=4
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (4, 1,'2026-10-08 19:22:00',1)
                ON DUPLICATE KEY UPDATE catid = 4, edited = 1, sysdate = '2026-10-08 19:22:00', userid = 1; -- id=4
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '4', '1', '2026-10-08', '1', '0'); -- id=4
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:52:00";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:22:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:22:00', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=78
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:52:02";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:22:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:22:02', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=79
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:52:10";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:22:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:22:10', '1', 'o.royalgt4.com:443/erp/controllers/productCatController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php'); -- id=80
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:52:27";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:22:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:22:27', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=81
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-08','','0', '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=5
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (5, 1,'2026-10-08 19:22:28',1)
                ON DUPLICATE KEY UPDATE catid = 5, edited = 1, sysdate = '2026-10-08 19:22:28', userid = 1; -- id=5
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '5', '1', '2026-10-08', '1', '0'); -- id=5
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:52:28";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:22:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:22:28', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=82
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:52:29";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:22:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:22:29', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=83
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:52:30";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:22:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:22:30', '1', 'o.royalgt4.com:443/erp/controllers/productCatController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php'); -- id=84
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:52:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:22:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:22:50', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=85
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-08','','0', '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=6
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (6, 1,'2026-10-08 19:22:50',1)
                ON DUPLICATE KEY UPDATE catid = 6, edited = 1, sysdate = '2026-10-08 19:22:50', userid = 1; -- id=6
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '6', '1', '2026-10-08', '1', '0'); -- id=6
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:52:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:22:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:22:50', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=86
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:52:51";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:22:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:22:51', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=87
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:52:51";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:22:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:22:51', '1', 'o.royalgt4.com:443/erp/controllers/productCatController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php'); -- id=88
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:53:04";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:23:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:23:04', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=89
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-08','','0', '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=7
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (7, 1,'2026-10-08 19:23:04',1)
                ON DUPLICATE KEY UPDATE catid = 7, edited = 1, sysdate = '2026-10-08 19:23:04', userid = 1; -- id=7
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '7', '1', '2026-10-08', '1', '0'); -- id=7
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:53:04";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:23:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:23:04', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=90
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:53:06";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:23:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:23:06', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=91
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:53:06";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:23:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:23:06', '1', 'o.royalgt4.com:443/erp/controllers/productCatController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php'); -- id=92
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:53:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:23:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:23:20', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=93
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-08','','0', '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=8
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (8, 1,'2026-10-08 19:23:20',1)
                ON DUPLICATE KEY UPDATE catid = 8, edited = 1, sysdate = '2026-10-08 19:23:20', userid = 1; -- id=8
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '8', '1', '2026-10-08', '1', '0'); -- id=8
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:53:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:23:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:23:20', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=94
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:53:21";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:23:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:23:21', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=95
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 15:53:36";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:23:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:23:36', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=96
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:04:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:34:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:34:25', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=add'); -- id=97
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 ('تريكو خريفي بوكس','','4','550','850','850','850','2026-10-08','0','1','0','00105','0','0','0','0','0','550','550','550','550','550','0','54.55','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=1
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', '1', '1.00', '2026-10-08', '1', '0','0000101','850','850','850','550','','0','0','0','0','0','0','0','0','0','0'); -- id=1
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1', '1', '0', '1', '2026-10-08'); -- id=1
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1', '1', '0', '0', '1', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=1
INSERT INTO onlinestoresetting (url, availableStores, onlinestoreid, onlineclientareaid, updatetype, catprohour, catprominute, proquantityhour, proquantityminute, clientshour, clientsminute, ordershour, ordersminute, clientdebtchangeStartId) VALUES ('', '', '2', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '-1'); -- id=1
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1, 1,'2026-10-08 19:34:25',1)
                ON DUPLICATE KEY UPDATE productid = 1, edited = 1, sysdate = '2026-10-08 19:34:25', userid = 1; -- id=1
UPDATE product SET productName = 'تريكو خريفي بوكس', productDescription = '', productCatId = '4', productBuyPrice = '550.00', productSellAllPrice = '850.00', productSellUnitPrice = '850.00', productSellHalfPrice = '850.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00105',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 = '54.55' , 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 = '1';
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 ('بولو خريفي','','4','0','0','0','0','2026-10-08','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','GS1','','','','0','0','0','0','','0','0','','0','','0','0','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','0','0','0','0','0','0','0','','','0','0','0','0'); -- id=2
UPDATE product SET productName = 'بولو خريفي', productDescription = '', productCatId = '4', productBuyPrice = '0', productSellAllPrice = '0', productSellUnitPrice = '0', productSellHalfPrice = '0', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00002',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='GS1',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='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 = '2';
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', '2', '1.00', '2026-10-08', '1', '0','0000201','0','0','0','0','','0','0','0','0','0','0','0','0','0','0'); -- id=2
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('2', '1', '0', '1', '2026-10-08'); -- id=2
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('2', '1', '0', '0', '2', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=2
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (2, 1,'2026-10-08 19:34:25',1)
                ON DUPLICATE KEY UPDATE productid = 2, edited = 1, sysdate = '2026-10-08 19:34:25', userid = 1; -- id=2
UPDATE product SET productName = 'بولو خريفي', productDescription = '', productCatId = '4', productBuyPrice = '0.00', productSellAllPrice = '0.00', productSellUnitPrice = '0.00', productSellHalfPrice = '0.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00002',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='GS1',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='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 = '2';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:04:26";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:34:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:34:26', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=98
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:07:39";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:37:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:37:39', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=99
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:07:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:37:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 19:37:50', '1', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=edit&id=4&parentid=0'); -- id=100
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:08:21";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:38:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:38:21', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=101
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:08:40";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:38:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:38:40', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=102
UPDATE productunit SET proUnitBuyPrice  = 460 * productnumber WHERE productid = 2;
UPDATE product SET productName = 'بولو خريفي', productDescription = '', productCatId = '4', productBuyPrice = '460', productSellAllPrice = '0.00', productSellUnitPrice = '0.00', productSellHalfPrice = '0.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00002',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '0.00',lastbuyprice_withDiscount = '0',meanbuyprice = '230',meanbuyprice_withDiscount = '230' , 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='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='230',meanbuyprice_withTax='230',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 = '2';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (2, 1,'2026-10-08 19:39:07',1)
                ON DUPLICATE KEY UPDATE productid = 2, edited = 1, sysdate = '2026-10-08 19:39:07', userid = 1; -- id=2
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:09:24";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:39:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:39:24', '1', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=edit&id=2'); -- id=103
UPDATE productunit SET proUnitSellAllPrice  = 750 * productnumber  WHERE productid = 2;
UPDATE product SET productName = 'بولو خريفي', productDescription = '', productCatId = '4', productBuyPrice = '460.00', productSellAllPrice = '750', productSellUnitPrice = '0.00', productSellHalfPrice = '0.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00002',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '0.00',lastbuyprice_withDiscount = '0',meanbuyprice = '230.00',meanbuyprice_withDiscount = '230' , 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='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='230',meanbuyprice_withTax='230',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 = '2';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (2, 1,'2026-10-08 19:39:24',1)
                ON DUPLICATE KEY UPDATE productid = 2, edited = 1, sysdate = '2026-10-08 19:39:24', userid = 1; -- id=2
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:10:02";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:40:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:40:02', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=update'); -- id=104
BEGIN;
UPDATE product SET productName = 'بولو خريفي', productDescription = '', productCatId = '4', productBuyPrice = '460', productSellAllPrice = '0', productSellUnitPrice = '0', productSellHalfPrice = '0', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '104',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '0.00',lastbuyprice_withDiscount = '0',meanbuyprice = '230.00',meanbuyprice_withDiscount = '230' , 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='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='230',meanbuyprice_withTax='230',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 = '2';
UPDATE product SET treeId = 0 WHERE productId = 2;
UPDATE productunit SET  conditions = 1 WHERE productunitid = 2;
UPDATE productunit SET unitid = '1', productid = '2', productnumber = '1.00', productunitdate = '2026-10-08', userid = '1', conditions = '0',proUnitParcode='0000201',proUnitSellAllPrice='0',proUnitSellHalfPrice='0',proUnitSellUnitPrice ='0',proUnitBuyPrice='460',unitInTax='',proUnitPrice4='0',proUnitPrice5='0',proUnitPrice6='0',proUnitPrice7='0',proUnitPrice8='0',proUnitPrice9='0',proUnitPrice10='0',proUnitPrice11='0',proUnitPrice12='0',proUnitPrice13='0' WHERE productunitid = '2';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (2, 1,'2026-10-08 19:40:02',1)
                ON DUPLICATE KEY UPDATE productid = 2, edited = 1, sysdate = '2026-10-08 19:40:02', userid = 1; -- id=2
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:10:04";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:40:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:40:04', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=105
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:10:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:40:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:40:15', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=106
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:20:37";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:50:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:50:37', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=add'); -- id=107
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 ('باجي كامب','','1','550','900','900','900','2026-10-08','0','1','0','00081','0','0','0','0','0','550','550','550','550','550','0','63.64','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=3
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', '3', '1.00', '2026-10-08', '1', '0','0000301','900','900','900','550','','0','0','0','0','0','0','0','0','0','0'); -- id=3
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('3', '1', '0', '1', '2026-10-08'); -- id=3
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('3', '1', '0', '0', '3', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=3
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (3, 1,'2026-10-08 19:50:37',1)
                ON DUPLICATE KEY UPDATE productid = 3, edited = 1, sysdate = '2026-10-08 19:50:37', userid = 1; -- id=6
UPDATE product SET productName = 'باجي كامب', productDescription = '', productCatId = '1', productBuyPrice = '550.00', productSellAllPrice = '900.00', productSellUnitPrice = '900.00', productSellHalfPrice = '900.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00081',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 = '63.64' , 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 = '3';
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 ('وايد كاتش','','1','550','800','800','800','2026-10-08','0','1','0','00079','0','0','0','0','0','550','550','550','550','550','0','45.45','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=4
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', '4', '1.00', '2026-10-08', '1', '0','0000401','800','800','800','550','','0','0','0','0','0','0','0','0','0','0'); -- id=4
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('4', '1', '0', '1', '2026-10-08'); -- id=4
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('4', '1', '0', '0', '4', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=4
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (4, 1,'2026-10-08 19:50:37',1)
                ON DUPLICATE KEY UPDATE productid = 4, edited = 1, sysdate = '2026-10-08 19:50:37', userid = 1; -- id=7
UPDATE product SET productName = 'وايد كاتش', productDescription = '', productCatId = '1', productBuyPrice = '550.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00079',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 = '45.45' , 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 = '4';
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 ('وايد ليج يوزد','','1','450','650','650','650','2026-10-08','0','1','0','00005','0','0','0','0','0','450','450','450','450','450','0','44.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=5
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', '5', '1.00', '2026-10-08', '1', '0','0000501','650','650','650','450','','0','0','0','0','0','0','0','0','0','0'); -- id=5
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('5', '1', '0', '1', '2026-10-08'); -- id=5
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '0', '0', '5', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=5
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (5, 1,'2026-10-08 19:50:37',1)
                ON DUPLICATE KEY UPDATE productid = 5, edited = 1, sysdate = '2026-10-08 19:50:37', userid = 1; -- id=8
UPDATE product SET productName = 'وايد ليج يوزد', productDescription = '', productCatId = '1', productBuyPrice = '450.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00005',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 = '44.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 = '5';
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 ('ريراكسد مايلو','','1','460','650','650','650','2026-10-08','0','1','0','00055','0','0','0','0','0','460','460','460','460','460','0','41.3','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=6
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', '6', '1.00', '2026-10-08', '1', '0','0000601','650','650','650','460','','0','0','0','0','0','0','0','0','0','0'); -- id=6
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('6', '1', '0', '1', '2026-10-08'); -- id=6
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '1', '0', '0', '6', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=6
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (6, 1,'2026-10-08 19:50:37',1)
                ON DUPLICATE KEY UPDATE productid = 6, edited = 1, sysdate = '2026-10-08 19:50:37', userid = 1; -- id=9
UPDATE product SET productName = 'ريراكسد مايلو', productDescription = '', productCatId = '1', productBuyPrice = '460.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00055',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 = '41.3' , 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 = '6';
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 ('ربراكسد ','','1','380','550','550','550','2026-10-08','0','1','0','00003','0','0','0','0','0','380','380','380','380','380','0','44.74','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','1','0','0','0','0','0','0','','380','0','0','0','0','0','0','','','0','0','0','0'); -- id=7
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', '7', '1.00', '2026-10-08', '1', '0','0000701','550','550','550','380','','0','0','0','0','0','0','0','0','0','0'); -- id=7
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('7', '1', '0', '1', '2026-10-08'); -- id=7
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '1', '0', '0', '7', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=7
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (7, 1,'2026-10-08 19:50:37',1)
                ON DUPLICATE KEY UPDATE productid = 7, edited = 1, sysdate = '2026-10-08 19:50:37', userid = 1; -- id=10
UPDATE product SET productName = 'ربراكسد ', productDescription = '', productCatId = '1', productBuyPrice = '380.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00003',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 = '44.74' , 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='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',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 = '7';
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 ('وابد جدبد','','1','400','600','600','600','2026-10-08','0','1','0','00006','0','0','0','0','0','400','400','400','400','400','0','50','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=8
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', '8', '1.00', '2026-10-08', '1', '0','0000801','600','600','600','400','','0','0','0','0','0','0','0','0','0','0'); -- id=8
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('8', '1', '0', '1', '2026-10-08'); -- id=8
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('8', '1', '0', '0', '8', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=8
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (8, 1,'2026-10-08 19:50:37',1)
                ON DUPLICATE KEY UPDATE productid = 8, edited = 1, sysdate = '2026-10-08 19:50:37', userid = 1; -- id=11
UPDATE product SET productName = 'وابد جدبد', productDescription = '', productCatId = '1', productBuyPrice = '400.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00006',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 = '50' , 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 = '8';
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 ('وابد بالون جديد','','1','500','800','800','800','2026-10-08','0','1','0','00062','0','0','0','0','0','500','500','500','500','500','0','60','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=9
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', '9', '1.00', '2026-10-08', '1', '0','0000901','800','800','800','500','','0','0','0','0','0','0','0','0','0','0'); -- id=9
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('9', '1', '0', '1', '2026-10-08'); -- id=9
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '1', '0', '0', '9', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=9
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (9, 1,'2026-10-08 19:50:37',1)
                ON DUPLICATE KEY UPDATE productid = 9, edited = 1, sysdate = '2026-10-08 19:50:37', userid = 1; -- id=12
UPDATE product SET productName = 'وابد بالون جديد', productDescription = '', productCatId = '1', productBuyPrice = '500.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00062',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 = '60' , 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 = '9';
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 ('وايد مايلو','','1','470','750','750','750','2026-10-08','0','1','0','00069','0','0','0','0','0','470','470','470','470','470','0','59.57','0','0','.','0','0','0','470','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','470','470','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','470','0','0','0','0','0','0','','','0','0','0','0'); -- id=10
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', '10', '1.00', '2026-10-08', '1', '0','0001001','750','750','750','470','','0','0','0','0','0','0','0','0','0','0'); -- id=10
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('10', '1', '0', '1', '2026-10-08'); -- id=10
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '1', '0', '0', '10', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=10
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (10, 1,'2026-10-08 19:50:37',1)
                ON DUPLICATE KEY UPDATE productid = 10, edited = 1, sysdate = '2026-10-08 19:50:37', userid = 1; -- id=13
UPDATE product SET productName = 'وايد مايلو', productDescription = '', productCatId = '1', productBuyPrice = '470.00', productSellAllPrice = '750.00', productSellUnitPrice = '750.00', productSellHalfPrice = '750.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00069',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '470',lastbuyprice_withDiscount = '470',meanbuyprice = '470',meanbuyprice_withDiscount = '470' , productbuypricereal = '470' , buypricereal_precentage = '0' , buytotal_precentage = '59.57' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='470',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='470',meanbuyprice_withTax='470',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='470',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '10';
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 ('ريراكسد عرض','','1','300','400','400','400','2026-10-08','0','1','0','00013','0','0','0','0','0','300','300','300','300','300','0','33.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','1','0','0','0','0','0','0','','300','0','0','0','0','0','0','','','0','0','0','0'); -- id=11
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', '11', '1.00', '2026-10-08', '1', '0','0001101','400','400','400','300','','0','0','0','0','0','0','0','0','0','0'); -- id=11
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('11', '1', '0', '1', '2026-10-08'); -- id=11
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('11', '1', '0', '0', '11', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=11
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (11, 1,'2026-10-08 19:50:37',1)
                ON DUPLICATE KEY UPDATE productid = 11, edited = 1, sysdate = '2026-10-08 19:50:37', userid = 1; -- id=14
UPDATE product SET productName = 'ريراكسد عرض', productDescription = '', productCatId = '1', productBuyPrice = '300.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00013',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 = '33.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='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 = '11';
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 ('بنطلون اسلم','','1','400','600','600','600','2026-10-08','0','1','0','00001','0','0','0','0','0','400','400','400','400','400','0','50','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=12
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', '12', '1.00', '2026-10-08', '1', '0','0001201','600','600','600','400','','0','0','0','0','0','0','0','0','0','0'); -- id=12
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('12', '1', '0', '1', '2026-10-08'); -- id=12
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('12', '1', '0', '0', '12', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=12
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (12, 1,'2026-10-08 19:50:37',1)
                ON DUPLICATE KEY UPDATE productid = 12, edited = 1, sysdate = '2026-10-08 19:50:37', userid = 1; -- id=15
UPDATE product SET productName = 'بنطلون اسلم', productDescription = '', productCatId = '1', productBuyPrice = '400.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00001',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 = '50' , 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 = '12';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:20:39";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:50:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:50:39', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=108
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:20:46";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:50:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:50:46', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=109
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:20:53";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:50:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:50:53', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=110
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:21:11";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:51:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:51:11', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=111
UPDATE productunit SET proUnitSellAllPrice  = 750 * productnumber  WHERE productid = 2;
UPDATE product SET productName = 'بولو خريفي', productDescription = '', productCatId = '4', productBuyPrice = '460.00', productSellAllPrice = '750', productSellUnitPrice = '0.00', productSellHalfPrice = '0.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '104',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '0.00',lastbuyprice_withDiscount = '0',meanbuyprice = '230.00',meanbuyprice_withDiscount = '230' , 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='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='230',meanbuyprice_withTax='230',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 = '2';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (2, 1,'2026-10-08 19:51:11',1)
                ON DUPLICATE KEY UPDATE productid = 2, edited = 1, sysdate = '2026-10-08 19:51:11', userid = 1; -- id=2
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:28:14";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:58:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:58:14', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=add'); -- id=112
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 ('تي حق','','3','200','250','250','250','2026-10-08','0','1','0','00070','0','0','0','0','0','200','200','200','200','200','0','25','0','0','.','0','0','0','200','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','200','200','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','200','0','0','0','0','0','0','','','0','0','0','0'); -- id=13
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', '13', '1.00', '2026-10-08', '1', '0','0001301','250','250','250','200','','0','0','0','0','0','0','0','0','0','0'); -- id=13
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('13', '1', '0', '1', '2026-10-08'); -- id=13
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('13', '1', '0', '0', '13', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=13
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (13, 1,'2026-10-08 19:58:14',1)
                ON DUPLICATE KEY UPDATE productid = 13, edited = 1, sysdate = '2026-10-08 19:58:14', userid = 1; -- id=17
UPDATE product SET productName = 'تي حق', productDescription = '', productCatId = '3', productBuyPrice = '200.00', productSellAllPrice = '250.00', productSellUnitPrice = '250.00', productSellHalfPrice = '250.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00070',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '200',lastbuyprice_withDiscount = '200',meanbuyprice = '200',meanbuyprice_withDiscount = '200' , productbuypricereal = '200' , buypricereal_precentage = '0' , buytotal_precentage = '25' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='200',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='200',meanbuyprice_withTax='200',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='200',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '13';
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','200','250','250','250','2026-10-08','0','1','0','00028','0','0','0','0','0','200','200','200','200','200','0','25','0','0','.','0','0','0','200','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','200','200','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','200','0','0','0','0','0','0','','','0','0','0','0'); -- id=14
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', '14', '1.00', '2026-10-08', '1', '0','0001401','250','250','250','200','','0','0','0','0','0','0','0','0','0','0'); -- id=14
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('14', '1', '0', '1', '2026-10-08'); -- id=14
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('14', '1', '0', '0', '14', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=14
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (14, 1,'2026-10-08 19:58:14',1)
                ON DUPLICATE KEY UPDATE productid = 14, edited = 1, sysdate = '2026-10-08 19:58:14', userid = 1; -- id=18
UPDATE product SET productName = 'تي اوسكا', productDescription = '', productCatId = '3', productBuyPrice = '200.00', productSellAllPrice = '250.00', productSellUnitPrice = '250.00', productSellHalfPrice = '250.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00028',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '200',lastbuyprice_withDiscount = '200',meanbuyprice = '200',meanbuyprice_withDiscount = '200' , productbuypricereal = '200' , buypricereal_precentage = '0' , buytotal_precentage = '25' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='200',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='200',meanbuyprice_withTax='200',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='200',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '14';
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','200','250','250','250','2026-10-08','0','1','0','00051','0','0','0','0','0','200','200','200','200','200','0','25','0','0','.','0','0','0','200','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','200','200','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','200','0','0','0','0','0','0','','','0','0','0','0'); -- id=15
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', '15', '1.00', '2026-10-08', '1', '0','0001501','250','250','250','200','','0','0','0','0','0','0','0','0','0','0'); -- id=15
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('15', '1', '0', '1', '2026-10-08'); -- id=15
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('15', '1', '0', '0', '15', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=15
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (15, 1,'2026-10-08 19:58:14',1)
                ON DUPLICATE KEY UPDATE productid = 15, edited = 1, sysdate = '2026-10-08 19:58:14', userid = 1; -- id=19
UPDATE product SET productName = 'تي بوكس عبده', productDescription = '', productCatId = '3', productBuyPrice = '200.00', productSellAllPrice = '250.00', productSellUnitPrice = '250.00', productSellHalfPrice = '250.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00051',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '200',lastbuyprice_withDiscount = '200',meanbuyprice = '200',meanbuyprice_withDiscount = '200' , productbuypricereal = '200' , buypricereal_precentage = '0' , buytotal_precentage = '25' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='200',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='200',meanbuyprice_withTax='200',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='200',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '15';
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','150','350','350','350','2026-10-08','0','1','0','00017','0','0','0','0','0','150','150','150','150','150','0','133.33','0','0','.','0','0','0','150','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','150','150','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','150','0','0','0','0','0','0','','','0','0','0','0'); -- id=16
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', '16', '1.00', '2026-10-08', '1', '0','0001601','350','350','350','150','','0','0','0','0','0','0','0','0','0','0'); -- id=16
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('16', '1', '0', '1', '2026-10-08'); -- id=16
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('16', '1', '0', '0', '16', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=16
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (16, 1,'2026-10-08 19:58:14',1)
                ON DUPLICATE KEY UPDATE productid = 16, edited = 1, sysdate = '2026-10-08 19:58:14', userid = 1; -- id=20
UPDATE product SET productName = 'بيزك', productDescription = '', productCatId = '3', productBuyPrice = '150.00', productSellAllPrice = '350.00', productSellUnitPrice = '350.00', productSellHalfPrice = '350.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00017',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '150',lastbuyprice_withDiscount = '150',meanbuyprice = '150',meanbuyprice_withDiscount = '150' , productbuypricereal = '150' , buypricereal_precentage = '0' , buytotal_precentage = '133.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='150',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='150',meanbuyprice_withTax='150',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='150',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '16';
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','380','500','500','500','2026-10-08','0','1','0','00057','0','0','0','0','0','380','380','380','380','380','0','31.58','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','1','0','0','0','0','0','0','','380','0','0','0','0','0','0','','','0','0','0','0'); -- id=17
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', '17', '1.00', '2026-10-08', '1', '0','0001701','500','500','500','380','','0','0','0','0','0','0','0','0','0','0'); -- id=17
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('17', '1', '0', '1', '2026-10-08'); -- id=17
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('17', '1', '0', '0', '17', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=17
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (17, 1,'2026-10-08 19:58:14',1)
                ON DUPLICATE KEY UPDATE productid = 17, edited = 1, sysdate = '2026-10-08 19:58:14', userid = 1; -- id=21
UPDATE product SET productName = 'بولو لياقه قميص', productDescription = '', productCatId = '3', productBuyPrice = '380.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00057',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 = '31.58' , 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='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',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 = '17';
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','375','650','650','650','2026-10-08','0','1','0','00047','0','0','0','0','0','375','375','375','375','375','0','73.33','0','0','.','0','0','0','375','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','375','375','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','375','0','0','0','0','0','0','','','0','0','0','0'); -- id=18
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', '18', '1.00', '2026-10-08', '1', '0','0001801','650','650','650','375','','0','0','0','0','0','0','0','0','0','0'); -- id=18
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('18', '1', '0', '1', '2026-10-08'); -- id=18
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('18', '1', '0', '0', '18', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=18
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (18, 1,'2026-10-08 19:58:14',1)
                ON DUPLICATE KEY UPDATE productid = 18, edited = 1, sysdate = '2026-10-08 19:58:14', userid = 1; -- id=22
UPDATE product SET productName = 'تريكو بولو', productDescription = '', productCatId = '3', productBuyPrice = '375.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00047',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '375',lastbuyprice_withDiscount = '375',meanbuyprice = '375',meanbuyprice_withDiscount = '375' , productbuypricereal = '375' , buypricereal_precentage = '0' , buytotal_precentage = '73.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='375',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='375',meanbuyprice_withTax='375',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='375',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '18';
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','150','200','200','200','2026-10-08','0','1','0','00101','0','0','0','0','0','150','150','150','150','150','0','33.33','0','0','.','0','0','0','150','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','150','150','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','150','0','0','0','0','0','0','','','0','0','0','0'); -- id=19
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', '19', '1.00', '2026-10-08', '1', '0','0001901','200','200','200','150','','0','0','0','0','0','0','0','0','0','0'); -- id=19
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('19', '1', '0', '1', '2026-10-08'); -- id=19
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('19', '1', '0', '0', '19', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=19
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (19, 1,'2026-10-08 19:58:14',1)
                ON DUPLICATE KEY UPDATE productid = 19, edited = 1, sysdate = '2026-10-08 19:58:14', userid = 1; -- id=23
UPDATE product SET productName = 'تي عرض', productDescription = '', productCatId = '3', productBuyPrice = '150.00', productSellAllPrice = '200.00', productSellUnitPrice = '200.00', productSellHalfPrice = '200.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00101',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '150',lastbuyprice_withDiscount = '150',meanbuyprice = '150',meanbuyprice_withDiscount = '150' , productbuypricereal = '150' , buypricereal_precentage = '0' , buytotal_precentage = '33.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='150',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='150',meanbuyprice_withTax='150',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='150',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '19';
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','500','550','550','550','2026-10-08','0','1','0','00041','0','0','0','0','0','500','500','500','500','500','0','10','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=20
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', '20', '1.00', '2026-10-08', '1', '0','0002001','550','550','550','500','','0','0','0','0','0','0','0','0','0','0'); -- id=20
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('20', '1', '0', '1', '2026-10-08'); -- id=20
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('20', '1', '0', '0', '20', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=20
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (20, 1,'2026-10-08 19:58:14',1)
                ON DUPLICATE KEY UPDATE productid = 20, edited = 1, sysdate = '2026-10-08 19:58:14', userid = 1; -- id=24
UPDATE product SET productName = 'بولو مستورد', productDescription = '', productCatId = '3', productBuyPrice = '500.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00041',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 = '10' , 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 = '20';
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','250','350','350','350','2026-10-08','0','1','0','00018','0','0','0','0','0','250','250','250','250','250','0','40','0','0','.','0','0','0','250','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','250','250','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','250','0','0','0','0','0','0','','','0','0','0','0'); -- id=21
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', '21', '1.00', '2026-10-08', '1', '0','0002101','350','350','350','250','','0','0','0','0','0','0','0','0','0','0'); -- id=21
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('21', '1', '0', '1', '2026-10-08'); -- id=21
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('21', '1', '0', '0', '21', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=21
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (21, 1,'2026-10-08 19:58:14',1)
                ON DUPLICATE KEY UPDATE productid = 21, edited = 1, sysdate = '2026-10-08 19:58:14', userid = 1; -- id=25
UPDATE product SET productName = 'تانك توب', productDescription = '', productCatId = '3', productBuyPrice = '250.00', productSellAllPrice = '350.00', productSellUnitPrice = '350.00', productSellHalfPrice = '350.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00018',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '250',lastbuyprice_withDiscount = '250',meanbuyprice = '250',meanbuyprice_withDiscount = '250' , productbuypricereal = '250' , buypricereal_precentage = '0' , buytotal_precentage = '40' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='250',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='250',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='250',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '21';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:28:16";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 19:58:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 19:58:16', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=113
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:31:34";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:01:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:01:34', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=add'); -- id=114
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 ('بوكسر','','8','260','450','450','450','2026-10-08','0','1','0','00030','0','0','0','0','0','260','260','260','260','260','0','73.08','0','0','.','0','0','0','260','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','260','260','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','260','0','0','0','0','0','0','','','0','0','0','0'); -- id=22
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', '22', '1.00', '2026-10-08', '1', '0','0002201','450','450','450','260','','0','0','0','0','0','0','0','0','0','0'); -- id=22
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('22', '1', '0', '1', '2026-10-08'); -- id=22
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('22', '1', '0', '0', '22', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=22
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (22, 1,'2026-10-08 20:01:34',1)
                ON DUPLICATE KEY UPDATE productid = 22, edited = 1, sysdate = '2026-10-08 20:01:34', userid = 1; -- id=26
UPDATE product SET productName = 'بوكسر', productDescription = '', productCatId = '8', productBuyPrice = '260.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00030',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '260',lastbuyprice_withDiscount = '260',meanbuyprice = '260',meanbuyprice_withDiscount = '260' , productbuypricereal = '260' , buypricereal_precentage = '0' , buytotal_precentage = '73.08' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='260',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='260',meanbuyprice_withTax='260',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='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 = '22';
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 ('بنص','','8','300','400','400','400','2026-10-08','0','1','0','00056','0','0','0','0','0','300','300','300','300','300','0','33.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','1','0','0','0','0','0','0','','300','0','0','0','0','0','0','','','0','0','0','0'); -- id=23
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', '23', '1.00', '2026-10-08', '1', '0','0002301','400','400','400','300','','0','0','0','0','0','0','0','0','0','0'); -- id=23
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('23', '1', '0', '1', '2026-10-08'); -- id=23
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('23', '1', '0', '0', '23', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=23
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (23, 1,'2026-10-08 20:01:34',1)
                ON DUPLICATE KEY UPDATE productid = 23, edited = 1, sysdate = '2026-10-08 20:01:34', userid = 1; -- id=27
UPDATE product SET productName = 'بنص', productDescription = '', productCatId = '8', productBuyPrice = '300.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00056',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 = '33.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='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 = '23';
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 ('سلبر بنص','','8','400','600','600','600','2026-10-08','0','1','0','00074','0','0','0','0','0','400','400','400','400','400','0','50','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=24
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', '24', '1.00', '2026-10-08', '1', '0','0002401','600','600','600','400','','0','0','0','0','0','0','0','0','0','0'); -- id=24
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('24', '1', '0', '1', '2026-10-08'); -- id=24
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('24', '1', '0', '0', '24', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=24
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (24, 1,'2026-10-08 20:01:34',1)
                ON DUPLICATE KEY UPDATE productid = 24, edited = 1, sysdate = '2026-10-08 20:01:34', userid = 1; -- id=28
UPDATE product SET productName = 'سلبر بنص', productDescription = '', productCatId = '8', productBuyPrice = '400.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00074',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 = '50' , 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 = '24';
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','','8','350','450','450','450','2026-10-08','0','1','0','00094','0','0','0','0','0','350','350','350','350','350','0','28.57','0','0','.','0','0','0','350','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','350','350','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','350','0','0','0','0','0','0','','','0','0','0','0'); -- id=25
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', '25', '1.00', '2026-10-08', '1', '0','0002501','450','450','450','350','','0','0','0','0','0','0','0','0','0','0'); -- id=25
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('25', '1', '0', '1', '2026-10-08'); -- id=25
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('25', '1', '0', '0', '25', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=25
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (25, 1,'2026-10-08 20:01:34',1)
                ON DUPLICATE KEY UPDATE productid = 25, edited = 1, sysdate = '2026-10-08 20:01:34', userid = 1; -- id=29
UPDATE product SET productName = 'سلبر 450', productDescription = '', productCatId = '8', productBuyPrice = '350.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00094',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '350',lastbuyprice_withDiscount = '350',meanbuyprice = '350',meanbuyprice_withDiscount = '350' , productbuypricereal = '350' , buypricereal_precentage = '0' , buytotal_precentage = '28.57' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='350',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='350',meanbuyprice_withTax='350',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='350',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '25';
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 ('شراب','','8','25','40','40','40','2026-10-08','0','1','0','00067','0','0','0','0','0','25','25','25','25','25','0','60','0','0','.','0','0','0','25','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','25','25','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','25','0','0','0','0','0','0','','','0','0','0','0'); -- id=26
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', '26', '1.00', '2026-10-08', '1', '0','0002601','40','40','40','25','','0','0','0','0','0','0','0','0','0','0'); -- id=26
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('26', '1', '0', '1', '2026-10-08'); -- id=26
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('26', '1', '0', '0', '26', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=26
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (26, 1,'2026-10-08 20:01:34',1)
                ON DUPLICATE KEY UPDATE productid = 26, edited = 1, sysdate = '2026-10-08 20:01:34', userid = 1; -- id=30
UPDATE product SET productName = 'شراب', productDescription = '', productCatId = '8', productBuyPrice = '25.00', productSellAllPrice = '40.00', productSellUnitPrice = '40.00', productSellHalfPrice = '40.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00067',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '25',lastbuyprice_withDiscount = '25',meanbuyprice = '25',meanbuyprice_withDiscount = '25' , productbuypricereal = '25' , buypricereal_precentage = '0' , buytotal_precentage = '60' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='25',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='25',meanbuyprice_withTax='25',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='25',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '26';
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 ('شراب وسط','','8','31','50','50','50','2026-10-08','0','1','0','00075','0','0','0','0','0','31','31','31','31','31','0','61.29','0','0','.','0','0','0','31','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','31','31','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','31','0','0','0','0','0','0','','','0','0','0','0'); -- id=27
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', '27', '1.00', '2026-10-08', '1', '0','0002701','50','50','50','31','','0','0','0','0','0','0','0','0','0','0'); -- id=27
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('27', '1', '0', '1', '2026-10-08'); -- id=27
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('27', '1', '0', '0', '27', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=27
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (27, 1,'2026-10-08 20:01:34',1)
                ON DUPLICATE KEY UPDATE productid = 27, edited = 1, sysdate = '2026-10-08 20:01:34', userid = 1; -- id=31
UPDATE product SET productName = 'شراب وسط', productDescription = '', productCatId = '8', productBuyPrice = '31.00', productSellAllPrice = '50.00', productSellUnitPrice = '50.00', productSellHalfPrice = '50.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00075',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '31',lastbuyprice_withDiscount = '31',meanbuyprice = '31',meanbuyprice_withDiscount = '31' , productbuypricereal = '31' , buypricereal_precentage = '0' , buytotal_precentage = '61.29' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='31',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='31',meanbuyprice_withTax='31',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='31',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '27';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:31:36";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:01:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:01:36', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=115
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:33:16";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:03:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:03:16', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=add'); -- id=116
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 ('جاكت جينز 1160','','5','700','950','950','950','2026-10-08','0','1','0','00102','0','0','0','0','0','700','700','700','700','700','0','35.71','0','0','.','0','0','0','700','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','700','700','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','700','0','0','0','0','0','0','','','0','0','0','0'); -- id=28
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', '28', '1.00', '2026-10-08', '1', '0','0002801','950','950','950','700','','0','0','0','0','0','0','0','0','0','0'); -- id=28
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('28', '1', '0', '1', '2026-10-08'); -- id=28
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('28', '1', '0', '0', '28', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=28
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (28, 1,'2026-10-08 20:03:16',1)
                ON DUPLICATE KEY UPDATE productid = 28, edited = 1, sysdate = '2026-10-08 20:03:16', userid = 1; -- id=32
UPDATE product SET productName = 'جاكت جينز 1160', productDescription = '', productCatId = '5', productBuyPrice = '700.00', productSellAllPrice = '950.00', productSellUnitPrice = '950.00', productSellHalfPrice = '950.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00102',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '700',lastbuyprice_withDiscount = '700',meanbuyprice = '700',meanbuyprice_withDiscount = '700' , productbuypricereal = '700' , buypricereal_precentage = '0' , buytotal_precentage = '35.71' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='700',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='700',meanbuyprice_withTax='700',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='700',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '28';
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 ('جاكت جينز 1144','','5','700','950','950','950','2026-10-08','0','1','0','00103','0','0','0','0','0','700','700','700','700','700','0','35.71','0','0','.','0','0','0','700','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','700','700','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','700','0','0','0','0','0','0','','','0','0','0','0'); -- id=29
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', '29', '1.00', '2026-10-08', '1', '0','0002901','950','950','950','700','','0','0','0','0','0','0','0','0','0','0'); -- id=29
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('29', '1', '0', '1', '2026-10-08'); -- id=29
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('29', '1', '0', '0', '29', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=29
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (29, 1,'2026-10-08 20:03:16',1)
                ON DUPLICATE KEY UPDATE productid = 29, edited = 1, sysdate = '2026-10-08 20:03:16', userid = 1; -- id=33
UPDATE product SET productName = 'جاكت جينز 1144', productDescription = '', productCatId = '5', productBuyPrice = '700.00', productSellAllPrice = '950.00', productSellUnitPrice = '950.00', productSellHalfPrice = '950.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00103',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '700',lastbuyprice_withDiscount = '700',meanbuyprice = '700',meanbuyprice_withDiscount = '700' , productbuypricereal = '700' , buypricereal_precentage = '0' , buytotal_precentage = '35.71' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='700',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='700',meanbuyprice_withTax='700',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='700',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '29';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:33:18";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:03:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:03:18', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=117
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:37:06";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:07:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:07:06', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=add'); -- id=118
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','550','750','750','750','2026-10-08','0','1','0','00096','0','0','0','0','0','550','550','550','550','550','0','36.36','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=30
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', '30', '1.00', '2026-10-08', '1', '0','0003001','750','750','750','550','','0','0','0','0','0','0','0','0','0','0'); -- id=30
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('30', '1', '0', '1', '2026-10-08'); -- id=30
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('30', '1', '0', '0', '30', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=30
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (30, 1,'2026-10-08 20:07:06',1)
                ON DUPLICATE KEY UPDATE productid = 30, edited = 1, sysdate = '2026-10-08 20:07:06', userid = 1; -- id=34
UPDATE product SET productName = 'وايد باجي عبده', productDescription = '', productCatId = '2', productBuyPrice = '550.00', productSellAllPrice = '750.00', productSellUnitPrice = '750.00', productSellHalfPrice = '750.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00096',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 = '36.36' , 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 = '30';
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','440','650','650','650','2026-10-08','0','1','0','00042','0','0','0','0','0','440','440','440','440','440','0','47.73','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=31
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', '31', '1.00', '2026-10-08', '1', '0','0003101','650','650','650','440','','0','0','0','0','0','0','0','0','0','0'); -- id=31
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('31', '1', '0', '1', '2026-10-08'); -- id=31
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('31', '1', '0', '0', '31', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=31
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (31, 1,'2026-10-08 20:07:06',1)
                ON DUPLICATE KEY UPDATE productid = 31, edited = 1, sysdate = '2026-10-08 20:07:06', userid = 1; -- id=35
UPDATE product SET productName = 'وايد بلتوان', productDescription = '', productCatId = '2', productBuyPrice = '440.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00042',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 = '47.73' , 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 = '31';
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','550','750','750','750','2026-10-08','0','1','0','00010','0','0','0','0','0','550','550','550','550','550','0','36.36','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=32
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', '32', '1.00', '2026-10-08', '1', '0','0003201','750','750','750','550','','0','0','0','0','0','0','0','0','0','0'); -- id=32
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('32', '1', '0', '1', '2026-10-08'); -- id=32
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('32', '1', '0', '0', '32', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=32
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (32, 1,'2026-10-08 20:07:06',1)
                ON DUPLICATE KEY UPDATE productid = 32, edited = 1, sysdate = '2026-10-08 20:07:06', userid = 1; -- id=36
UPDATE product SET productName = 'شروال جبردين مستورد', productDescription = '', productCatId = '2', productBuyPrice = '550.00', productSellAllPrice = '750.00', productSellUnitPrice = '750.00', productSellHalfPrice = '750.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00010',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 = '36.36' , 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 = '32';
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','450','650','650','650','2026-10-08','0','1','0','00008','0','0','0','0','0','450','450','450','450','450','0','44.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=33
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', '33', '1.00', '2026-10-08', '1', '0','0003301','650','650','650','450','','0','0','0','0','0','0','0','0','0','0'); -- id=33
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('33', '1', '0', '1', '2026-10-08'); -- id=33
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('33', '1', '0', '0', '33', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=33
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (33, 1,'2026-10-08 20:07:06',1)
                ON DUPLICATE KEY UPDATE productid = 33, edited = 1, sysdate = '2026-10-08 20:07:06', userid = 1; -- id=37
UPDATE product SET productName = 'شروال مستورد', productDescription = '', productCatId = '2', productBuyPrice = '450.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00008',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 = '44.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 = '33';
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','','2','400','550','550','550','2026-10-08','0','1','0','00083','0','0','0','0','0','400','400','400','400','400','0','37.5','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=34
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', '34', '1.00', '2026-10-08', '1', '0','0003401','550','550','550','400','','0','0','0','0','0','0','0','0','0','0'); -- id=34
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('34', '1', '0', '1', '2026-10-08'); -- id=34
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('34', '1', '0', '0', '34', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=34
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (34, 1,'2026-10-08 20:07:06',1)
                ON DUPLICATE KEY UPDATE productid = 34, edited = 1, sysdate = '2026-10-08 20:07:06', userid = 1; -- id=38
UPDATE product SET productName = 'شروال 550', productDescription = '', productCatId = '2', productBuyPrice = '400.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00083',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 = '37.5' , 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 = '34';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:37:08";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:07:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:07:08', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=119
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:37:16";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:07:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 20:07:16', '1', 'o.royalgt4.com:443/erp/controllers/productCatController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php'); -- id=120
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:37:40";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:07:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 20:07:40', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=121
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-08','','0', '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=9
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (9, 1,'2026-10-08 20:07:40',1)
                ON DUPLICATE KEY UPDATE catid = 9, edited = 1, sysdate = '2026-10-08 20:07:40', userid = 1; -- id=9
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '9', '1', '2026-10-08', '1', '0'); -- id=9
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:37:40";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:07:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 20:07:40', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=122
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:37:41";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:07:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 20:07:41', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=123
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:37:43";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:07:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:07:43', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=124
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:38:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:08:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:08:20', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=add'); -- id=125
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 ('اولد ماني','','9','550','850','850','850','2026-10-08','0','1','0','00007','0','0','0','0','0','550','550','550','550','550','0','54.55','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=35
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', '35', '1.00', '2026-10-08', '1', '0','0003501','850','850','850','550','','0','0','0','0','0','0','0','0','0','0'); -- id=35
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('35', '1', '0', '1', '2026-10-08'); -- id=35
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('35', '1', '0', '0', '35', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=35
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (35, 1,'2026-10-08 20:08:20',1)
                ON DUPLICATE KEY UPDATE productid = 35, edited = 1, sysdate = '2026-10-08 20:08:20', userid = 1; -- id=39
UPDATE product SET productName = 'اولد ماني', productDescription = '', productCatId = '9', productBuyPrice = '550.00', productSellAllPrice = '850.00', productSellUnitPrice = '850.00', productSellHalfPrice = '850.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00007',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 = '54.55' , 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 = '35';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:38:22";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:08:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:08:22', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=126
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:43:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:13:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:13:05', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=add'); -- id=127
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 ('قميص كم بوكس','','7','550','800','800','800','2026-10-08','0','1','0','00097','0','0','0','0','0','550','550','550','550','550','0','45.45','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=36
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', '36', '1.00', '2026-10-08', '1', '0','0003601','800','800','800','550','','0','0','0','0','0','0','0','0','0','0'); -- id=36
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('36', '1', '0', '1', '2026-10-08'); -- id=36
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('36', '1', '0', '0', '36', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=36
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (36, 1,'2026-10-08 20:13:05',1)
                ON DUPLICATE KEY UPDATE productid = 36, edited = 1, sysdate = '2026-10-08 20:13:05', userid = 1; -- id=40
UPDATE product SET productName = 'قميص كم بوكس', productDescription = '', productCatId = '7', productBuyPrice = '550.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00097',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 = '45.45' , 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 = '36';
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 ('قميص كم بوكس ساده','','7','550','900','900','900','2026-10-08','0','1','0','00099','0','0','0','0','0','550','550','550','550','550','0','63.64','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=37
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', '37', '1.00', '2026-10-08', '1', '0','0003701','900','900','900','550','','0','0','0','0','0','0','0','0','0','0'); -- id=37
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('37', '1', '0', '1', '2026-10-08'); -- id=37
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('37', '1', '0', '0', '37', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=37
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (37, 1,'2026-10-08 20:13:05',1)
                ON DUPLICATE KEY UPDATE productid = 37, edited = 1, sysdate = '2026-10-08 20:13:05', userid = 1; -- id=41
UPDATE product SET productName = 'قميص كم بوكس ساده', productDescription = '', productCatId = '7', productBuyPrice = '550.00', productSellAllPrice = '900.00', productSellUnitPrice = '900.00', productSellHalfPrice = '900.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00099',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 = '63.64' , 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 = '37';
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 ('قميص كاردونيه','','7','400','620','620','620','2026-10-08','0','1','0','00029','0','0','0','0','0','400','400','400','400','400','0','55','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=38
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', '38', '1.00', '2026-10-08', '1', '0','0003801','620','620','620','400','','0','0','0','0','0','0','0','0','0','0'); -- id=38
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('38', '1', '0', '1', '2026-10-08'); -- id=38
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('38', '1', '0', '0', '38', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=38
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (38, 1,'2026-10-08 20:13:05',1)
                ON DUPLICATE KEY UPDATE productid = 38, edited = 1, sysdate = '2026-10-08 20:13:05', userid = 1; -- id=42
UPDATE product SET productName = 'قميص كاردونيه', productDescription = '', productCatId = '7', productBuyPrice = '400.00', productSellAllPrice = '620.00', productSellUnitPrice = '620.00', productSellHalfPrice = '620.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00029',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 = '55' , 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 = '38';
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 ('قميص اكسفورد','','7','400','600','600','600','2026-10-08','0','1','0','00015','0','0','0','0','0','400','400','400','400','400','0','50','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=39
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', '39', '1.00', '2026-10-08', '1', '0','0003901','600','600','600','400','','0','0','0','0','0','0','0','0','0','0'); -- id=39
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('39', '1', '0', '1', '2026-10-08'); -- id=39
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('39', '1', '0', '0', '39', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=39
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (39, 1,'2026-10-08 20:13:05',1)
                ON DUPLICATE KEY UPDATE productid = 39, edited = 1, sysdate = '2026-10-08 20:13:05', userid = 1; -- id=43
UPDATE product SET productName = 'قميص اكسفورد', productDescription = '', productCatId = '7', productBuyPrice = '400.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00015',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 = '50' , 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 = '39';
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 ('قميص جبردين دوتي','','7','550','750','750','750','2026-10-08','0','1','0','00002','0','0','0','0','0','550','550','550','550','550','0','36.36','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=40
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', '40', '1.00', '2026-10-08', '1', '0','0004001','750','750','750','550','','0','0','0','0','0','0','0','0','0','0'); -- id=40
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('40', '1', '0', '1', '2026-10-08'); -- id=40
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('40', '1', '0', '0', '40', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=40
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (40, 1,'2026-10-08 20:13:05',1)
                ON DUPLICATE KEY UPDATE productid = 40, edited = 1, sysdate = '2026-10-08 20:13:05', userid = 1; -- id=44
UPDATE product SET productName = 'قميص جبردين دوتي', productDescription = '', productCatId = '7', productBuyPrice = '550.00', productSellAllPrice = '750.00', productSellUnitPrice = '750.00', productSellHalfPrice = '750.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00002',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 = '36.36' , 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 = '40';
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 ('قميص ck','','7','450','650','650','650','2026-10-08','0','1','0','00045','0','0','0','0','0','450','450','450','450','450','0','44.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=41
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', '41', '1.00', '2026-10-08', '1', '0','0004101','650','650','650','450','','0','0','0','0','0','0','0','0','0','0'); -- id=41
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('41', '1', '0', '1', '2026-10-08'); -- id=41
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('41', '1', '0', '0', '41', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=41
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (41, 1,'2026-10-08 20:13:05',1)
                ON DUPLICATE KEY UPDATE productid = 41, edited = 1, sysdate = '2026-10-08 20:13:05', userid = 1; -- id=45
UPDATE product SET productName = 'قميص ck', productDescription = '', productCatId = '7', productBuyPrice = '450.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00045',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 = '44.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 = '41';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:43:07";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:13:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:13:07', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=128
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:43:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:13:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:13:50', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=add'); -- id=129
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 ('قميص نص جينز','','6','400','500','500','500','2026-10-08','0','1','0','00065','0','0','0','0','0','400','400','400','400','400','0','25','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','0','0','0','0','0','-1','0','','400','0','0','0','0','0','0','','','0','0','0','0'); -- id=42
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', '42', '1.00', '2026-10-08', '1', '0','0004201','500','500','500','400','','0','0','0','0','0','0','0','0','0','0'); -- id=42
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('42', '1', '0', '1', '2026-10-08'); -- id=42
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('42', '1', '0', '0', '42', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-08','0','0'); -- id=42
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (42, 1,'2026-10-08 20:13:50',1)
                ON DUPLICATE KEY UPDATE productid = 42, edited = 1, sysdate = '2026-10-08 20:13:50', userid = 1; -- id=46
UPDATE product SET productName = 'قميص نص جينز', productDescription = '', productCatId = '6', productBuyPrice = '400.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00065',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 = '25' , 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='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',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 = '42';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:43:52";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:13:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:13:52', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=130
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:46:12";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:16:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:16:12', '1', 'o.royalgt4.com:443/erp/controllers/inventoryController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php'); -- id=131
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:50:38";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:20:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:20:38', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=132
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '35';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('35', '1', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=43
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '550', '550', '2026-10-08', '1', '0', '0', '2026-10-08 20:20:38','اعادة جرد للمنتج : (اولد ماني/بنطلون اولد ماني) فى مخزن : (المخزن الرئيسي) بالكمية : 1','1','0',null,'0','43','inventoryController.php?do=details&id=43'); -- id=1
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1', '382', '550', '','0'); -- id=1
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '550', 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 ('1', '188', '550', '','0'); -- id=1
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-550', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:51:08";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:21:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:21:08', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=133
UPDATE storedetail SET  productquantity = '18', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '3';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('3', '1', '18', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '18', '1', '2026-10-08','0','0'); -- id=44
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '9900', '9900', '2026-10-08', '1', '0', '0', '2026-10-08 20:21:08','اعادة جرد للمنتج : (باجي كامب/بنطلون جينز) فى مخزن : (المخزن الرئيسي) بالكمية : 18','1','0',null,'0','44','inventoryController.php?do=details&id=44'); -- id=2
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('2', '382', '9900', '','0'); -- id=2
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '10450', 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 ('2', '188', '9900', '','0'); -- id=2
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-10450', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:51:21";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:21:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:21:21', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=134
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '23';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('23', '1', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=45
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '300', '300', '2026-10-08', '1', '0', '0', '2026-10-08 20:21:21','اعادة جرد للمنتج : (بنص/اكسسوار) فى مخزن : (المخزن الرئيسي) بالكمية : 1','1','0',null,'0','45','inventoryController.php?do=details&id=45'); -- id=3
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('3', '382', '300', '','0'); -- id=3
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '10750', 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 ('3', '188', '300', '','0'); -- id=3
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-10750', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:51:26";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:21:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:21:26', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=135
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '12';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('12', '1', '4', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '4', '1', '2026-10-08','0','0'); -- id=46
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1600', '1600', '2026-10-08', '1', '0', '0', '2026-10-08 20:21:26','اعادة جرد للمنتج : (بنطلون اسلم/بنطلون جينز) فى مخزن : (المخزن الرئيسي) بالكمية : 4','1','0',null,'0','46','inventoryController.php?do=details&id=46'); -- id=4
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4', '382', '1600', '','0'); -- id=4
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '12350', 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 ('4', '188', '1600', '','0'); -- id=4
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-12350', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:51:39";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:21:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:21:39', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=136
UPDATE storedetail SET  productquantity = '2', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '22';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('22', '1', '2', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '2', '1', '2026-10-08','0','0'); -- id=47
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '520', '520', '2026-10-08', '1', '0', '0', '2026-10-08 20:21:39','اعادة جرد للمنتج : (بوكسر/اكسسوار) فى مخزن : (المخزن الرئيسي) بالكمية : 2','1','0',null,'0','47','inventoryController.php?do=details&id=47'); -- id=5
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('5', '382', '520', '','0'); -- id=5
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '12870', 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 ('5', '188', '520', '','0'); -- id=5
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-12870', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:51:55";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:21:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:21:55', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=137
UPDATE storedetail SET  productquantity = '13', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '2';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('2', '1', '13', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '13', '1', '2026-10-08','0','0'); -- id=48
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:52:27";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:22:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:22:27', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=138
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '17';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('17', '1', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=49
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '380', '380', '2026-10-08', '1', '0', '0', '2026-10-08 20:22:27','اعادة جرد للمنتج : (بولو لياقه قميص/تيشرت صيفي) فى مخزن : (المخزن الرئيسي) بالكمية : 1','1','0',null,'0','49','inventoryController.php?do=details&id=49'); -- id=6
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('6', '382', '380', '','0'); -- id=6
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '13250', 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 ('6', '188', '380', '','0'); -- id=6
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-13250', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:52:57";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:22:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:22:57', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=139
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '20';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('20', '1', '4', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '4', '1', '2026-10-08','0','0'); -- id=50
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2000', '2000', '2026-10-08', '1', '0', '0', '2026-10-08 20:22:57','اعادة جرد للمنتج : (بولو مستورد/تيشرت صيفي) فى مخزن : (المخزن الرئيسي) بالكمية : 4','1','0',null,'0','50','inventoryController.php?do=details&id=50'); -- id=7
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('7', '382', '2000', '','0'); -- id=7
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15250', 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 ('7', '188', '2000', '','0'); -- id=7
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-15250', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:53:02";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:23:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:23:02', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=140
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '16';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('16', '1', '10', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '10', '1', '2026-10-08','0','0'); -- id=51
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1500', '1500', '2026-10-08', '1', '0', '0', '2026-10-08 20:23:02','اعادة جرد للمنتج : (بيزك/تيشرت صيفي) فى مخزن : (المخزن الرئيسي) بالكمية : 10','1','0',null,'0','51','inventoryController.php?do=details&id=51'); -- id=8
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('8', '382', '1500', '','0'); -- id=8
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16750', 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 ('8', '188', '1500', '','0'); -- id=8
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-16750', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:53:12";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:23:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:23:12', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=141
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '21';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('21', '1', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=52
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '250', '250', '2026-10-08', '1', '0', '0', '2026-10-08 20:23:12','اعادة جرد للمنتج : (تانك توب/تيشرت صيفي) فى مخزن : (المخزن الرئيسي) بالكمية : 1','1','0',null,'0','52','inventoryController.php?do=details&id=52'); -- id=9
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('9', '382', '250', '','0'); -- id=9
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17000', 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 ('9', '188', '250', '','0'); -- id=9
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-17000', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:53:28";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:23:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:23:28', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=142
UPDATE storedetail SET  productquantity = '2', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '18';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('18', '1', '2', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '2', '1', '2026-10-08','0','0'); -- id=53
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '750', '750', '2026-10-08', '1', '0', '0', '2026-10-08 20:23:28','اعادة جرد للمنتج : (تريكو بولو/تيشرت صيفي) فى مخزن : (المخزن الرئيسي) بالكمية : 2','1','0',null,'0','53','inventoryController.php?do=details&id=53'); -- id=10
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('10', '382', '750', '','0'); -- id=10
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17750', 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 ('10', '188', '750', '','0'); -- id=10
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-17750', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:53:41";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:23:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:23:41', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=143
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '1';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1', '1', '10', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '10', '1', '2026-10-08','0','0'); -- id=54
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '5500', '5500', '2026-10-08', '1', '0', '0', '2026-10-08 20:23:41','اعادة جرد للمنتج : (تريكو خريفي بوكس/تيشرت خريفي) فى مخزن : (المخزن الرئيسي) بالكمية : 10','1','0',null,'0','54','inventoryController.php?do=details&id=54'); -- id=11
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('11', '382', '5500', '','0'); -- id=11
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '23250', 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 ('11', '188', '5500', '','0'); -- id=11
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-23250', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:53:53";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:23:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:23:53', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=144
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '14';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('14', '1', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=55
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '200', '200', '2026-10-08', '1', '0', '0', '2026-10-08 20:23:53','اعادة جرد للمنتج : (تي اوسكا/تيشرت صيفي) فى مخزن : (المخزن الرئيسي) بالكمية : 1','1','0',null,'0','55','inventoryController.php?do=details&id=55'); -- id=12
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('12', '382', '200', '','0'); -- id=12
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '23450', 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 ('12', '188', '200', '','0'); -- id=12
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-23450', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:54:01";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:24:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:24:01', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=145
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '15';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('15', '1', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=56
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '200', '200', '2026-10-08', '1', '0', '0', '2026-10-08 20:24:01','اعادة جرد للمنتج : (تي بوكس عبده/تيشرت صيفي) فى مخزن : (المخزن الرئيسي) بالكمية : 1','1','0',null,'0','56','inventoryController.php?do=details&id=56'); -- id=13
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('13', '382', '200', '','0'); -- id=13
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '23650', 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 ('13', '188', '200', '','0'); -- id=13
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-23650', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:54:19";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:24:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:24:19', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=146
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '13';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('13', '1', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=57
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '200', '200', '2026-10-08', '1', '0', '0', '2026-10-08 20:24:19','اعادة جرد للمنتج : (تي حق/تيشرت صيفي) فى مخزن : (المخزن الرئيسي) بالكمية : 1','1','0',null,'0','57','inventoryController.php?do=details&id=57'); -- id=14
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('14', '382', '200', '','0'); -- id=14
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '23850', 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 ('14', '188', '200', '','0'); -- id=14
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-23850', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:54:29";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:24:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:24:29', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=147
UPDATE storedetail SET  productquantity = '8', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '19';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('19', '1', '8', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '8', '1', '2026-10-08','0','0'); -- id=58
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1200', '1200', '2026-10-08', '1', '0', '0', '2026-10-08 20:24:29','اعادة جرد للمنتج : (تي عرض/تيشرت صيفي) فى مخزن : (المخزن الرئيسي) بالكمية : 8','1','0',null,'0','58','inventoryController.php?do=details&id=58'); -- id=15
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('15', '382', '1200', '','0'); -- id=15
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '25050', 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 ('15', '188', '1200', '','0'); -- id=15
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-25050', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:55:19";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:25:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:25:19', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=148
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '29';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('29', '1', '10', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '10', '1', '2026-10-08','0','0'); -- id=59
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '7000', '7000', '2026-10-08', '1', '0', '0', '2026-10-08 20:25:19','اعادة جرد للمنتج : (جاكت جينز 1144/جاكت جينز) فى مخزن : (المخزن الرئيسي) بالكمية : 10','1','0',null,'0','59','inventoryController.php?do=details&id=59'); -- id=16
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('16', '382', '7000', '','0'); -- id=16
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '32050', 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 ('16', '188', '7000', '','0'); -- id=16
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-32050', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:55:22";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:25:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:25:22', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=149
UPDATE storedetail SET  productquantity = '9', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '28';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('28', '1', '9', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '9', '1', '2026-10-08','0','0'); -- id=60
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '6300', '6300', '2026-10-08', '1', '0', '0', '2026-10-08 20:25:22','اعادة جرد للمنتج : (جاكت جينز 1160/جاكت جينز) فى مخزن : (المخزن الرئيسي) بالكمية : 9','1','0',null,'0','60','inventoryController.php?do=details&id=60'); -- id=17
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('17', '382', '6300', '','0'); -- id=17
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '38350', 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 ('17', '188', '6300', '','0'); -- id=17
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-38350', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:55:33";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:25:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:25:33', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=150
UPDATE storedetail SET  productquantity = '3', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '7';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '1', '3', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '3', '1', '2026-10-08','0','0'); -- id=61
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1140', '1140', '2026-10-08', '1', '0', '0', '2026-10-08 20:25:33','اعادة جرد للمنتج : (ربراكسد /بنطلون جينز) فى مخزن : (المخزن الرئيسي) بالكمية : 3','1','0',null,'0','61','inventoryController.php?do=details&id=61'); -- id=18
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('18', '382', '1140', '','0'); -- id=18
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '39490', 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 ('18', '188', '1140', '','0'); -- id=18
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-39490', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:55:40";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:25:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:25:40', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=151
UPDATE storedetail SET  productquantity = '8', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '11';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('11', '1', '8', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '8', '1', '2026-10-08','0','0'); -- id=62
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2400', '2400', '2026-10-08', '1', '0', '0', '2026-10-08 20:25:41','اعادة جرد للمنتج : (ريراكسد عرض/بنطلون جينز) فى مخزن : (المخزن الرئيسي) بالكمية : 8','1','0',null,'0','62','inventoryController.php?do=details&id=62'); -- id=19
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('19', '382', '2400', '','0'); -- id=19
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '41890', 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 ('19', '188', '2400', '','0'); -- id=19
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-41890', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:55:56";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:25:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:25:56', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=152
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '6';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '1', '4', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '4', '1', '2026-10-08','0','0'); -- id=63
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1840', '1840', '2026-10-08', '1', '0', '0', '2026-10-08 20:25:56','اعادة جرد للمنتج : (ريراكسد مايلو/بنطلون جينز) فى مخزن : (المخزن الرئيسي) بالكمية : 4','1','0',null,'0','63','inventoryController.php?do=details&id=63'); -- id=20
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('20', '382', '1840', '','0'); -- id=20
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '43730', 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 ('20', '188', '1840', '','0'); -- id=20
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-43730', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:56:03";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:26:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:26:03', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=153
UPDATE storedetail SET  productquantity = '7', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '25';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('25', '1', '7', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '7', '1', '2026-10-08','0','0'); -- id=64
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2450', '2450', '2026-10-08', '1', '0', '0', '2026-10-08 20:26:03','اعادة جرد للمنتج : (سلبر 450/اكسسوار) فى مخزن : (المخزن الرئيسي) بالكمية : 7','1','0',null,'0','64','inventoryController.php?do=details&id=64'); -- id=21
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('21', '382', '2450', '','0'); -- id=21
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '46180', 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 ('21', '188', '2450', '','0'); -- id=21
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-46180', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:56:11";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:26:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:26:11', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=154
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '24';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('24', '1', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=65
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '400', '400', '2026-10-08', '1', '0', '0', '2026-10-08 20:26:11','اعادة جرد للمنتج : (سلبر بنص/اكسسوار) فى مخزن : (المخزن الرئيسي) بالكمية : 1','1','0',null,'0','65','inventoryController.php?do=details&id=65'); -- id=22
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('22', '382', '400', '','0'); -- id=22
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '46580', 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 ('22', '188', '400', '','0'); -- id=22
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-46580', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:56:18";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:26:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:26:18', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=155
UPDATE storedetail SET  productquantity = '3', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '27';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('27', '1', '3', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '3', '1', '2026-10-08','0','0'); -- id=66
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '93', '93', '2026-10-08', '1', '0', '0', '2026-10-08 20:26:18','اعادة جرد للمنتج : (شراب وسط/اكسسوار) فى مخزن : (المخزن الرئيسي) بالكمية : 3','1','0',null,'0','66','inventoryController.php?do=details&id=66'); -- id=23
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('23', '382', '93', '','0'); -- id=23
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '46673', 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 ('23', '188', '93', '','0'); -- id=23
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-46673', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:56:24";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:26:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:26:24', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=156
UPDATE storedetail SET  productquantity = '7', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '26';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('26', '1', '7', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '7', '1', '2026-10-08','0','0'); -- id=67
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '175', '175', '2026-10-08', '1', '0', '0', '2026-10-08 20:26:24','اعادة جرد للمنتج : (شراب/اكسسوار) فى مخزن : (المخزن الرئيسي) بالكمية : 7','1','0',null,'0','67','inventoryController.php?do=details&id=67'); -- id=24
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('24', '382', '175', '','0'); -- id=24
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '46848', 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 ('24', '188', '175', '','0'); -- id=24
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-46848', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:56:34";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:26:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:26:34', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=157
UPDATE storedetail SET  productquantity = '2', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '34';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('34', '1', '2', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '2', '1', '2026-10-08','0','0'); -- id=68
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '800', '800', '2026-10-08', '1', '0', '0', '2026-10-08 20:26:34','اعادة جرد للمنتج : (شروال 550/بنطلون ملتون) فى مخزن : (المخزن الرئيسي) بالكمية : 2','1','0',null,'0','68','inventoryController.php?do=details&id=68'); -- id=25
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('25', '382', '800', '','0'); -- id=25
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '47648', 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 ('25', '188', '800', '','0'); -- id=25
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-47648', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:56:43";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:26:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:26:43', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=158
UPDATE storedetail SET  productquantity = '3', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '32';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('32', '1', '3', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '3', '1', '2026-10-08','0','0'); -- id=69
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1650', '1650', '2026-10-08', '1', '0', '0', '2026-10-08 20:26:43','اعادة جرد للمنتج : (شروال جبردين مستورد/بنطلون ملتون) فى مخزن : (المخزن الرئيسي) بالكمية : 3','1','0',null,'0','69','inventoryController.php?do=details&id=69'); -- id=26
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('26', '382', '1650', '','0'); -- id=26
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '49298', 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 ('26', '188', '1650', '','0'); -- id=26
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-49298', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:56:49";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:26:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:26:49', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=159
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '33';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('33', '1', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=70
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '450', '450', '2026-10-08', '1', '0', '0', '2026-10-08 20:26:49','اعادة جرد للمنتج : (شروال مستورد/بنطلون ملتون) فى مخزن : (المخزن الرئيسي) بالكمية : 1','1','0',null,'0','70','inventoryController.php?do=details&id=70'); -- id=27
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('27', '382', '450', '','0'); -- id=27
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '49748', 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 ('27', '188', '450', '','0'); -- id=27
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-49748', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:56:57";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:26:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:26:57', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=160
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '41';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('41', '1', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=71
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '450', '450', '2026-10-08', '1', '0', '0', '2026-10-08 20:26:57','اعادة جرد للمنتج : (قميص ck/قميص بكم) فى مخزن : (المخزن الرئيسي) بالكمية : 1','1','0',null,'0','71','inventoryController.php?do=details&id=71'); -- id=28
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('28', '382', '450', '','0'); -- id=28
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '50198', 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 ('28', '188', '450', '','0'); -- id=28
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-50198', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:57:03";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:27:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:27:03', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=161
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '39';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('39', '1', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=72
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '400', '400', '2026-10-08', '1', '0', '0', '2026-10-08 20:27:03','اعادة جرد للمنتج : (قميص اكسفورد/قميص بكم) فى مخزن : (المخزن الرئيسي) بالكمية : 1','1','0',null,'0','72','inventoryController.php?do=details&id=72'); -- id=29
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('29', '382', '400', '','0'); -- id=29
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '50598', 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 ('29', '188', '400', '','0'); -- id=29
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-50598', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:57:12";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:27:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:27:12', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=162
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '40';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('40', '1', '4', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '4', '1', '2026-10-08','0','0'); -- id=73
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2200', '2200', '2026-10-08', '1', '0', '0', '2026-10-08 20:27:12','اعادة جرد للمنتج : (قميص جبردين دوتي/قميص بكم) فى مخزن : (المخزن الرئيسي) بالكمية : 4','1','0',null,'0','73','inventoryController.php?do=details&id=73'); -- id=30
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('30', '382', '2200', '','0'); -- id=30
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '52798', 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 ('30', '188', '2200', '','0'); -- id=30
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-52798', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:57:18";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:27:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:27:18', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=163
UPDATE storedetail SET  productquantity = '2', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '38';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('38', '1', '2', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '2', '1', '2026-10-08','0','0'); -- id=74
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '800', '800', '2026-10-08', '1', '0', '0', '2026-10-08 20:27:18','اعادة جرد للمنتج : (قميص كاردونيه/قميص بكم) فى مخزن : (المخزن الرئيسي) بالكمية : 2','1','0',null,'0','74','inventoryController.php?do=details&id=74'); -- id=31
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('31', '382', '800', '','0'); -- id=31
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '53598', 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 ('31', '188', '800', '','0'); -- id=31
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-53598', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:57:26";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:27:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:27:26', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=164
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '37';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('37', '1', '4', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '4', '1', '2026-10-08','0','0'); -- id=75
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2200', '2200', '2026-10-08', '1', '0', '0', '2026-10-08 20:27:26','اعادة جرد للمنتج : (قميص كم بوكس ساده/قميص بكم) فى مخزن : (المخزن الرئيسي) بالكمية : 4','1','0',null,'0','75','inventoryController.php?do=details&id=75'); -- id=32
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('32', '382', '2200', '','0'); -- id=32
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '55798', 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 ('32', '188', '2200', '','0'); -- id=32
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-55798', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:57:39";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:27:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:27:39', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=165
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '36';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('36', '1', '10', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '10', '1', '2026-10-08','0','0'); -- id=76
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '5500', '5500', '2026-10-08', '1', '0', '0', '2026-10-08 20:27:39','اعادة جرد للمنتج : (قميص كم بوكس/قميص بكم) فى مخزن : (المخزن الرئيسي) بالكمية : 10','1','0',null,'0','76','inventoryController.php?do=details&id=76'); -- id=33
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('33', '382', '5500', '','0'); -- id=33
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '61298', 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 ('33', '188', '5500', '','0'); -- id=33
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-61298', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:57:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:27:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:27:50', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=166
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '42';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('42', '1', '10', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '10', '1', '2026-10-08','0','0'); -- id=77
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '4000', '4000', '2026-10-08', '1', '0', '0', '2026-10-08 20:27:50','اعادة جرد للمنتج : (قميص نص جينز/قميص بنص) فى مخزن : (المخزن الرئيسي) بالكمية : 10','1','0',null,'0','77','inventoryController.php?do=details&id=77'); -- id=34
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('34', '382', '4000', '','0'); -- id=34
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '65298', 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 ('34', '188', '4000', '','0'); -- id=34
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-65298', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:57:59";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:27:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:27:59', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=167
UPDATE storedetail SET  productquantity = '6', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '9';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '1', '6', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '6', '1', '2026-10-08','0','0'); -- id=78
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3000', '3000', '2026-10-08', '1', '0', '0', '2026-10-08 20:27:59','اعادة جرد للمنتج : (وابد بالون جديد/بنطلون جينز) فى مخزن : (المخزن الرئيسي) بالكمية : 6','1','0',null,'0','78','inventoryController.php?do=details&id=78'); -- id=35
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('35', '382', '3000', '','0'); -- id=35
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '68298', 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 ('35', '188', '3000', '','0'); -- id=35
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-68298', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:58:06";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:28:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:28:06', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=168
UPDATE storedetail SET  productquantity = '2', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '8';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('8', '1', '2', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '2', '1', '2026-10-08','0','0'); -- id=79
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '800', '800', '2026-10-08', '1', '0', '0', '2026-10-08 20:28:06','اعادة جرد للمنتج : (وابد جدبد/بنطلون جينز) فى مخزن : (المخزن الرئيسي) بالكمية : 2','1','0',null,'0','79','inventoryController.php?do=details&id=79'); -- id=36
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('36', '382', '800', '','0'); -- id=36
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '69098', 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 ('36', '188', '800', '','0'); -- id=36
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-69098', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:58:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:28:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:28:20', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=169
UPDATE storedetail SET  productquantity = '7', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '30';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('30', '1', '7', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '7', '1', '2026-10-08','0','0'); -- id=80
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3850', '3850', '2026-10-08', '1', '0', '0', '2026-10-08 20:28:20','اعادة جرد للمنتج : (وايد باجي عبده/بنطلون ملتون) فى مخزن : (المخزن الرئيسي) بالكمية : 7','1','0',null,'0','80','inventoryController.php?do=details&id=80'); -- id=37
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('37', '382', '3850', '','0'); -- id=37
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '72948', 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 ('37', '188', '3850', '','0'); -- id=37
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-72948', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:58:28";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:28:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:28:28', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=170
UPDATE storedetail SET  productquantity = '3', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '31';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('31', '1', '3', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '3', '1', '2026-10-08','0','0'); -- id=81
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1320', '1320', '2026-10-08', '1', '0', '0', '2026-10-08 20:28:28','اعادة جرد للمنتج : (وايد بلتوان/بنطلون ملتون) فى مخزن : (المخزن الرئيسي) بالكمية : 3','1','0',null,'0','81','inventoryController.php?do=details&id=81'); -- id=38
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('38', '382', '1320', '','0'); -- id=38
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '74268', 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 ('38', '188', '1320', '','0'); -- id=38
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-74268', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:58:35";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:28:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:28:35', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=171
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '4';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('4', '1', '10', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '10', '1', '2026-10-08','0','0'); -- id=82
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '5500', '5500', '2026-10-08', '1', '0', '0', '2026-10-08 20:28:35','اعادة جرد للمنتج : (وايد كاتش/بنطلون جينز) فى مخزن : (المخزن الرئيسي) بالكمية : 10','1','0',null,'0','82','inventoryController.php?do=details&id=82'); -- id=39
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('39', '382', '5500', '','0'); -- id=39
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '79768', 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 ('39', '188', '5500', '','0'); -- id=39
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-79768', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:58:45";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:28:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:28:45', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=172
UPDATE storedetail SET  productquantity = '3', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '5';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '3', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '3', '1', '2026-10-08','0','0'); -- id=83
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1350', '1350', '2026-10-08', '1', '0', '0', '2026-10-08 20:28:45','اعادة جرد للمنتج : (وايد ليج يوزد/بنطلون جينز) فى مخزن : (المخزن الرئيسي) بالكمية : 3','1','0',null,'0','83','inventoryController.php?do=details&id=83'); -- id=40
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('40', '382', '1350', '','0'); -- id=40
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '81118', 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 ('40', '188', '1350', '','0'); -- id=40
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-81118', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:59:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:29:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:29:05', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=173
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 16:59:06";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:29:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-08 20:29:06', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=174
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '10';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '1', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=84
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '470', '470', '2026-10-08', '1', '0', '0', '2026-10-08 20:29:06','اعادة جرد للمنتج : (وايد مايلو/بنطلون جينز) فى مخزن : (المخزن الرئيسي) بالكمية : 1','1','0',null,'0','84','inventoryController.php?do=details&id=84'); -- id=41
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('41', '382', '470', '','0'); -- id=41
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '81588', 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 ('41', '188', '470', '','0'); -- id=41
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-81588', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:01:27";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:31:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 20:31:27', '1', 'o.royalgt4.com:443/erp/controllers/userController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php'); -- id=175
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:04:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:34:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 20:34:20', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=add'); -- id=176
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,treeId) VALUES ('محمد', '123', '3', 'محمد', '2026-10-08', '0', '2', '2' ,'1' ,'1','-1','','','0','0','2','0','0','','1','1','0','','-1,','-1,','2','0','2','0','2','-1,','-1,-1','0','0','1','-1,',''); -- id=2
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:04:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:34:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 20:34:20', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=sucess'); -- id=177
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:04:22";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:34:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 20:34:22', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=show'); -- id=178
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:04:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:34:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 20:34:25', '1', 'o.royalgt4.com:443/erp/controllers/userController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php'); -- id=179
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:06:58";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:36:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 20:36:58', '1', 'addprocat', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=addprocat'); -- id=180
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:07:40";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:37:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-08 20:37:40', '1', 'o.royalgt4.com:443/erp/controllers/storeController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php'); -- id=181
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:07:59";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:37:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-08 20:37:59', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=add'); -- id=182
INSERT INTO store (storeName, nameEn, branchId, addressAr, addressEn, phone, email, storeDate, storeDescription, conditions, userId, treeId, treeIdBetween, webApiId) VALUES ('المتاجر', '', '0', '', '', '', '', '2026-10-08', "", '0', '1', '0', '0', '0'); -- id=4
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('المتاجر', 'المتاجر', 'المتاجر', 'المتاجر', '49', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-08 20:37:59'); -- id=427
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('المتاجر وسيط', 'المتاجر وسيط', 'المتاجر وسيط', 'المتاجر وسيط', '49', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-08 20:37:59'); -- id=428
UPDATE store SET storeName = 'المتاجر', nameEn = '', branchId = '0', addressAr = '', addressEn = '', phone = '', email = '', storeDate = '2026-10-08', storeDescription = "", conditions = '0', userId = '1', treeId = '427', treeIdBetween = '428', updatedAt = CURRENT_TIMESTAMP WHERE storeId = '4';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:07:59";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:37:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-08 20:37:59', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=sucess'); -- id=183
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:08:01";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:38:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-08 20:38:01', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=show'); -- id=184
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:08:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:38:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 20:38:05', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=185
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:13:52";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:43:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 20:43:52', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=186
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:14:52";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:44:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 20:44:52', '1', 'o.royalgt4.com:443/erp/controllers/userController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php'); -- id=187
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:16:18";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:46:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 20:46:18', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=add'); -- id=188
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,treeId) VALUES ('محمدد', '123', '3', 'محمدد', '2026-10-08', '0', '2', '2' ,'1' ,'1','-1','','','0','0','2','0','0','','1','1','0','','-1,','-1,1','-1,2','1','2','0','2','-1,','-1,-1','0','0','1','-1,',''); -- id=3
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:16:19";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:46:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 20:46:19', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=sucess'); -- id=189
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:16:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:46:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 20:46:20', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=show'); -- id=190
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:16:24";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:46:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 20:46:24', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=191
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:28:26";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:58:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 20:58:26', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=add'); -- id=192
BEGIN;
CALL insertUniqueOptNum(1,1,2,20,4,'2026-10-08',1,0, '' , '' ,0,0,0,0,0,'2026-10-08 20:58:26',0,'',0,'','hide',0,@id,@optnum);
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '20';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 20, 0, 0
                    , 500.00, -4, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 500.00,
                        buyQuantity =buyQuantity+-4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=1
UPDATE storemovement SET  buyPricesHistoryBookData = "4*2026-10-08*500.00," WHERE transferproductid = 1;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('20', '1', '4', '1', '1', 'تحويل منتجات من المخزن', 'storemovementController.php', '4', '0', '1', '2026-10-08','0','0'); -- id=85
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('20', '2', '4', '1', '2026-10-08'); -- id=43
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 20, 0, 0
                    , 500.00, 4, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=2
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('20', '2', '4', '0', '1', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '4', '1', '2026-10-08','0','0'); -- id=86
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '28', '9', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=2
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '28';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 28, 0, 0
                    , 700.00, -9, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 700.00,
                        buyQuantity =buyQuantity+-9, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=3
UPDATE storemovement SET  buyPricesHistoryBookData = "9*2026-10-08*700.00," WHERE transferproductid = 2;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('28', '1', '9', '1', '2', 'تحويل منتجات من المخزن', 'storemovementController.php', '9', '0', '1', '2026-10-08','0','0'); -- id=87
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('28', '2', '9', '1', '2026-10-08'); -- id=44
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 28, 0, 0
                    , 700.00, 9, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+9, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=4
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('28', '2', '9', '0', '2', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '9', '1', '2026-10-08','0','0'); -- id=88
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '8', '2', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=3
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '8';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 8, 0, 0
                    , 400.00, -2, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 400.00,
                        buyQuantity =buyQuantity+-2, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=5
UPDATE storemovement SET  buyPricesHistoryBookData = "2*2026-10-08*400.00," WHERE transferproductid = 3;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('8', '1', '2', '1', '3', 'تحويل منتجات من المخزن', 'storemovementController.php', '2', '0', '1', '2026-10-08','0','0'); -- id=89
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('8', '2', '2', '1', '2026-10-08'); -- id=45
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 8, 0, 0
                    , 400.00, 2, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+2, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=6
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('8', '2', '2', '0', '3', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '2', '1', '2026-10-08','0','0'); -- id=90
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '9', '6', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=4
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '9';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 9, 0, 0
                    , 500.00, -6, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 500.00,
                        buyQuantity =buyQuantity+-6, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=7
UPDATE storemovement SET  buyPricesHistoryBookData = "6*2026-10-08*500.00," WHERE transferproductid = 4;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '1', '6', '1', '4', 'تحويل منتجات من المخزن', 'storemovementController.php', '6', '0', '1', '2026-10-08','0','0'); -- id=91
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('9', '2', '6', '1', '2026-10-08'); -- id=46
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 9, 0, 0
                    , 500.00, 6, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+6, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=8
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '2', '6', '0', '4', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '6', '1', '2026-10-08','0','0'); -- id=92
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '10', '1', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=5
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '10';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 10, 0, 0
                    , 470.00, -1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 470.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=9
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2026-10-08*470.00," WHERE transferproductid = 5;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '1', '1', '1', '5', 'تحويل منتجات من المخزن', 'storemovementController.php', '1', '0', '1', '2026-10-08','0','0'); -- id=93
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('10', '2', '1', '1', '2026-10-08'); -- id=47
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 10, 0, 0
                    , 470.00, 1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=10
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '2', '1', '0', '5', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=94
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '21', '1', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=6
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '21';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 21, 0, 0
                    , 250.00, -1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 250.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=11
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2026-10-08*250.00," WHERE transferproductid = 6;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('21', '1', '1', '1', '6', 'تحويل منتجات من المخزن', 'storemovementController.php', '1', '0', '1', '2026-10-08','0','0'); -- id=95
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('21', '2', '1', '1', '2026-10-08'); -- id=48
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 21, 0, 0
                    , 250.00, 1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=12
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('21', '2', '1', '0', '6', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=96
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '22', '2', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=7
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '22';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 22, 0, 0
                    , 260.00, -2, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 260.00,
                        buyQuantity =buyQuantity+-2, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=13
UPDATE storemovement SET  buyPricesHistoryBookData = "2*2026-10-08*260.00," WHERE transferproductid = 7;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('22', '1', '2', '1', '7', 'تحويل منتجات من المخزن', 'storemovementController.php', '2', '0', '1', '2026-10-08','0','0'); -- id=97
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('22', '2', '2', '1', '2026-10-08'); -- id=49
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 22, 0, 0
                    , 260.00, 2, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+2, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=14
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('22', '2', '2', '0', '7', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '2', '1', '2026-10-08','0','0'); -- id=98
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '23', '1', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=8
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '23';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 23, 0, 0
                    , 300.00, -1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 300.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=15
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2026-10-08*300.00," WHERE transferproductid = 8;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('23', '1', '1', '1', '8', 'تحويل منتجات من المخزن', 'storemovementController.php', '1', '0', '1', '2026-10-08','0','0'); -- id=99
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('23', '2', '1', '1', '2026-10-08'); -- id=50
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 23, 0, 0
                    , 300.00, 1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=16
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('23', '2', '1', '0', '8', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=100
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '24', '1', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=9
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '24';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 24, 0, 0
                    , 400.00, -1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 400.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=17
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2026-10-08*400.00," WHERE transferproductid = 9;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('24', '1', '1', '1', '9', 'تحويل منتجات من المخزن', 'storemovementController.php', '1', '0', '1', '2026-10-08','0','0'); -- id=101
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('24', '2', '1', '1', '2026-10-08'); -- id=51
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 24, 0, 0
                    , 400.00, 1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=18
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('24', '2', '1', '0', '9', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=102
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '25', '7', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=10
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '25';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 25, 0, 0
                    , 350.00, -7, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 350.00,
                        buyQuantity =buyQuantity+-7, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=19
UPDATE storemovement SET  buyPricesHistoryBookData = "7*2026-10-08*350.00," WHERE transferproductid = 10;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('25', '1', '7', '1', '10', 'تحويل منتجات من المخزن', 'storemovementController.php', '7', '0', '1', '2026-10-08','0','0'); -- id=103
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('25', '2', '7', '1', '2026-10-08'); -- id=52
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 25, 0, 0
                    , 350.00, 7, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+7, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=20
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('25', '2', '7', '0', '10', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '7', '1', '2026-10-08','0','0'); -- id=104
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '26', '7', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=11
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '26';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 26, 0, 0
                    , 25.00, -7, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 25.00,
                        buyQuantity =buyQuantity+-7, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=21
UPDATE storemovement SET  buyPricesHistoryBookData = "7*2026-10-08*25.00," WHERE transferproductid = 11;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('26', '1', '7', '1', '11', 'تحويل منتجات من المخزن', 'storemovementController.php', '7', '0', '1', '2026-10-08','0','0'); -- id=105
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('26', '2', '7', '1', '2026-10-08'); -- id=53
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 26, 0, 0
                    , 25.00, 7, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+7, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=22
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('26', '2', '7', '0', '11', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '7', '1', '2026-10-08','0','0'); -- id=106
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '27', '3', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=12
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '27';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 27, 0, 0
                    , 31.00, -3, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 31.00,
                        buyQuantity =buyQuantity+-3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=23
UPDATE storemovement SET  buyPricesHistoryBookData = "3*2026-10-08*31.00," WHERE transferproductid = 12;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('27', '1', '3', '1', '12', 'تحويل منتجات من المخزن', 'storemovementController.php', '3', '0', '1', '2026-10-08','0','0'); -- id=107
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('27', '2', '3', '1', '2026-10-08'); -- id=54
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 27, 0, 0
                    , 31.00, 3, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=24
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('27', '2', '3', '0', '12', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '3', '1', '2026-10-08','0','0'); -- id=108
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '11', '8', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=13
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '11';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 11, 0, 0
                    , 300.00, -8, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 300.00,
                        buyQuantity =buyQuantity+-8, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=25
UPDATE storemovement SET  buyPricesHistoryBookData = "8*2026-10-08*300.00," WHERE transferproductid = 13;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('11', '1', '8', '1', '13', 'تحويل منتجات من المخزن', 'storemovementController.php', '8', '0', '1', '2026-10-08','0','0'); -- id=109
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('11', '2', '8', '1', '2026-10-08'); -- id=55
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 11, 0, 0
                    , 300.00, 8, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+8, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=26
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('11', '2', '8', '0', '13', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '8', '1', '2026-10-08','0','0'); -- id=110
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '12', '4', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=14
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '12';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 12, 0, 0
                    , 400.00, -4, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 400.00,
                        buyQuantity =buyQuantity+-4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=27
UPDATE storemovement SET  buyPricesHistoryBookData = "4*2026-10-08*400.00," WHERE transferproductid = 14;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('12', '1', '4', '1', '14', 'تحويل منتجات من المخزن', 'storemovementController.php', '4', '0', '1', '2026-10-08','0','0'); -- id=111
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('12', '2', '4', '1', '2026-10-08'); -- id=56
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 12, 0, 0
                    , 400.00, 4, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=28
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('12', '2', '4', '0', '14', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '4', '1', '2026-10-08','0','0'); -- id=112
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '34', '2', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=15
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '34';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 34, 0, 0
                    , 400.00, -2, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 400.00,
                        buyQuantity =buyQuantity+-2, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=29
UPDATE storemovement SET  buyPricesHistoryBookData = "2*2026-10-08*400.00," WHERE transferproductid = 15;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('34', '1', '2', '1', '15', 'تحويل منتجات من المخزن', 'storemovementController.php', '2', '0', '1', '2026-10-08','0','0'); -- id=113
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('34', '2', '2', '1', '2026-10-08'); -- id=57
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 34, 0, 0
                    , 400.00, 2, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+2, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=30
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('34', '2', '2', '0', '15', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '2', '1', '2026-10-08','0','0'); -- id=114
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '13', '1', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=16
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '13';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 13, 0, 0
                    , 200.00, -1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 200.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=31
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2026-10-08*200.00," WHERE transferproductid = 16;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('13', '1', '1', '1', '16', 'تحويل منتجات من المخزن', 'storemovementController.php', '1', '0', '1', '2026-10-08','0','0'); -- id=115
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('13', '2', '1', '1', '2026-10-08'); -- id=58
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 13, 0, 0
                    , 200.00, 1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=32
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('13', '2', '1', '0', '16', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=116
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '14', '1', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=17
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '14';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 14, 0, 0
                    , 200.00, -1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 200.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=33
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2026-10-08*200.00," WHERE transferproductid = 17;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('14', '1', '1', '1', '17', 'تحويل منتجات من المخزن', 'storemovementController.php', '1', '0', '1', '2026-10-08','0','0'); -- id=117
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('14', '2', '1', '1', '2026-10-08'); -- id=59
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 14, 0, 0
                    , 200.00, 1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=34
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('14', '2', '1', '0', '17', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=118
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '36', '10', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=18
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '36';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 36, 0, 0
                    , 550.00, -10, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 550.00,
                        buyQuantity =buyQuantity+-10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=35
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-08*550.00," WHERE transferproductid = 18;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('36', '1', '10', '1', '18', 'تحويل منتجات من المخزن', 'storemovementController.php', '10', '0', '1', '2026-10-08','0','0'); -- id=119
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('36', '2', '10', '1', '2026-10-08'); -- id=60
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 36, 0, 0
                    , 550.00, 10, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=36
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('36', '2', '10', '0', '18', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-08','0','0'); -- id=120
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '35', '1', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=19
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '35';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 35, 0, 0
                    , 550.00, -1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 550.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=37
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2026-10-08*550.00," WHERE transferproductid = 19;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('35', '1', '1', '1', '19', 'تحويل منتجات من المخزن', 'storemovementController.php', '1', '0', '1', '2026-10-08','0','0'); -- id=121
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('35', '2', '1', '1', '2026-10-08'); -- id=61
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 35, 0, 0
                    , 550.00, 1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=38
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('35', '2', '1', '0', '19', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=122
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '15', '1', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=20
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '15';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 15, 0, 0
                    , 200.00, -1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 200.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=39
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2026-10-08*200.00," WHERE transferproductid = 20;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('15', '1', '1', '1', '20', 'تحويل منتجات من المخزن', 'storemovementController.php', '1', '0', '1', '2026-10-08','0','0'); -- id=123
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('15', '2', '1', '1', '2026-10-08'); -- id=62
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 15, 0, 0
                    , 200.00, 1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=40
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('15', '2', '1', '0', '20', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=124
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '2', '13', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=21
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '2';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 2, 0, 0
                    , 0.00, -13, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 0.00,
                        buyQuantity =buyQuantity+-13, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=41
UPDATE storemovement SET  buyPricesHistoryBookData = "13*2026-10-08*0.00," WHERE transferproductid = 21;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('2', '1', '13', '1', '21', 'تحويل منتجات من المخزن', 'storemovementController.php', '13', '0', '1', '2026-10-08','0','0'); -- id=125
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('2', '2', '13', '1', '2026-10-08'); -- id=63
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 2, 0, 0
                    , 0.00, 13, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+13, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=42
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('2', '2', '13', '0', '21', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '13', '1', '2026-10-08','0','0'); -- id=126
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '37', '4', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=22
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '37';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 37, 0, 0
                    , 550.00, -4, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 550.00,
                        buyQuantity =buyQuantity+-4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=43
UPDATE storemovement SET  buyPricesHistoryBookData = "4*2026-10-08*550.00," WHERE transferproductid = 22;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('37', '1', '4', '1', '22', 'تحويل منتجات من المخزن', 'storemovementController.php', '4', '0', '1', '2026-10-08','0','0'); -- id=127
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('37', '2', '4', '1', '2026-10-08'); -- id=64
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 37, 0, 0
                    , 550.00, 4, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=44
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('37', '2', '4', '0', '22', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '4', '1', '2026-10-08','0','0'); -- id=128
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '38', '2', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=23
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '38';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 38, 0, 0
                    , 400.00, -2, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 400.00,
                        buyQuantity =buyQuantity+-2, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=45
UPDATE storemovement SET  buyPricesHistoryBookData = "2*2026-10-08*400.00," WHERE transferproductid = 23;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('38', '1', '2', '1', '23', 'تحويل منتجات من المخزن', 'storemovementController.php', '2', '0', '1', '2026-10-08','0','0'); -- id=129
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('38', '2', '2', '1', '2026-10-08'); -- id=65
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 38, 0, 0
                    , 400.00, 2, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+2, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=46
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('38', '2', '2', '0', '23', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '2', '1', '2026-10-08','0','0'); -- id=130
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '39', '1', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=24
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '39';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 39, 0, 0
                    , 400.00, -1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 400.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=47
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2026-10-08*400.00," WHERE transferproductid = 24;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('39', '1', '1', '1', '24', 'تحويل منتجات من المخزن', 'storemovementController.php', '1', '0', '1', '2026-10-08','0','0'); -- id=131
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('39', '2', '1', '1', '2026-10-08'); -- id=66
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 39, 0, 0
                    , 400.00, 1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=48
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('39', '2', '1', '0', '24', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=132
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '40', '4', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=25
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '40';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 40, 0, 0
                    , 550.00, -4, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 550.00,
                        buyQuantity =buyQuantity+-4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=49
UPDATE storemovement SET  buyPricesHistoryBookData = "4*2026-10-08*550.00," WHERE transferproductid = 25;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('40', '1', '4', '1', '25', 'تحويل منتجات من المخزن', 'storemovementController.php', '4', '0', '1', '2026-10-08','0','0'); -- id=133
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('40', '2', '4', '1', '2026-10-08'); -- id=67
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 40, 0, 0
                    , 550.00, 4, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=50
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('40', '2', '4', '0', '25', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '4', '1', '2026-10-08','0','0'); -- id=134
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '41', '1', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=26
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '41';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 41, 0, 0
                    , 450.00, -1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 450.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=51
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2026-10-08*450.00," WHERE transferproductid = 26;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('41', '1', '1', '1', '26', 'تحويل منتجات من المخزن', 'storemovementController.php', '1', '0', '1', '2026-10-08','0','0'); -- id=135
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('41', '2', '1', '1', '2026-10-08'); -- id=68
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 41, 0, 0
                    , 450.00, 1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=52
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('41', '2', '1', '0', '26', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=136
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '42', '10', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=27
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '42';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 42, 0, 0
                    , 400.00, -10, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 400.00,
                        buyQuantity =buyQuantity+-10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=53
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-08*400.00," WHERE transferproductid = 27;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('42', '1', '10', '1', '27', 'تحويل منتجات من المخزن', 'storemovementController.php', '10', '0', '1', '2026-10-08','0','0'); -- id=137
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('42', '2', '10', '1', '2026-10-08'); -- id=69
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 42, 0, 0
                    , 400.00, 10, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=54
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('42', '2', '10', '0', '27', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-08','0','0'); -- id=138
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '1', '10', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=28
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '1';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 1, 0, 0
                    , 550.00, -10, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 550.00,
                        buyQuantity =buyQuantity+-10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=55
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-08*550.00," WHERE transferproductid = 28;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1', '1', '10', '1', '28', 'تحويل منتجات من المخزن', 'storemovementController.php', '10', '0', '1', '2026-10-08','0','0'); -- id=139
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1', '2', '10', '1', '2026-10-08'); -- id=70
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 1, 0, 0
                    , 550.00, 10, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=56
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1', '2', '10', '0', '28', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-08','0','0'); -- id=140
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '29', '10', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=29
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '29';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 29, 0, 0
                    , 700.00, -10, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 700.00,
                        buyQuantity =buyQuantity+-10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=57
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-08*700.00," WHERE transferproductid = 29;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('29', '1', '10', '1', '29', 'تحويل منتجات من المخزن', 'storemovementController.php', '10', '0', '1', '2026-10-08','0','0'); -- id=141
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('29', '2', '10', '1', '2026-10-08'); -- id=71
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 29, 0, 0
                    , 700.00, 10, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=58
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('29', '2', '10', '0', '29', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-08','0','0'); -- id=142
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '3', '18', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=30
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '3';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 3, 0, 0
                    , 550.00, -18, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 550.00,
                        buyQuantity =buyQuantity+-18, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=59
UPDATE storemovement SET  buyPricesHistoryBookData = "18*2026-10-08*550.00," WHERE transferproductid = 30;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('3', '1', '18', '1', '30', 'تحويل منتجات من المخزن', 'storemovementController.php', '18', '0', '1', '2026-10-08','0','0'); -- id=143
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('3', '2', '18', '1', '2026-10-08'); -- id=72
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 3, 0, 0
                    , 550.00, 18, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+18, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=60
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('3', '2', '18', '0', '30', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '18', '1', '2026-10-08','0','0'); -- id=144
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '4', '10', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=31
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '4';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 4, 0, 0
                    , 550.00, -10, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 550.00,
                        buyQuantity =buyQuantity+-10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=61
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-08*550.00," WHERE transferproductid = 31;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('4', '1', '10', '1', '31', 'تحويل منتجات من المخزن', 'storemovementController.php', '10', '0', '1', '2026-10-08','0','0'); -- id=145
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('4', '2', '10', '1', '2026-10-08'); -- id=73
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 4, 0, 0
                    , 550.00, 10, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=62
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('4', '2', '10', '0', '31', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-08','0','0'); -- id=146
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '5', '3', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=32
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '5';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 5, 0, 0
                    , 450.00, -3, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 450.00,
                        buyQuantity =buyQuantity+-3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=63
UPDATE storemovement SET  buyPricesHistoryBookData = "3*2026-10-08*450.00," WHERE transferproductid = 32;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '3', '1', '32', 'تحويل منتجات من المخزن', 'storemovementController.php', '3', '0', '1', '2026-10-08','0','0'); -- id=147
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('5', '2', '3', '1', '2026-10-08'); -- id=74
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 5, 0, 0
                    , 450.00, 3, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=64
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '2', '3', '0', '32', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '3', '1', '2026-10-08','0','0'); -- id=148
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '16', '10', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=33
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '16';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 16, 0, 0
                    , 150.00, -10, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 150.00,
                        buyQuantity =buyQuantity+-10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=65
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-08*150.00," WHERE transferproductid = 33;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('16', '1', '10', '1', '33', 'تحويل منتجات من المخزن', 'storemovementController.php', '10', '0', '1', '2026-10-08','0','0'); -- id=149
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('16', '2', '10', '1', '2026-10-08'); -- id=75
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 16, 0, 0
                    , 150.00, 10, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=66
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('16', '2', '10', '0', '33', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-08','0','0'); -- id=150
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '30', '7', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=34
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '30';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 30, 0, 0
                    , 550.00, -7, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 550.00,
                        buyQuantity =buyQuantity+-7, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=67
UPDATE storemovement SET  buyPricesHistoryBookData = "7*2026-10-08*550.00," WHERE transferproductid = 34;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('30', '1', '7', '1', '34', 'تحويل منتجات من المخزن', 'storemovementController.php', '7', '0', '1', '2026-10-08','0','0'); -- id=151
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('30', '2', '7', '1', '2026-10-08'); -- id=76
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 30, 0, 0
                    , 550.00, 7, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+7, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=68
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('30', '2', '7', '0', '34', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '7', '1', '2026-10-08','0','0'); -- id=152
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '31', '3', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=35
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '31';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 31, 0, 0
                    , 440.00, -3, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 440.00,
                        buyQuantity =buyQuantity+-3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=69
UPDATE storemovement SET  buyPricesHistoryBookData = "3*2026-10-08*440.00," WHERE transferproductid = 35;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('31', '1', '3', '1', '35', 'تحويل منتجات من المخزن', 'storemovementController.php', '3', '0', '1', '2026-10-08','0','0'); -- id=153
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('31', '2', '3', '1', '2026-10-08'); -- id=77
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 31, 0, 0
                    , 440.00, 3, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=70
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('31', '2', '3', '0', '35', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '3', '1', '2026-10-08','0','0'); -- id=154
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '17', '1', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=36
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '17';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 17, 0, 0
                    , 380.00, -1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 380.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=71
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2026-10-08*380.00," WHERE transferproductid = 36;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('17', '1', '1', '1', '36', 'تحويل منتجات من المخزن', 'storemovementController.php', '1', '0', '1', '2026-10-08','0','0'); -- id=155
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('17', '2', '1', '1', '2026-10-08'); -- id=78
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 17, 0, 0
                    , 380.00, 1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=72
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('17', '2', '1', '0', '36', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=156
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '18', '2', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=37
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '18';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 18, 0, 0
                    , 375.00, -2, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 375.00,
                        buyQuantity =buyQuantity+-2, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=73
UPDATE storemovement SET  buyPricesHistoryBookData = "2*2026-10-08*375.00," WHERE transferproductid = 37;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('18', '1', '2', '1', '37', 'تحويل منتجات من المخزن', 'storemovementController.php', '2', '0', '1', '2026-10-08','0','0'); -- id=157
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('18', '2', '2', '1', '2026-10-08'); -- id=79
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 18, 0, 0
                    , 375.00, 2, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+2, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=74
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('18', '2', '2', '0', '37', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '2', '1', '2026-10-08','0','0'); -- id=158
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '19', '8', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=38
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '19';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 19, 0, 0
                    , 150.00, -8, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 150.00,
                        buyQuantity =buyQuantity+-8, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=75
UPDATE storemovement SET  buyPricesHistoryBookData = "8*2026-10-08*150.00," WHERE transferproductid = 38;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('19', '1', '8', '1', '38', 'تحويل منتجات من المخزن', 'storemovementController.php', '8', '0', '1', '2026-10-08','0','0'); -- id=159
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('19', '2', '8', '1', '2026-10-08'); -- id=80
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 19, 0, 0
                    , 150.00, 8, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+8, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=76
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('19', '2', '8', '0', '38', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '8', '1', '2026-10-08','0','0'); -- id=160
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '6', '4', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=39
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '6';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 6, 0, 0
                    , 460.00, -4, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 460.00,
                        buyQuantity =buyQuantity+-4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=77
UPDATE storemovement SET  buyPricesHistoryBookData = "4*2026-10-08*460.00," WHERE transferproductid = 39;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '1', '4', '1', '39', 'تحويل منتجات من المخزن', 'storemovementController.php', '4', '0', '1', '2026-10-08','0','0'); -- id=161
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('6', '2', '4', '1', '2026-10-08'); -- id=81
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 6, 0, 0
                    , 460.00, 4, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=78
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '2', '4', '0', '39', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '4', '1', '2026-10-08','0','0'); -- id=162
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '32', '3', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=40
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '32';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 32, 0, 0
                    , 550.00, -3, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 550.00,
                        buyQuantity =buyQuantity+-3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=79
UPDATE storemovement SET  buyPricesHistoryBookData = "3*2026-10-08*550.00," WHERE transferproductid = 40;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('32', '1', '3', '1', '40', 'تحويل منتجات من المخزن', 'storemovementController.php', '3', '0', '1', '2026-10-08','0','0'); -- id=163
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('32', '2', '3', '1', '2026-10-08'); -- id=82
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 32, 0, 0
                    , 550.00, 3, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=80
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('32', '2', '3', '0', '40', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '3', '1', '2026-10-08','0','0'); -- id=164
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '33', '1', '2026-10-08', '1', '0','1','0','0','2026-10-08 20:58:26','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=41
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '33';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 33, 0, 0
                    , 450.00, -1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyprice = 450.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=81
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2026-10-08*450.00," WHERE transferproductid = 41;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('33', '1', '1', '1', '41', 'تحويل منتجات من المخزن', 'storemovementController.php', '1', '0', '1', '2026-10-08','0','0'); -- id=165
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('33', '2', '1', '1', '2026-10-08'); -- id=83
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 33, 0, 0
                    , 450.00, 1, 0, 0, 1, '2026-10-08 20:58:26')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 20:58:26' ; -- id=82
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('33', '2', '1', '0', '41', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1', '1', '2026-10-08','0','0'); -- id=166
UPDATE storedetail SET inUse = 0 WHERE storedetailid=20;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=28;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=8;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=9;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=10;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=21;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=22;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=23;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=24;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=25;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=26;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=27;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=11;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=12;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=34;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=13;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=14;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=36;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=35;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=15;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=2;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=37;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=38;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=39;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=40;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=41;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=42;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=1;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=29;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=3;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=4;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=5;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=16;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=30;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=31;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=17;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=18;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=19;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=6;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=32;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=33;
COMMIT;
BEGIN;
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '80448', '80448', '2026-10-08', '1', '0', '0', '2026-10-08 20:58:26','تحويل من مخزن المخزن الرئيسي الى مخزن مخزن المتاجر','1','0',null,'0','1','storemovementController.php?do=show&operationnum=1'); -- id=42
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('42', '419', '80448', '','0'); -- id=42
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '80448', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:53:03' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('42', '382', '80448', '','0'); -- id=42
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '1140', 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';
COMMIT;
COMMIT;
UPDATE storemovement SET  dailyentryid =42 WHERE operationnum = 1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:28:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:58:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 20:58:50', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=193
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:29:11";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:59:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 20:59:11', '1', 'o.royalgt4.com:443/erp/controllers/productCatController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php'); -- id=194
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:29:21";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:59:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 20:59:21', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=195
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:29:31";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:59:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-08 20:59:31', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=196
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:29:41";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:59:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:59:41', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=197
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:29:48";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 20:59:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 20:59:48', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=198
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:30:04";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:00:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:00:04', '1', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=edit&id=7'); -- id=199
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:30:38";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:00:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 21:00:38', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=200
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:30:57";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:00:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 21:00:57', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=add'); -- id=201
BEGIN;
CALL insertUniqueOptNum(2,1,2,7,3,'2026-10-08',1,0, '' , '' ,0,0,0,0,0,'2026-10-08 21:00:57',0,'',0,'','hide',0,@id,@optnum);
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-08' WHERE storedetailid = '7';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 1, 7, 0, 0
                    , 380.00, -3, 0, 0, 1, '2026-10-08 21:00:57')
                ON DUPLICATE KEY UPDATE buyprice = 380.00,
                        buyQuantity =buyQuantity+-3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 21:00:57' ; -- id=83
UPDATE storemovement SET  buyPricesHistoryBookData = "3*2026-10-08*380.00," WHERE transferproductid = 42;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '1', '3', '1', '42', 'تحويل منتجات من المخزن', 'storemovementController.php', '3', '0', '1', '2026-10-08','0','0'); -- id=167
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('7', '2', '3', '1', '2026-10-08'); -- id=84
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-08', 2, 7, 0, 0
                    , 380.00, 3, 0, 0, 1, '2026-10-08 21:00:57')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-08 21:00:57' ; -- id=84
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '2', '3', '0', '42', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '3', '1', '2026-10-08','0','0'); -- id=168
UPDATE storedetail SET inUse = 0 WHERE storedetailid=7;
COMMIT;
BEGIN;
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1140', '1140', '2026-10-08', '1', '0', '0', '2026-10-08 21:00:57','تحويل من مخزن المخزن الرئيسي الى مخزن مخزن المتاجر','1','0',null,'0','2','storemovementController.php?do=show&operationnum=2'); -- id=43
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('43', '419', '1140', '','0'); -- id=43
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '81588', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:53:03' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('43', '382', '1140', '','0'); -- id=43
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '0', 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';
COMMIT;
COMMIT;
UPDATE storemovement SET  dailyentryid =43 WHERE operationnum = 2;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:31:02";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:01:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-08 21:01:02', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=202
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:31:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:01:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 21:01:15', '1', 'o.royalgt4.com:443/erp/controllers/userController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php'); -- id=203
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:31:56";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:01:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 21:01:56', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=add'); -- id=204
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,treeId) VALUES ('محمود', '123', '2', 'محمود', '2026-10-08', '0', '2', '2' ,'1' ,'1','-1','','','0','0','2','0','0','','1','1','0','','-1,','-1,','2','0','2','0','2','-1,','-1,-1','0','0','1','-1,',''); -- id=4
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:31:57";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:01:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 21:01:57', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=sucess'); -- id=205
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:31:58";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:01:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 21:01:58', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=show'); -- id=206
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:32:00";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:02:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 21:02:00', '1', 'o.royalgt4.com:443/erp/controllers/userController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php'); -- id=207
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:32:47";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:02:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 21:02:47', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=add'); -- id=208
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,treeId) VALUES ('محمودد', '123', '3', 'محمودد', '2026-10-08', '0', '2', '2' ,'1' ,'0','-1','','','0','0','2','0','0','','0','0','0','','-1,','-1,','-1,2','0','2','0','2','-1,','-1,-1','0','0','1','-1,',''); -- id=5
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:32:47";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:02:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 21:02:47', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=sucess'); -- id=209
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:32:49";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:02:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 21:02:49', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=show'); -- id=210
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:33:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:03:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 21:03:05', '1', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=edit&userid=3'); -- id=211
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:33:13";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:03:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 21:03:13', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=update'); -- id=212
UPDATE user SET username = 'محمدد', password = '123', usergroupid = '2', employeename = 'محمدد', currentdate = '2026-10-08', conditions = '0', saveid = '2'  , userstoreid ='2' ,awardrate = '1' ,searchinonesave = '1', branchId = '-1', question = '', answer = '',blockedByLimits = '0',directSaveBills = '0',userstoreidDef='2',empid='0',obygyDoctorId = '0',lang = '',viewclients = '1',viewbills = '1',storeSupervisor='0',storeSupervisorStores='',projectids='0',bankids='-1,1',saveids='-1,2',searchinonestorebalance='1',storeids='2',webApiId='0',closeSavid='2',charityids='0',laterNakdiUserIds='-1,-1',awardrategomla = '0',awardratehalf = '0', dellaternakdipayed='1',accountids='-1,',treeId='0' WHERE userid = '3';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:33:14";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:03:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 21:03:14', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=sucess'); -- id=213
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:33:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:03:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 21:03:15', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=show'); -- id=214
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:33: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 programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:33:53";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:03:53", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 21:03:53', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=215
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 17:33:54";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 21:03:54", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 21:03:54', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=216
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:36:15";
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 = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:36:47";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:06:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 21:06:47', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=217
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='1',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='0',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 17:36:47";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 21:06:47', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=218
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:36:58";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:06:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 21:06:58', '1', 'o.royalgt4.com:443/erp/controllers/programsettingsController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php'); -- id=219
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:41:35";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:11:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 21:11:35', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php?do=update'); -- id=220
INSERT INTO ebillsetting (eTaxNum, eTaxNumBranch, eGovernorate, eCity, eStreet, eBuildingNum, eTaxType, eTaxTypeNum, eCompanyNameInTaxCard, eunitInTax) VALUES ('', '', '', '', '', '', '', '', '', ''); -- id=1
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:41:36";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:11:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 21:11:36', '1', 'o.royalgt4.com:443/erp/controllers/programsettingsController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php'); -- id=221
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:41:42";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:11:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 21:11:42', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php?do=update'); -- id=222
UPDATE ebillsetting SET eTaxNum = '', eTaxNumBranch = '', eGovernorate = '', eCity = '', eStreet = '', eBuildingNum = '', eTaxType = '', eTaxTypeNum = '', eCompanyNameInTaxCard = '', eunitInTax = '' WHERE id = '1';
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:41:43";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:11:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 21:11:43', '1', 'o.royalgt4.com:443/erp/controllers/programsettingsController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php'); -- id=223
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:41:54";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:11:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 21:11:54', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php?do=update'); -- id=224
UPDATE ebillsetting SET eTaxNum = '', eTaxNumBranch = '', eGovernorate = '', eCity = '', eStreet = '', eBuildingNum = '', eTaxType = '', eTaxTypeNum = '', eCompanyNameInTaxCard = '', eunitInTax = '' WHERE id = '1';
UPDATE programsettings SET companyname = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:41:55";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:11:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 21:11:55', '1', 'o.royalgt4.com:443/erp/controllers/programsettingsController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php'); -- id=225
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:42:03";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:12:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 21:12:03', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php?do=update'); -- id=226
UPDATE ebillsetting SET eTaxNum = '', eTaxNumBranch = '', eGovernorate = '', eCity = '', eStreet = '', eBuildingNum = '', eTaxType = '', eTaxTypeNum = '', eCompanyNameInTaxCard = '', eunitInTax = '' WHERE id = '1';
UPDATE programsettings SET companyname = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:42:03";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:12:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 21:12:03', '1', 'o.royalgt4.com:443/erp/controllers/programsettingsController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php'); -- id=227
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:42: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 programsettings SET companyname = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:42:54";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:12:54", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 21:12:54', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=228
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 17:42:54";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 21:12:54", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 21:12:54', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=229
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:43:02";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:13:02", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:13:02', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=230
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 ('محمد' , '', '01203726095', '', '0', '', '0', '2026-10-08 21:16:20', '2', '0','','0','','-10','0','10000',',','-1','0','.','0','0','.','2026-10-08','0','0','','0','0','0','','','0','0','','','','','','','','','','-1','','','','0','','','0','0',''); -- id=2
INSERT INTO tamweenclientdetail (clientid, noOfPersonsTamween, noOfPersonsDa3m, cardNum, cardPassword) VALUES ('2', '0', '0', '', ''); -- id=2
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 ('2','0','0','0','إضافة عميل جديد','2', '0', '2026-10-08 21:16:20', '2', 'clientController.php', '', '0', '0', null, '0', null, null,'', '0','1','1','0','1','','0','0','',''); -- id=1
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', '', '2', '0', '2026-10-08 21:16:20'); -- id=429
UPDATE client SET clientname = 'محمد', clientaddress = '', clientphone = '01203726095', clientmobile = '', clientdebt = '0.00', clientdetails = '', conditions = '0', clientdate = '2026-10-08', userid = '2'  , 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='429',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 = '2';
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 ('محمود ' , '', '01018697076', '', '0', '', '0', '2026-10-08 21:18:48', '2', '0','','0','','-10','0','0',',','-1','0','.','0','0','.','2026-10-08','0','0','','0','0','0','','','0','0','','','','','','','','','','-1','','','','0','','','0','0',''); -- id=3
INSERT INTO tamweenclientdetail (clientid, noOfPersonsTamween, noOfPersonsDa3m, cardNum, cardPassword) VALUES ('3', '0', '0', '', ''); -- id=3
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 ('3','0','0','0','إضافة عميل جديد','3', '0', '2026-10-08 21:18:48', '2', 'clientController.php', '', '0', '0', null, '0', null, null,'', '0','1','1','0','1','','0','0','',''); -- id=2
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', '', '2', '0', '2026-10-08 21:18:48'); -- id=430
UPDATE client SET clientname = 'محمود ', clientaddress = '', clientphone = '01018697076', clientmobile = '', clientdebt = '0.00', clientdetails = '', conditions = '0', clientdate = '2026-10-08', userid = '2'  , 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='430',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 = '3';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:52:29";
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 = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:52:38";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:22:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 21:22:38', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=231
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 17:52:38";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 21:22:38', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=232
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:53:01";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:23:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:23:01', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=233
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:53:08";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:23:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:23:08', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=234
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:53:17";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:23:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:23:17', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=235
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:53:57";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:23:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:23:57', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=236
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:55:24";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:25:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:25:24', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=237
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:55:26";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:25:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:25:26', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=edit&id=3'); -- id=238
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:55:47";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:25:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:25:47', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=239
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-10-08', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '1',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '1' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '0' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '1' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '1' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '0' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '1' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:55:47";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:25:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:25:47', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=240
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:55:49";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:25:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:25:49', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=241
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:56:02";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:26:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:26:02', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=edit&id=5'); -- id=242
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:56:20";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:26:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:26:20', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=243
UPDATE billname SET name = 'فاتوره مردودات مبيعات ', userid = '1', conditions = '0', billnamedate = '2026-10-08', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '0' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '1',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '5';
UPDATE billsettings SET billnameid = '5', billpropertyid = '1', billsettingsvalue = '0' WHERE billsettingsid = '57';
UPDATE billsettings SET billnameid = '5', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '58';
UPDATE billsettings SET billnameid = '5', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '59';
UPDATE billsettings SET billnameid = '5', billpropertyid = '4', billsettingsvalue = '0' WHERE billsettingsid = '60';
UPDATE billsettings SET billnameid = '5', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '61';
UPDATE billsettings SET billnameid = '5', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '62';
UPDATE billsettings SET billnameid = '5', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '63';
UPDATE billsettings SET billnameid = '5', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '64';
UPDATE billsettings SET billnameid = '5', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '65';
UPDATE billsettings SET billnameid = '5', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '66';
UPDATE billsettings SET billnameid = '5', billpropertyid = '11', billsettingsvalue = '1' WHERE billsettingsid = '67';
UPDATE billsettings SET billnameid = '5', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '68';
UPDATE billsettings SET billnameid = '5', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '69';
UPDATE billsettings SET billnameid = '5', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '70';
UPDATE billsettings SET billnameid = '5', billpropertyid = '16', billsettingsvalue = '1' WHERE billsettingsid = '71';
UPDATE billsettings SET billnameid = '5', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '167';
UPDATE billsettings SET billnameid = '5', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '168';
UPDATE billsettings SET billnameid = '5', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '170';
UPDATE billsettings SET billnameid = '5', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '171';
UPDATE billsettings SET billnameid = '5', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '172';
UPDATE billsettings SET billnameid = '5', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '173';
UPDATE billsettings SET billnameid = '5', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '174';
UPDATE billsettings SET billnameid = '5', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '175';
UPDATE billsettings SET billnameid = '5', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '176';
UPDATE billsettings SET billnameid = '5', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '246';
UPDATE billsettings SET billnameid = '5', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '264';
UPDATE billsettings SET billnameid = '5', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '265';
UPDATE billsettings SET billnameid = '5', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '266';
UPDATE billsettings SET billnameid = '5', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '267';
UPDATE billsettings SET billnameid = '5', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '315';
UPDATE billsettings SET billnameid = '5', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '316';
UPDATE billsettings SET billnameid = '5', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '317';
UPDATE billsettings SET billnameid = '5', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '328';
UPDATE billsettings SET billnameid = '5', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '335';
UPDATE billsettings SET billnameid = '5', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '342';
UPDATE billsettings SET billnameid = '5', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '349';
UPDATE billsettings SET billnameid = '5', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '356';
UPDATE billsettings SET billnameid = '5', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '363';
UPDATE billsettings SET billnameid = '5', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '370';
UPDATE billsettings SET billnameid = '5', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '377';
UPDATE billsettings SET billnameid = '5', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '384';
UPDATE billsettings SET billnameid = '5', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '391';
UPDATE billsettings SET billnameid = '5', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '398';
UPDATE billsettings SET billnameid = '5', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '405';
UPDATE billsettings SET billnameid = '5', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '673';
UPDATE billsettings SET billnameid = '5', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '674';
UPDATE billsettings SET billnameid = '5', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '675';
UPDATE billsettings SET billnameid = '5', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '676';
UPDATE billsettings SET billnameid = '5', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '677';
UPDATE billsettings SET billnameid = '5', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '678';
UPDATE billsettings SET billnameid = '5', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '688';
UPDATE billsettings SET billnameid = '5', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '716';
UPDATE billsettings SET billnameid = '5', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '717';
UPDATE billsettings SET billnameid = '5', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '754';
UPDATE billsettings SET billnameid = '5', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '757';
UPDATE billsettings SET billnameid = '5', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '760';
UPDATE billsettings SET billnameid = '5', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '783';
UPDATE billsettings SET billnameid = '5', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '789';
UPDATE billsettings SET billnameid = '5', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '795';
UPDATE billsettings SET billnameid = '5', billpropertyid = '65', billsettingsvalue = '0' WHERE billsettingsid = '869';
UPDATE billsettings SET billnameid = '5', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '879';
UPDATE billsettings SET billnameid = '5', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '880';
UPDATE billsettings SET billnameid = '5', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '888';
UPDATE billsettings SET billnameid = '5', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '914';
UPDATE billsettings SET billnameid = '5', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '916';
UPDATE billsettings SET billnameid = '5', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '917';
UPDATE billsettings SET billnameid = '5', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '918';
UPDATE billsettings SET billnameid = '5', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '919';
UPDATE billsettings SET billnameid = '5', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '920';
UPDATE billsettings SET billnameid = '5', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '921';
UPDATE billsettings SET billnameid = '5', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '948';
UPDATE billsettings SET billnameid = '5', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '949';
UPDATE billsettings SET billnameid = '5', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '950';
UPDATE billsettings SET billnameid = '5', billpropertyid = '80', billsettingsvalue = '1' WHERE billsettingsid = '951';
UPDATE billsettings SET billnameid = '5', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '952';
UPDATE billsettings SET billnameid = '5', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '953';
UPDATE billsettings SET billnameid = '5', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '963';
UPDATE billsettings SET billnameid = '5', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '968';
UPDATE billsettings SET billnameid = '5', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '982';
UPDATE billsettings SET billnameid = '5', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '983';
UPDATE billsettings SET billnameid = '5', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '984';
UPDATE billsettings SET billnameid = '5', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '985';
UPDATE billsettings SET billnameid = '5', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '1010';
UPDATE billsettings SET billnameid = '5', billpropertyid = '90', billsettingsvalue = '0' WHERE billsettingsid = '1011';
UPDATE billsettings SET billnameid = '5', billpropertyid = '91', billsettingsvalue = '0' WHERE billsettingsid = '1012';
UPDATE billsettings SET billnameid = '5', billpropertyid = '92', billsettingsvalue = '1' WHERE billsettingsid = '1013';
UPDATE billsettings SET billnameid = '5', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '1014';
UPDATE billsettings SET billnameid = '5', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '1015';
UPDATE billsettings SET billnameid = '5', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '1016';
UPDATE billsettings SET billnameid = '5', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '1017';
UPDATE billsettings SET billnameid = '5', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '1018';
UPDATE billsettings SET billnameid = '5', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '1019';
UPDATE billsettings SET billnameid = '5', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1061';
UPDATE billsettings SET billnameid = '5', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1034';
UPDATE billsettings SET billnameid = '5', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1062';
UPDATE billsettings SET billnameid = '5', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1063';
UPDATE billsettings SET billnameid = '5', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1064';
UPDATE billsettings SET billnameid = '5', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1065';
UPDATE billsettings SET billnameid = '5', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1073';
UPDATE billsettings SET billnameid = '5', billpropertyid = '106', billsettingsvalue = '0' WHERE billsettingsid = '1155';
UPDATE billsettings SET billnameid = '5', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1156';
UPDATE billsettings SET billnameid = '5', billpropertyid = '108', billsettingsvalue = '0' WHERE billsettingsid = '1157';
UPDATE billsettings SET billnameid = '5', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1158';
UPDATE billsettings SET billnameid = '5', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1159';
UPDATE billsettings SET billnameid = '5', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1160';
UPDATE billsettings SET billnameid = '5', billpropertyid = '112', billsettingsvalue = '0' WHERE billsettingsid = '1161';
UPDATE billsettings SET billnameid = '5', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1083';
UPDATE billsettings SET billnameid = '5', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1084';
UPDATE billsettings SET billnameid = '5', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1085';
UPDATE billsettings SET billnameid = '5', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1086';
UPDATE billsettings SET billnameid = '5', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1162';
UPDATE billsettings SET billnameid = '5', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1163';
UPDATE billsettings SET billnameid = '5', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1164';
UPDATE billsettings SET billnameid = '5', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1165';
UPDATE billsettings SET billnameid = '5', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1166';
UPDATE billsettings SET billnameid = '5', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1167';
UPDATE billsettings SET billnameid = '5', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1168';
UPDATE billsettings SET billnameid = '5', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1169';
UPDATE billsettings SET billnameid = '5', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1170';
UPDATE billsettings SET billnameid = '5', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1171';
UPDATE billsettings SET billnameid = '5', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1172';
UPDATE billsettings SET billnameid = '5', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1173';
UPDATE billsettings SET billnameid = '5', billpropertyid = '129', billsettingsvalue = '0' WHERE billsettingsid = '1174';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:56:20";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:26:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:26:20', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=244
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:56:22";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:26:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:26:22', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=245
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:56: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 programsettings SET companyname = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:57:23";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:27:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 21:27:23', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=246
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 17:57:23";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 21:27:23', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=247
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:57:55";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:27:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:27:55', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=248
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:58:03";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:28:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:28:03', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=249
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:58:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:28:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:28:20', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=250
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:58:31";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:28:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:28:31', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=251
UPDATE productunit SET proUnitSellUnitPrice = 750 * productnumber WHERE productid = 2;
UPDATE product SET productName = 'بولو خريفي', productDescription = '', productCatId = '4', productBuyPrice = '460.00', productSellAllPrice = '750.00', productSellUnitPrice = '750', productSellHalfPrice = '0.00', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '104',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '0.00',lastbuyprice_withDiscount = '0',meanbuyprice = '230.00',meanbuyprice_withDiscount = '230' , 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='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='230',meanbuyprice_withTax='230',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 = '2';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (2, 1,'2026-10-08 21:28:54',1)
                ON DUPLICATE KEY UPDATE productid = 2, edited = 1, sysdate = '2026-10-08 21:28:54', userid = 1; -- id=2
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:58:59";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:28:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('transfermoneyController.php', '2026-10-08 21:28:59', '1', 'o.royalgt4.com:443/erp/controllers/transfermoneyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/transfermoneyController.php'); -- id=252
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:59:00";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:29:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:29:00', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=253
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:59:06";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:29:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:29:06', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=254
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:59:21";
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 = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:59:37";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:29:37", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 21:29:37', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=255
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 17:59:38";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 21:29:38", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 21:29:38', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=256
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 17:59:40";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:29:40", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:29:40', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=257
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:00:22";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:30:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:30:22', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=258
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:00:31";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:30:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-08 21:30:31', '1', 'o.royalgt4.com:443/erp/controllers/storedetailController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php'); -- id=259
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:00:44";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:30:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-08 21:30:44', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=260
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:00:51";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:30:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-08 21:30:51', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=261
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:01:45";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:31:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-08 21:31:45', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=262
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:01:51";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:31:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-08 21:31:51', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=263
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:01:56";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:31:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-08 21:31:56', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=264
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:02:00";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:32:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:32:00', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=265
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:02:04";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:32:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:32:04', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=266
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:02:13";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:03:07";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:33:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:33:07', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=267
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:03:14";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:33:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:33:14', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=268
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 = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:03:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:33:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 21:33:25', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=269
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 18:03:25";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 21:33:26', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=270
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:03:27";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:33:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:33:27', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=271
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:04:03";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:34:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:34:03', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=272
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:04:08";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:34:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:34:08', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=273
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:04:16";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:34:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:34:16', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=edit&id=19'); -- id=274
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:04:32";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:34:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:34:32', '1', 'showbarcode', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=showbarcode'); -- id=275
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:05:19";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:35:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:35:19', '1', 'showbarcode', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=showbarcode'); -- id=276
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:05:27";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:35:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:35:27', '1', 'showbarcode', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=showbarcode'); -- id=277
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:12:57";
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 = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:13:06";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:43:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 21:43:06', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=278
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 18:13:06";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 21:43:06', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=279
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:13:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:43:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:43:15', '1', 'showbarcode', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=showbarcode'); -- id=280
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:13:58";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:43:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:43:58', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=281
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:16:04";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:46:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:46:04', '1', 'showbarcode', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=showbarcode'); -- id=282
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:18:16";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:48:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:48:16', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=283
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:18:18";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:48:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:48:18', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=edit&id=3'); -- id=284
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:18:32";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:48:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:48:32', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=285
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-10-08', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '1',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '1' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '0' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '1' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '1' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '1' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '1' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:18:32";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:48:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:48:32', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=286
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:18:33";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:48:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:48:33', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=287
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:18:35";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:48:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:48:35', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=288
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:19:46";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:49:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:49:46', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=edit&id=3'); -- id=289
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:19:57";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:49:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:49:57', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=290
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-10-08', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '1',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '1' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '0' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '1' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '1' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '0' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '1' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:19:57";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:49:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:49:57', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=291
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:19:58";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:49:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:49:58', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=292
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:20:32";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:50:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:50:33', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=293
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:20:38";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:50:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:50:38', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=294
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:20:54";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:50:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:50:54', '1', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=edit&id=13'); -- id=295
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:21:01";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:51:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:51:01', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=296
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:21:09";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:51:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:51:09', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=297
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:21:13";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:51:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:51:13', '1', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=edit&id=2'); -- id=298
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:21:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:51:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:51:20', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=update'); -- id=299
BEGIN;
UPDATE product SET productName = 'بولو خريفي', productDescription = '', productCatId = '4', productBuyPrice = '460', productSellAllPrice = '750', productSellUnitPrice = '750', productSellHalfPrice = '0', productDate = '2026-10-08', conditions = '0', userId = '1', limitamount = '0', parcode = '00104',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '0.00',lastbuyprice_withDiscount = '0',meanbuyprice = '230.00',meanbuyprice_withDiscount = '230' , 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='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='230',meanbuyprice_withTax='230',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 = '2';
UPDATE product SET treeId = 0 WHERE productId = 2;
UPDATE productunit SET  conditions = 1 WHERE productunitid = 2;
UPDATE productunit SET unitid = '1', productid = '2', productnumber = '1.00', productunitdate = '2026-10-08', userid = '1', conditions = '0',proUnitParcode='0000201',proUnitSellAllPrice='750',proUnitSellHalfPrice='0',proUnitSellUnitPrice ='750',proUnitBuyPrice='460',unitInTax='',proUnitPrice4='0',proUnitPrice5='0',proUnitPrice6='0',proUnitPrice7='0',proUnitPrice8='0',proUnitPrice9='0',proUnitPrice10='0',proUnitPrice11='0',proUnitPrice12='0',proUnitPrice13='0' WHERE productunitid = '2';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (2, 1,'2026-10-08 21:51:20',1)
                ON DUPLICATE KEY UPDATE productid = 2, edited = 1, sysdate = '2026-10-08 21:51:20', userid = 1; -- id=2
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:21:22";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:51:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:51:22', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=show'); -- id=300
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:21:30";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:51:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:51:30', '1', 'showbarcode', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=showbarcode'); -- id=301
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:22:34";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:52:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:52:34', '1', 'showbarcode', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=showbarcode'); -- id=302
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:22:43";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:52:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 21:52:43', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=303
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdoع', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 18:22:43";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 21:52:43', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=304
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:23:21";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:53:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-08 21:53:21', '1', 'showbarcode', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=showbarcode'); -- id=305
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:23:27";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:53:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 21:53:27', '1', 'o.royalgt4.com:443/erp/controllers/programsettingsController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php'); -- id=306
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:23:42";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:53:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 21:53:42', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php?do=update'); -- id=307
UPDATE ebillsetting SET eTaxNum = '', eTaxNumBranch = '', eGovernorate = '', eCity = '', eStreet = '', eBuildingNum = '', eTaxType = '', eTaxTypeNum = '', eCompanyNameInTaxCard = '', eunitInTax = '' WHERE id = '1';
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:23:43";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:53:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 21:53:43', '1', 'o.royalgt4.com:443/erp/controllers/programsettingsController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php'); -- id=308
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:23:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:53:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:53:50', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=309
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:24:32";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:54:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:54:32', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=edit&id=3'); -- id=310
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:24:46";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:54:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:54:46', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=311
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-10-08', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '1',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '1' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '0' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '1' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '1' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '0' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '1' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '1' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:24:46";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:54:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:54:46', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=312
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:24:47";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:54:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-08 21:54:47', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=313
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:24:49";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 21:54:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:54:49', '1', 'addsellBill', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=314
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:25:28";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:55:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:55:28', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=315
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:25:32";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:55:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:55:32', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=316
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:25:33";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:55:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:55:33', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=317
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:26:34";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:56:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:56:34', '1', 'addAndRetuen', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=318

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac7e7254bf30
-- ----------------------------------------------------------------------------------------------------

BEGIN;
CALL clientInUse(2,@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,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-08 21:56:34', '06ac7e7254bf30', '2', '0.00', '0', '0', '1', '750.00', '750', '750', '0', '1', '2026-10-08 21:56:34', '', '1', '0', 'محمد', '1', '1', '3', '3', 'محمد', '1' ,'0','','','','','-1','0','0','0','0','0','750','0','','0','1','750','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-08','1','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=1
UPDATE client SET  clientdebt = '0', userid = '1' WHERE clientid = '2';
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 ('2','0.00','0','0','اضافة فاتورة مبيعات','1', '0', '2026-10-08 21:56:34', '1', 'sellbillController.php', 'اضافة فاتورة مبيعات', '750', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-08 21:56:34','0','0','',''); -- id=3
UPDATE client SET  inUse = 0 where clientid = 2;
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','00104', '1', '4', '2', '1', '750', '750', '0', '', '1', '2026-10-08 21:56:34', '2', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','1','0','','','1','1','0','0','750','750','0','','0','0.00','0','0','0','0'); -- id=1
UPDATE sellbilldetail SET  lastbuyprice = 460.00 , meanbuyprice = 230.00, lastbuyprice_withDiscount = 460.00, meanbuyprice_withDiscount = 230.00
        , lastbuyprice_withTax = 230, meanbuyprice_withTax = 230
                where sellbilldetailid = 1;
 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 (2, '2026-10-08', 750, 460, 460
                    , 230, 460, 230, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 230, 230, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+750, sellCostBuyPrice =sellCostBuyPrice+460
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+460, sellCostMeanBuyPrice = sellCostMeanBuyPrice+230
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+460, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+230
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+230
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+230
                        , 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 (1, '2026-10-08', 750, 460, 460
                    , 230, 460, 230, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0, 230, 230, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+750, sellCostBuyPrice =sellCostBuyPrice+460
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+460, sellCostMeanBuyPrice = sellCostMeanBuyPrice+230
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+460, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+230
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+230
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+230
                        , 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 = '1', storedetaildate = '2026-10-08 21:56:34' WHERE storedetailid = '2';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('2', '1', '1', '1', '1', 'اضافة فاتورة مبيعات', 'sellbillController.php', '0', '-1', '1', '2026-10-08 21:56:34','0','0'); -- id=169
CALL saveInUse(1,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '750',  userid = '1' WHERE saveid = '1';
UPDATE save SET  inUse = 0 where saveid = 1;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('0','750', '0', '1', 'اضافة فاتورة مبيعات', '1', '750', '2026-10-08 21:56:34', '1',  'sellbillController.php','2','','0'); -- id=4
UPDATE client SET  delegateid = 3 where clientid = 2;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '750', '750', '2026-10-08', '1', '0', '0', '2026-10-08 21:56:34','اضافة فاتورة مبيعات رقم 1','1','0',null,'0','1','sellbillController.php?do=showDetail&sellbillid=1'); -- id=44
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('44', '429', '750', '','0'); -- id=44
UPDATE accountstree SET name = 'محمد', customName = 'محمد', customNameEn = 'محمد', nameEn = 'محمد', parent = '58', accountNature = '0', theValue = '750', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '2', del = '0', sysdate = '2026-10-08 21:16:20' WHERE id = '429';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('44', '143', '750', '','0'); -- id=44
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '750', 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 ( '750', '750', '2026-10-08', '1', '0', '0', '2026-10-08 21:56:34','اضافة فاتورة مبيعات رقم 1 - تحصيل الفاتورة من العميل','1','0',null,'0','1','sellbillController.php?do=showDetail&sellbillid=1'); -- id=45
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('45', '383', '750', '','0'); -- id=45
UPDATE accountstree SET name = 'الخزنة الرئيسية', customName = 'الخزنة الرئيسية', customNameEn = 'الخزنة الرئيسية', nameEn = 'الخزنة الرئيسية', parent = '40', accountNature = '0', theValue = '750', 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';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('45', '429', '750', '','0'); -- id=45
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 = '', userid = '2', del = '0', sysdate = '2026-10-08 21:16:20' WHERE id = '429';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '460', '460', '2026-10-08', '1', '0', '0', '2026-10-08 21:56:34','اضافة فاتورة مبيعات رقم 1 - صرف البضاعة من المخزن','1','0',null,'0','1','sellbillController.php?do=showDetail&sellbillid=1'); -- id=46
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('46', '402', '460', '','0'); -- id=46
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '460', 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 ('46', '382', '460', '','0'); -- id=46
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '-460', 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='44,45,46' where sellbillid=1;
 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-08', 750, 460, 460
                    , 230, 460, 230, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,230, 230, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+750, sellCostBuyPrice =sellCostBuyPrice+460
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+460, sellCostMeanBuyPrice = sellCostMeanBuyPrice+230
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+460, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+230
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+230
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+230
                        , 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 (2, '2026-10-08', 750, 460, 460
                    , 230, 460, 230, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,230, 230, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+750, sellCostBuyPrice =sellCostBuyPrice+460
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+460, sellCostMeanBuyPrice = sellCostMeanBuyPrice+230
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+460, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+230
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+230
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+230
                        , 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, 750, 460, 460
                    , 230, 460, 230, 0, 230, 230)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+750, netSellCostBuyPrice = netSellCostBuyPrice+460
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+460
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+230
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+460
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+230
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+0
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+230
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+230;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac7e7254bf30 and sellbillId = 1 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:26:34";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:56:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 21:56:34', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=319
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:27: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 programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:27:12";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:57:12", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 21:57:12', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=320
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 18:27:13";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 21:57:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 21:57:13', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=321
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:27:18";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:57:18", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 21:57:18', '2', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=322
UPDATE user SET loginip = "" WHERE userid = 2;
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 = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:27:41";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:57:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 21:57:41', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=323
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 18:27:41";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 21:57:41', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=324
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:27:46";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:57:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userratereportController.php', '2026-10-08 21:57:46', '1', 'o.royalgt4.com:443/erp/controllers/userratereportController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userratereportController.php'); -- id=325
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:27:46";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:57:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userratereportController.php', '2026-10-08 21:57:46', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userratereportController.php?do=show'); -- id=326
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:28:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:58:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userratereportController.php', '2026-10-08 21:58:25', '1', 'o.royalgt4.com:443/erp/controllers/userratereportController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userratereportController.php'); -- id=327
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:28:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:58:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userratereportController.php', '2026-10-08 21:58:25', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userratereportController.php?do=show'); -- id=328
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:28:32";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 21:58:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 21:58:32', '1', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=329
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:29: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 programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:30:02";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:00:02", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 22:00:02', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=330
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 18:30:03";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 22:00:03", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 22:00:03', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=331
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:30:28";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:00:28", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:00:28', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=332
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:31:35";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:01:35", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:01:35', '2', 'addAndRetuen', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=333

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac7e84cd26f6
-- ----------------------------------------------------------------------------------------------------

BEGIN;
CALL clientInUse(3,@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,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-08 22:01:35', '06ac7e84cd26f6', '3', '0.00', '0', '0', '1', '450.00', '450', '450', '0', '2', '2026-10-08 22:01:35', '', '2', '0', 'محمود ', '2', '1', '3', '3', 'محمود ', '2' ,'0','','','','','-1','0','0','0','0','0','450','0','','0','1','450','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-08','1','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=2
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '3';
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 ('3','0.00','0','0','اضافة فاتورة مبيعات','2', '0', '2026-10-08 22:01:35', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '450', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-08 22:01:35','0','0','',''); -- id=4
UPDATE client SET  inUse = 0 where clientid = 3;
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 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 ('200','00070', '2', '3', '13', '1', '250', '250', '0', '', '1', '2026-10-08 22:01:35', '13', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','1','0','','32-1,','1','1','0','0','250','250','0','','0','0.00','0','0','0','0'); -- id=2
UPDATE sellbilldetail SET  lastbuyprice = 200.00 , meanbuyprice = 200.00, lastbuyprice_withDiscount = 200.00, meanbuyprice_withDiscount = 200.00
        , lastbuyprice_withTax = 200, meanbuyprice_withTax = 200, lastbuyprice_withDiscountAndTax = 200
                where sellbilldetailid = 2;
 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 (13, '2026-10-08', 250, 200, 200
                    , 200, 200, 200, 200
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 200, 200, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+250, sellCostBuyPrice =sellCostBuyPrice+200
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+200, sellCostMeanBuyPrice = sellCostMeanBuyPrice+200
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+200, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+200
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+200
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+200
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+200
                        , 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-08', 250, 200, 200
                    , 200, 200, 200, 200
                    , 0, 0, 0, 0
                    , 0, 0, 0, 200, 200, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+250, sellCostBuyPrice =sellCostBuyPrice+200
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+200, sellCostMeanBuyPrice = sellCostMeanBuyPrice+200
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+200, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+200
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+200
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+200
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+200
                        , 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 = '2', storedetaildate = '2026-10-08 22:01:35' WHERE storedetailid = '58';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('13', '2', '1', '1', '2', 'اضافة فاتورة مبيعات', 'sellbillController.php', '1', '0', '2', '2026-10-08 22:01:35','0','0'); -- id=170
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 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 ('150','00101', '2', '3', '19', '1', '200', '200', '0', '', '1', '2026-10-08 22:01:35', '19', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','1','0','','76-1,','1','1','0','0','200','200','0','','0','0.00','0','0','0','0'); -- id=3
UPDATE sellbilldetail SET  lastbuyprice = 150.00 , meanbuyprice = 150.00, lastbuyprice_withDiscount = 150.00, meanbuyprice_withDiscount = 150.00
        , lastbuyprice_withTax = 150, meanbuyprice_withTax = 150, lastbuyprice_withDiscountAndTax = 150
                where sellbilldetailid = 3;
 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 (19, '2026-10-08', 200, 150, 150
                    , 150, 150, 150, 150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 150, 150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+200, sellCostBuyPrice =sellCostBuyPrice+150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+150
                        , 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-08', 200, 150, 150
                    , 150, 150, 150, 150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 150, 150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+200, sellCostBuyPrice =sellCostBuyPrice+150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+150
                        , 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 = '7', userid = '2', storedetaildate = '2026-10-08 22:01:35' WHERE storedetailid = '80';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('19', '2', '1', '1', '2', 'اضافة فاتورة مبيعات', 'sellbillController.php', '8', '7', '2', '2026-10-08 22:01:35','0','0'); -- id=171
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '450',  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 ('0','450', '0', '2', 'اضافة فاتورة مبيعات', '2', '450', '2026-10-08 22:01:35', '2',  'sellbillController.php','3','','0'); -- id=5
UPDATE client SET  delegateid = 3 where clientid = 3;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '450', '450', '2026-10-08', '2', '0', '0', '2026-10-08 22:01:35','اضافة فاتورة مبيعات رقم 2','1','0',null,'0','2','sellbillController.php?do=showDetail&sellbillid=2'); -- id=47
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('47', '430', '450', '','0'); -- id=47
UPDATE accountstree SET name = 'محمود ', customName = 'محمود ', customNameEn = 'محمود ', nameEn = 'محمود ', parent = '58', accountNature = '0', theValue = '450', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '2', del = '0', sysdate = '2026-10-08 21:18:48' WHERE id = '430';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('47', '143', '450', '','0'); -- id=47
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1200', 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 ( '450', '450', '2026-10-08', '2', '0', '0', '2026-10-08 22:01:35','اضافة فاتورة مبيعات رقم 2 - تحصيل الفاتورة من العميل','1','0',null,'0','2','sellbillController.php?do=showDetail&sellbillid=2'); -- id=48
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('48', '423', '450', '','0'); -- id=48
UPDATE accountstree SET name = 'خزنة المتاجر', customName = 'خزنة المتاجر', customNameEn = 'خزنة المتاجر', nameEn = 'خزنة المتاجر', parent = '40', accountNature = '0', theValue = '450', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:53:42' WHERE id = '423';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('48', '430', '450', '','0'); -- id=48
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 = '', userid = '2', del = '0', sysdate = '2026-10-08 21:18:48' WHERE id = '430';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '350', '350', '2026-10-08', '2', '0', '0', '2026-10-08 22:01:35','اضافة فاتورة مبيعات رقم 2 - صرف البضاعة من المخزن','1','0',null,'0','2','sellbillController.php?do=showDetail&sellbillid=2'); -- id=49
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('49', '402', '350', '','0'); -- id=49
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '810', 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 ('49', '419', '350', '','0'); -- id=49
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '81238', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:53:03' WHERE id = '419';
update sellbill set dailyentryid='47,48,49' where sellbillid=2;
 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-08', 450, 350, 350
                    , 350, 350, 350, 350
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,350, 350, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+450, sellCostBuyPrice =sellCostBuyPrice+350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+350, sellCostMeanBuyPrice = sellCostMeanBuyPrice+350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+350, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+350
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+350
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+350
                        , 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 (3, '2026-10-08', 450, 350, 350
                    , 350, 350, 350, 350
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,350, 350, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+450, sellCostBuyPrice =sellCostBuyPrice+350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+350, sellCostMeanBuyPrice = sellCostMeanBuyPrice+350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+350, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+350
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+350
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+350
                        , 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, 450, 350, 350
                    , 350, 350, 350, 350, 350, 350)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+450, netSellCostBuyPrice = netSellCostBuyPrice+350
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+350
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+350
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+350
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+350
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+350
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+350
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+350;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac7e84cd26f6 and sellbillId = 2 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:31:36";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:01:36", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:01:36', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=334
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:31:54";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:01:54", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 22:01:54', '2', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=335
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:32:21";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:02:21", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:02:21', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=336
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 ('محمود عادل' , '', '01274157740', '', '0', '', '0', '2026-10-08 22:03:49', '2', '0','','0','','-10','0','10000',',','-1','0','.','0','0','.','2026-10-08','0','0','','0','0','0','','','0','0','','','','','','','','','','-1','','','','0','','','0','0',''); -- id=4
INSERT INTO tamweenclientdetail (clientid, noOfPersonsTamween, noOfPersonsDa3m, cardNum, cardPassword) VALUES ('4', '0', '0', '', ''); -- id=4
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 ('4','0','0','0','إضافة عميل جديد','4', '0', '2026-10-08 22:03:49', '2', 'clientController.php', '', '0', '0', null, '0', null, null,'', '0','1','1','0','1','','0','0','',''); -- id=5
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', '', '2', '0', '2026-10-08 22:03:49'); -- id=431
UPDATE client SET clientname = 'محمود عادل', clientaddress = '', clientphone = '01274157740', clientmobile = '', clientdebt = '0.00', clientdetails = '', conditions = '0', clientdate = '2026-10-08', userid = '2'  , 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='431',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 = '4';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:34:44";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:04:44", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:04:44', '2', 'addAndRetuen', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=337

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac7e8be033c5
-- ----------------------------------------------------------------------------------------------------

BEGIN;
CALL clientInUse(4,@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,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-08 22:04:44', '06ac7e8be033c5', '4', '0.00', '0', '0', '1', '1000.00', '1000', '1000', '0', '2', '2026-10-08 22:04:44', '', '2', '0', 'محمود عادل', '2', '1', '3', '4', 'محمود عادل', '2' ,'0','','','','','-1','0','0','0','0','0','1000','0','','0','1','0','1000','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-08','1','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=3
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '4';
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 ('4','0.00','0','0','اضافة فاتورة مبيعات ( نقدى :0, فيزا :1000 )','3', '0', '2026-10-08 22:04:44', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '1000', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-08 22:04:44','0','0','',''); -- id=6
UPDATE client SET  inUse = 0 where clientid = 4;
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 where id = 66;
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 ('150','00017', '3', '3', '16', '1', '350', '350', '0', '', '1', '2026-10-08 22:04:44', '16', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','1','0','','66-1,','1','1','0','0','350','350','0','','0','0.00','0','0','0','0'); -- id=4
UPDATE sellbilldetail SET  lastbuyprice = 150.00 , meanbuyprice = 150.00, lastbuyprice_withDiscount = 150.00, meanbuyprice_withDiscount = 150.00
        , lastbuyprice_withTax = 150, meanbuyprice_withTax = 150, lastbuyprice_withDiscountAndTax = 150
                where sellbilldetailid = 4;
 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 (16, '2026-10-08', 350, 150, 150
                    , 150, 150, 150, 150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 150, 150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+350, sellCostBuyPrice =sellCostBuyPrice+150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+150
                        , 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-08', 350, 150, 150
                    , 150, 150, 150, 150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 150, 150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+350, sellCostBuyPrice =sellCostBuyPrice+150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+150
                        , 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 = '9', userid = '2', storedetaildate = '2026-10-08 22:04:44' WHERE storedetailid = '75';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('16', '2', '1', '1', '3', 'اضافة فاتورة مبيعات', 'sellbillController.php', '10', '9', '2', '2026-10-08 22:04:44','0','0'); -- id=172
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 where id = 78;
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','00055', '3', '1', '6', '1', '650', '650', '0', '', '1', '2026-10-08 22:04:44', '6', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','1','0','','78-1,','1','1','0','0','650','650','0','','0','0.00','0','0','0','0'); -- id=5
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 = 5;
 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 (6, '2026-10-08', 650, 460, 460
                    , 460, 460, 460, 460
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 460, 460, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+650, sellCostBuyPrice =sellCostBuyPrice+460
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+460, sellCostMeanBuyPrice = sellCostMeanBuyPrice+460
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+460, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+460
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+460
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+460
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+460
                        , 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-08', 650, 460, 460
                    , 460, 460, 460, 460
                    , 0, 0, 0, 0
                    , 0, 0, 0, 460, 460, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+650, sellCostBuyPrice =sellCostBuyPrice+460
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+460, sellCostMeanBuyPrice = sellCostMeanBuyPrice+460
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+460, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+460
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+460
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+460
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+460
                        , 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 = '3', userid = '2', storedetaildate = '2026-10-08 22:04:44' WHERE storedetailid = '81';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '2', '1', '1', '3', 'اضافة فاتورة مبيعات', 'sellbillController.php', '4', '3', '2', '2026-10-08 22:04:44','0','0'); -- id=173
UPDATE bankaccount SET  accountbeginingbalance = '1000' WHERE accountid = '1';
INSERT INTO accountmovement (accountmovementbefore, accountmovementamount, accountmovementafter, accountmovementtype, processname, accountmovementmodelid, accountmovementdate, userid, accountid, tablename, bankid, accountmovementcomment, accountmovementkindid,clientdebtchangeidfk,clientid) VALUES ('0.00', '1000', '1000', '0', 'سداد فاتورة', '3', '2026-10-08 22:04:44', '2', '1', 'sellbillController.php', '1', '', '0','0','0'); -- id=1
UPDATE client SET  delegateid = 4 where clientid = 4;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1000', '1000', '2026-10-08', '2', '0', '0', '2026-10-08 22:04:44','اضافة فاتورة مبيعات رقم 3','1','0',null,'0','3','sellbillController.php?do=showDetail&sellbillid=3'); -- id=50
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('50', '431', '1000', '','0'); -- id=50
UPDATE accountstree SET name = 'محمود عادل', customName = 'محمود عادل', customNameEn = 'محمود عادل', nameEn = 'محمود عادل', parent = '58', accountNature = '0', theValue = '1000', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '2', del = '0', sysdate = '2026-10-08 22:03:49' WHERE id = '431';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('50', '143', '1000', '','0'); -- id=50
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '2200', 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 ( '1000', '1000', '2026-10-08', '2', '0', '0', '2026-10-08 22:04:44','اضافة فاتورة مبيعات رقم 3 - تحصيل الفاتورة من العميل','1','0',null,'0','3','sellbillController.php?do=showDetail&sellbillid=3'); -- id=51
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('51', '425', '1000', '','0'); -- id=51
UPDATE accountstree SET name = 'حساب انستا / البنك الاهلى', customName = 'حساب انستا / البنك الاهلى', customNameEn = 'حساب انستا / البنك الاهلى', nameEn = 'حساب انستا / البنك الاهلى', parent = '38', accountNature = '0', theValue = '1000', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:55:59' WHERE id = '425';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('51', '431', '1000', '','0'); -- id=51
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 = '', userid = '2', del = '0', sysdate = '2026-10-08 22:03:49' WHERE id = '431';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '610', '610', '2026-10-08', '2', '0', '0', '2026-10-08 22:04:44','اضافة فاتورة مبيعات رقم 3 - صرف البضاعة من المخزن','1','0',null,'0','3','sellbillController.php?do=showDetail&sellbillid=3'); -- id=52
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('52', '402', '610', '','0'); -- id=52
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1420', 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 ('52', '419', '610', '','0'); -- id=52
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '80628', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:53:03' WHERE id = '419';
update sellbill set dailyentryid='50,51,52' where sellbillid=3;
 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-08', 1000, 610, 610
                    , 610, 610, 610, 610
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,610, 610, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1000, sellCostBuyPrice =sellCostBuyPrice+610
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+610, sellCostMeanBuyPrice = sellCostMeanBuyPrice+610
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+610, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+610
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+610
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+610
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+610
                        , 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 (4, '2026-10-08', 1000, 610, 610
                    , 610, 610, 610, 610
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,610, 610, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1000, sellCostBuyPrice =sellCostBuyPrice+610
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+610, sellCostMeanBuyPrice = sellCostMeanBuyPrice+610
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+610, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+610
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+610
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+610
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+610
                        , 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, 1000, 610, 610
                    , 610, 610, 610, 610, 610, 610)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+1000, netSellCostBuyPrice = netSellCostBuyPrice+610
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+610
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+610
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+610
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+610
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+610
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+610
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+610;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac7e8be033c5 and sellbillId = 3 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:34:44";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:04:44", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:04:44', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=338
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:34:56";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:04:56", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 22:04:56', '2', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=339
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:35:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:05:15", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:05:15', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=340
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:36:21";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:06:21", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:06:21', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=341
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:37:40";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:07:40", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:07:40', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=342
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:39: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 = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:39:59";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:09:59", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 22:09:59', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=343
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 18:39:59";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 22:09:59", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 22:09:59', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=344
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:40:02";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:10:02", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:10:02', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=345
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:41:47";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:11:47", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 22:11:47', '2', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=346
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:42:38";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:12:38", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:12:38', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=347
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:42:43";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:12:43", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 22:12:43', '2', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=348
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:42:44";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:12:44", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:12:44', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=349
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:48: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 programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:49:00";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:19:00", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 22:19:00', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=350
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 18:49:00";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 22:19:00", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 22:19:00', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=351
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:49:04";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:19:04", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:19:04', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=352
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:51:01";
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 = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:51:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:21:15", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 22:21:15', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=353
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 18:51:15";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 22:21:15", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 22:21:15', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=354
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:51:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:21:20", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 22:21:20', '2', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=edit&userid=2'); -- id=355
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:51:35";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:21:35", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 22:21:35', '2', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=show'); -- id=356
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:52:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:22:15", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 22:22:15', '2', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=edit&userid=2'); -- id=357
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:52:18";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:22:18", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 22:22:18', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=358
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 18:52:18";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 22:22:18", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 22:22:18', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=359
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:52:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:22:20", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:22:20', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=360
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:52:41";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:22:41", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:22:41', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=361
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 18:52:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:22:50", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:22:50', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=362
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:01: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 programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:01:29";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 22:31:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 22:31:29', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=363
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 19:01:29";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 22:31:29', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=364
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:01:40";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 22:31:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 22:31:40', '1', 'o.royalgt4.com:443/erp/controllers/programsettingsController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php'); -- id=365
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:01:58";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 22:31:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 22:31:58', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php?do=update'); -- id=366
UPDATE ebillsetting SET eTaxNum = '', eTaxNumBranch = '', eGovernorate = '', eCity = '', eStreet = '', eBuildingNum = '', eTaxType = '', eTaxTypeNum = '', eCompanyNameInTaxCard = '', eunitInTax = '' WHERE id = '1';
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '0' , 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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:01:58";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-08 22:31:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-10-08 22:31:59', '1', 'o.royalgt4.com:443/erp/controllers/programsettingsController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/programsettingsController.php'); -- id=367
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-08 22:51:10', '2', '0','','0','','-10','0','10000',',','-1','0','.','0','0','.','2026-10-08','0','0','','0','0','0','','','0','0','','','','','','','','','','-1','','','','0','','','0','0',''); -- id=5
INSERT INTO tamweenclientdetail (clientid, noOfPersonsTamween, noOfPersonsDa3m, cardNum, cardPassword) VALUES ('5', '0', '0', '', ''); -- id=5
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 ('5','0','0','0','إضافة عميل جديد','5', '0', '2026-10-08 22:51:10', '2', 'clientController.php', '', '0', '0', null, '0', null, null,'', '0','1','1','0','1','','0','0','',''); -- id=7
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', '', '2', '0', '2026-10-08 22:51:10'); -- id=432
UPDATE client SET clientname = 'سيف', clientaddress = '', clientphone = '', clientmobile = '', clientdebt = '0.00', clientdetails = '', conditions = '0', clientdate = '2026-10-08', userid = '2'  , 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='432',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 = '5';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:21:21";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:51:21", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:51:21', '2', 'addAndRetuen', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=368

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac7ed8a64de7
-- ----------------------------------------------------------------------------------------------------

BEGIN;
CALL clientInUse(5,@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,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-08 22:51:21', '06ac7ed8a64de7', '5', '0.00', '0', '0', '1', '950.00', '950', '950', '0', '2', '2026-10-08 22:51:21', '', '2', '0', 'سيف', '2', '1', '3', '3', 'سيف', '1' ,'0','','','','','-1','0','0','0','0','0','950','0','','0','1','950','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-08','1','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=4
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '5';
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 ('5','0.00','0','0','اضافة فاتورة مبيعات','4', '0', '2026-10-08 22:51:21', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '950', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-08 22:51:21','0','0','',''); -- id=8
UPDATE client SET  inUse = 0 where clientid = 5;
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 where id = 4;
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 ('700','00102', '4', '5', '28', '1', '950', '950', '0', '', '1', '2026-10-08 22:51:21', '28', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','1','0','','4-1,','1','1','0','0','950','950','0','','0','0.00','0','0','0','0'); -- id=6
UPDATE sellbilldetail SET  lastbuyprice = 700.00 , meanbuyprice = 700.00, lastbuyprice_withDiscount = 700.00, meanbuyprice_withDiscount = 700.00
        , lastbuyprice_withTax = 700, meanbuyprice_withTax = 700, lastbuyprice_withDiscountAndTax = 700
                where sellbilldetailid = 6;
 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 (28, '2026-10-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0, 700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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 = '2', storedetaildate = '2026-10-08 22:51:21' WHERE storedetailid = '44';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('28', '2', '1', '1', '4', 'اضافة فاتورة مبيعات', 'sellbillController.php', '9', '8', '2', '2026-10-08 22:51:21','0','0'); -- id=174
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '1400',  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 ('450','950', '0', '2', 'اضافة فاتورة مبيعات', '4', '1400', '2026-10-08 22:51:21', '2',  'sellbillController.php','5','','0'); -- id=6
UPDATE client SET  delegateid = 3 where clientid = 5;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '950', '950', '2026-10-08', '2', '0', '0', '2026-10-08 22:51:21','اضافة فاتورة مبيعات رقم 4','1','0',null,'0','4','sellbillController.php?do=showDetail&sellbillid=4'); -- id=53
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('53', '432', '950', '','0'); -- id=53
UPDATE accountstree SET name = 'سيف', customName = 'سيف', customNameEn = 'سيف', nameEn = 'سيف', parent = '58', accountNature = '0', theValue = '950', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '2', del = '0', sysdate = '2026-10-08 22:51:10' WHERE id = '432';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('53', '143', '950', '','0'); -- id=53
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '3150', 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 ( '950', '950', '2026-10-08', '2', '0', '0', '2026-10-08 22:51:21','اضافة فاتورة مبيعات رقم 4 - تحصيل الفاتورة من العميل','1','0',null,'0','4','sellbillController.php?do=showDetail&sellbillid=4'); -- id=54
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('54', '423', '950', '','0'); -- id=54
UPDATE accountstree SET name = 'خزنة المتاجر', customName = 'خزنة المتاجر', customNameEn = 'خزنة المتاجر', nameEn = 'خزنة المتاجر', parent = '40', accountNature = '0', theValue = '1400', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:53:42' WHERE id = '423';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('54', '432', '950', '','0'); -- id=54
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 = '', userid = '2', del = '0', sysdate = '2026-10-08 22:51:10' WHERE id = '432';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '700', '700', '2026-10-08', '2', '0', '0', '2026-10-08 22:51:21','اضافة فاتورة مبيعات رقم 4 - صرف البضاعة من المخزن','1','0',null,'0','4','sellbillController.php?do=showDetail&sellbillid=4'); -- id=55
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('55', '402', '700', '','0'); -- id=55
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '2120', 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 ('55', '419', '700', '','0'); -- id=55
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '79928', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:53:03' WHERE id = '419';
update sellbill set dailyentryid='53,54,55' where sellbillid=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-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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 (5, '2026-10-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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, 950, 700, 700
                    , 700, 700, 700, 700, 700, 700)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+950, netSellCostBuyPrice = netSellCostBuyPrice+700
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+700
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+700
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+700
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+700
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+700
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+700
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+700;
COMMIT;

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

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:21:21";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:51:21", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:51:21', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=369
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 ('احمد وائل' , '', '', '01026255673', '0', '', '0', '2026-10-08 22:57:51', '2', '0','','0','','-10','0','10000',',','-1','0','.','0','0','.','2026-10-08','0','0','','0','0','0','','','0','0','','','','','','','','','','-1','','','','0','','','0','0',''); -- id=6
INSERT INTO tamweenclientdetail (clientid, noOfPersonsTamween, noOfPersonsDa3m, cardNum, cardPassword) VALUES ('6', '0', '0', '', ''); -- id=6
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','0','0','0','إضافة عميل جديد','6', '0', '2026-10-08 22:57:51', '2', 'clientController.php', '', '0', '0', null, '0', null, null,'', '0','1','1','0','1','','0','0','',''); -- id=9
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', '', '2', '0', '2026-10-08 22:57:51'); -- id=433
UPDATE client SET clientname = 'احمد وائل', clientaddress = '', clientphone = '', clientmobile = '01026255673', clientdebt = '0.00', clientdetails = '', conditions = '0', clientdate = '2026-10-08', userid = '2'  , 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='433',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 = '6';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:28:59";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:58:59", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:58:59', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=370
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:29:26";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:59:26", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:59:26', '2', 'addAndRetuen', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=371

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac7f6035ae13
-- ----------------------------------------------------------------------------------------------------

BEGIN;
CALL clientInUse(6,@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,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-08 22:59:26', '06ac7f6035ae13', '6', '0.00', '0', '0', '1', '950.00', '950', '950', '0', '2', '2026-10-08 22:59:26', '', '2', '0', 'احمد وائل', '2', '1', '3', '3', 'احمد وائل', '1' ,'0','','','','','-1','0','0','0','0','0','950','0','','0','1','950','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-08','1','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=5
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '6';
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','0.00','0','0','اضافة فاتورة مبيعات','5', '0', '2026-10-08 22:59:26', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '950', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-08 22:59:26','0','0','',''); -- id=10
UPDATE client SET  inUse = 0 where clientid = 6;
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 where id = 4;
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 ('700','00102', '5', '5', '28', '1', '950', '950', '0', '', '1', '2026-10-08 22:59:26', '28', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','1','0','','4-1,','1','1','0','0','950','950','0','','0','0.00','0','0','0','0'); -- id=7
UPDATE sellbilldetail SET  lastbuyprice = 700.00 , meanbuyprice = 700.00, lastbuyprice_withDiscount = 700.00, meanbuyprice_withDiscount = 700.00
        , lastbuyprice_withTax = 700, meanbuyprice_withTax = 700, lastbuyprice_withDiscountAndTax = 700
                where sellbilldetailid = 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 (28, '2026-10-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0, 700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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 = '7', userid = '2', storedetaildate = '2026-10-08 22:59:26' WHERE storedetailid = '44';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('28', '2', '1', '1', '5', 'اضافة فاتورة مبيعات', 'sellbillController.php', '8', '7', '2', '2026-10-08 22:59:26','0','0'); -- id=175
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '2350',  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 ('1400','950', '0', '2', 'اضافة فاتورة مبيعات', '5', '2350', '2026-10-08 22:59:26', '2',  'sellbillController.php','6','','0'); -- id=7
UPDATE client SET  delegateid = 3 where clientid = 6;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '950', '950', '2026-10-08', '2', '0', '0', '2026-10-08 22:59:26','اضافة فاتورة مبيعات رقم 5','1','0',null,'0','5','sellbillController.php?do=showDetail&sellbillid=5'); -- id=56
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('56', '433', '950', '','0'); -- id=56
UPDATE accountstree SET name = 'احمد وائل', customName = 'احمد وائل', customNameEn = 'احمد وائل', nameEn = 'احمد وائل', parent = '58', accountNature = '0', theValue = '950', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '2', del = '0', sysdate = '2026-10-08 22:57:51' WHERE id = '433';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('56', '143', '950', '','0'); -- id=56
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '4100', 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 ( '950', '950', '2026-10-08', '2', '0', '0', '2026-10-08 22:59:26','اضافة فاتورة مبيعات رقم 5 - تحصيل الفاتورة من العميل','1','0',null,'0','5','sellbillController.php?do=showDetail&sellbillid=5'); -- id=57
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('57', '423', '950', '','0'); -- id=57
UPDATE accountstree SET name = 'خزنة المتاجر', customName = 'خزنة المتاجر', customNameEn = 'خزنة المتاجر', nameEn = 'خزنة المتاجر', parent = '40', accountNature = '0', theValue = '2350', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:53:42' WHERE id = '423';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('57', '433', '950', '','0'); -- id=57
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 = '', userid = '2', del = '0', sysdate = '2026-10-08 22:57:51' WHERE id = '433';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '700', '700', '2026-10-08', '2', '0', '0', '2026-10-08 22:59:26','اضافة فاتورة مبيعات رقم 5 - صرف البضاعة من المخزن','1','0',null,'0','5','sellbillController.php?do=showDetail&sellbillid=5'); -- id=58
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('58', '402', '700', '','0'); -- id=58
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '2820', 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 ('58', '419', '700', '','0'); -- id=58
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '79228', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:53:03' WHERE id = '419';
update sellbill set dailyentryid='56,57,58' where sellbillid=5;
 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-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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 (6, '2026-10-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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, 950, 700, 700
                    , 700, 700, 700, 700, 700, 700)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+950, netSellCostBuyPrice = netSellCostBuyPrice+700
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+700
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+700
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+700
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+700
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+700
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+700
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+700;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac7f6035ae13 and sellbillId = 5 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:29:26";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 22:59:26", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 22:59:26', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=372
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 ('محمد حسام' , '', '', '01227081199', '0', '', '0', '2026-10-08 23:13:45', '2', '0','','0','','-10','0','10000',',','-1','0','.','0','0','.','2026-10-08','0','0','','0','0','0','','','0','0','','','','','','','','','','-1','','','','0','','','0','0',''); -- id=7
INSERT INTO tamweenclientdetail (clientid, noOfPersonsTamween, noOfPersonsDa3m, cardNum, cardPassword) VALUES ('7', '0', '0', '', ''); -- id=7
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 ('7','0','0','0','إضافة عميل جديد','7', '0', '2026-10-08 23:13:45', '2', 'clientController.php', '', '0', '0', null, '0', null, null,'', '0','1','1','0','1','','0','0','',''); -- id=11
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', '', '2', '0', '2026-10-08 23:13:45'); -- id=434
UPDATE client SET clientname = 'محمد حسام', clientaddress = '', clientphone = '', clientmobile = '01227081199', clientdebt = '0.00', clientdetails = '', conditions = '0', clientdate = '2026-10-08', userid = '2'  , 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='434',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 = '7';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:45:24";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:15:24", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 23:15:24', '2', 'addAndRetuen', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=373

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac7f61e978b1
-- ----------------------------------------------------------------------------------------------------

BEGIN;
CALL clientInUse(7,@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,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-08 23:15:24', '06ac7f61e978b1', '7', '0.00', '0', '0', '1', '1300.00', '1300', '1300', '0', '2', '2026-10-08 23:15:24', '', '2', '0', 'محمد حسام', '2', '1', '3', '3', 'محمد حسام', '2' ,'0','','','','','-1','0','0','0','0','0','1300','0','','0','1','0','1300','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-08','1','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=6
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '7';
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 ('7','0.00','0','0','اضافة فاتورة مبيعات ( نقدى :0, فيزا :1300 )','6', '0', '2026-10-08 23:15:25', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '1300', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-08 23:15:24','0','0','',''); -- id=12
UPDATE client SET  inUse = 0 where clientid = 7;
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 where id = 66;
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 ('150','00017', '6', '3', '16', '1', '350', '350', '0', '', '1', '2026-10-08 23:15:25', '16', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','1','0','','66-1,','1','1','0','0','350','350','0','','0','0.00','0','0','0','0'); -- id=8
UPDATE sellbilldetail SET  lastbuyprice = 150.00 , meanbuyprice = 150.00, lastbuyprice_withDiscount = 150.00, meanbuyprice_withDiscount = 150.00
        , lastbuyprice_withTax = 150, meanbuyprice_withTax = 150, lastbuyprice_withDiscountAndTax = 150
                where sellbilldetailid = 8;
 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 (16, '2026-10-08', 350, 150, 150
                    , 150, 150, 150, 150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 150, 150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+350, sellCostBuyPrice =sellCostBuyPrice+150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+150
                        , 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-08', 350, 150, 150
                    , 150, 150, 150, 150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 150, 150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+350, sellCostBuyPrice =sellCostBuyPrice+150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+150
                        , 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 = '2', storedetaildate = '2026-10-08 23:15:25' WHERE storedetailid = '75';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('16', '2', '1', '1', '6', 'اضافة فاتورة مبيعات', 'sellbillController.php', '9', '8', '2', '2026-10-08 23:15:25','0','0'); -- id=176
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 where id = 58;
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 ('700','00103', '6', '5', '29', '1', '950', '950', '0', '', '1', '2026-10-08 23:15:25', '29', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','1','0','','58-1,','1','1','0','0','950','950','0','','0','0.00','0','0','0','0'); -- id=9
UPDATE sellbilldetail SET  lastbuyprice = 700.00 , meanbuyprice = 700.00, lastbuyprice_withDiscount = 700.00, meanbuyprice_withDiscount = 700.00
        , lastbuyprice_withTax = 700, meanbuyprice_withTax = 700, lastbuyprice_withDiscountAndTax = 700
                where sellbilldetailid = 9;
 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 (29, '2026-10-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0, 700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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 = '9', userid = '2', storedetaildate = '2026-10-08 23:15:25' WHERE storedetailid = '71';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('29', '2', '1', '1', '6', 'اضافة فاتورة مبيعات', 'sellbillController.php', '10', '9', '2', '2026-10-08 23:15:25','0','0'); -- id=177
UPDATE bankaccount SET  accountbeginingbalance = '2300' WHERE accountid = '1';
INSERT INTO accountmovement (accountmovementbefore, accountmovementamount, accountmovementafter, accountmovementtype, processname, accountmovementmodelid, accountmovementdate, userid, accountid, tablename, bankid, accountmovementcomment, accountmovementkindid,clientdebtchangeidfk,clientid) VALUES ('1000.00', '1300', '2300', '0', 'سداد فاتورة', '6', '2026-10-08 23:15:25', '2', '1', 'sellbillController.php', '1', '', '0','0','0'); -- id=2
UPDATE client SET  delegateid = 3 where clientid = 7;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1300', '1300', '2026-10-08', '2', '0', '0', '2026-10-08 23:15:25','اضافة فاتورة مبيعات رقم 6','1','0',null,'0','6','sellbillController.php?do=showDetail&sellbillid=6'); -- id=59
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('59', '434', '1300', '','0'); -- id=59
UPDATE accountstree SET name = 'محمد حسام', customName = 'محمد حسام', customNameEn = 'محمد حسام', nameEn = 'محمد حسام', parent = '58', accountNature = '0', theValue = '1300', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '2', del = '0', sysdate = '2026-10-08 23:13:45' WHERE id = '434';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('59', '143', '1300', '','0'); -- id=59
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '5400', 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 ( '1300', '1300', '2026-10-08', '2', '0', '0', '2026-10-08 23:15:25','اضافة فاتورة مبيعات رقم 6 - تحصيل الفاتورة من العميل','1','0',null,'0','6','sellbillController.php?do=showDetail&sellbillid=6'); -- id=60
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('60', '425', '1300', '','0'); -- id=60
UPDATE accountstree SET name = 'حساب انستا / البنك الاهلى', customName = 'حساب انستا / البنك الاهلى', customNameEn = 'حساب انستا / البنك الاهلى', nameEn = 'حساب انستا / البنك الاهلى', parent = '38', accountNature = '0', theValue = '2300', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:55:59' WHERE id = '425';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('60', '434', '1300', '','0'); -- id=60
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 = '', userid = '2', del = '0', sysdate = '2026-10-08 23:13:45' WHERE id = '434';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '850', '850', '2026-10-08', '2', '0', '0', '2026-10-08 23:15:25','اضافة فاتورة مبيعات رقم 6 - صرف البضاعة من المخزن','1','0',null,'0','6','sellbillController.php?do=showDetail&sellbillid=6'); -- id=61
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('61', '402', '850', '','0'); -- id=61
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '3670', 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 ('61', '419', '850', '','0'); -- id=61
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '78378', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:53:03' WHERE id = '419';
update sellbill set dailyentryid='59,60,61' where sellbillid=6;
 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-08', 1300, 850, 850
                    , 850, 850, 850, 850
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,850, 850, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1300, sellCostBuyPrice =sellCostBuyPrice+850
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+850, sellCostMeanBuyPrice = sellCostMeanBuyPrice+850
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+850, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+850
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+850
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+850
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+850
                        , 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 (7, '2026-10-08', 1300, 850, 850
                    , 850, 850, 850, 850
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,850, 850, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1300, sellCostBuyPrice =sellCostBuyPrice+850
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+850, sellCostMeanBuyPrice = sellCostMeanBuyPrice+850
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+850, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+850
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+850
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+850
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+850
                        , 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, 1300, 850, 850
                    , 850, 850, 850, 850, 850, 850)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+1300, netSellCostBuyPrice = netSellCostBuyPrice+850
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+850
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+850
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+850
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+850
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+850
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+850
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+850;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac7f61e978b1 and sellbillId = 6 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:45:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:15:25", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 23:15:25', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=374
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:51:36";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:21:36", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 23:21:36', '2', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=375
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:55:14";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:25:14", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 23:25:14', '2', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=376
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:55:36";
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 = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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 = '0' , 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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:55:47";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:25:47", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 23:25:47', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=377
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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 = '0' , 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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 19:55:47";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 23:25:47", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 23:25:47', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=378
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:55:51";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:25:51", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 23:25:51', '2', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=379
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:55:59";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:25:59", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-08 23:25:59', '2', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=edit&userid=2'); -- id=380
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:56:10";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:26:10", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 23:26:10', '2', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=381
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:56:11";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:26:11", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 23:26:11', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=382
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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 = '0' , 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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 19:56:11";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 23:26:11", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 23:26:11', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=383
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:56:12";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:26:12", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 23:26:12', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=384
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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 = '0' , 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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 19:56:12";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 23:26:12", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 23:26:12', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=385
UPDATE user SET loginip = "" WHERE userid = 2;
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 = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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 = '0' , 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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:56:23";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:26:23", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 23:26:23', '4', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=386
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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 = '0' , 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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 19:56:23";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 23:26:23', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=387
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:56:33";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 23:26:33', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=388
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:56:34";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:26:34", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 23:26:34', '4', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=389
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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 = '0' , 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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 19:56:34";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 23:26:34', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=390
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:56:37";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 23:26:37', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=391
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:56:37";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:26:37", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 23:26:37', '4', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=392
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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 = '0' , 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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 19:56:37";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 23:26:37', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=393
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:56:38";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 23:26:38', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=394
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:56:39";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:26:39", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 23:26:39', '4', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=395
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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 = '0' , 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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 19:56:39";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 23:26:39', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=396
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:56: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 programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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 = '0' , 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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:57:04";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:27:04", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-08 23:27:04', '2', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=397
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'abdo', address = 'بلبيس شارع المتاجر يجوار مكتبه شخابيط محل abdo', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '01289521824', faxnumber = '', email = 'حافظ ع الفاتوره ', website = '', logo = 'db42e04ec738d60054dfe5cdbb0e6c3c.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 = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-08',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 = '0' , 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='L.E',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='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
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-08 19:57:04";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-08 23:27:04", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-08 23:27:04', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=398
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 19:57:06";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:27:06", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-08 23:27:06', '2', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=399
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 20:14:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:44:25", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 23:44:25', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=400
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 ('ابراهيم عبدالعظيم' , '', '', '01210047013', '0', '', '0', '2026-10-08 23:44:47', '2', '0','','0','','-10','0','10000',',','-1','0','.','0','0','.','2026-10-08','0','0','','0','0','0','','','0','0','','','','','','','','','','-1','','','','0','','','0','0',''); -- id=8
INSERT INTO tamweenclientdetail (clientid, noOfPersonsTamween, noOfPersonsDa3m, cardNum, cardPassword) VALUES ('8', '0', '0', '', ''); -- id=8
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 ('8','0','0','0','إضافة عميل جديد','8', '0', '2026-10-08 23:44:47', '2', 'clientController.php', '', '0', '0', null, '0', null, null,'', '0','1','1','0','1','','0','0','',''); -- id=13
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', '', '2', '0', '2026-10-08 23:44:47'); -- id=435
UPDATE client SET clientname = 'ابراهيم عبدالعظيم', clientaddress = '', clientphone = '', clientmobile = '01210047013', clientdebt = '0.00', clientdetails = '', conditions = '0', clientdate = '2026-10-08', userid = '2'  , 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='435',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 = '8';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 20:16:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:46:05", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 23:46:05', '2', 'addAndRetuen', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=401

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac800a9354f4
-- ----------------------------------------------------------------------------------------------------

BEGIN;
CALL clientInUse(8,@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,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-08 23:46:05', '06ac800a9354f4', '8', '0.00', '0', '0', '1', '950.00', '950', '950', '0', '2', '2026-10-08 23:46:05', '', '2', '0', 'ابراهيم عبدالعظيم', '2', '1', '3', '3', 'ابراهيم عبدالعظيم', '1' ,'0','','','','','-1','0','0','0','0','0','950','0','','0','1','950','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-08','1','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=7
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '8';
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 ('8','0.00','0','0','اضافة فاتورة مبيعات','7', '0', '2026-10-08 23:46:05', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '950', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-08 23:46:05','0','0','',''); -- id=14
UPDATE client SET  inUse = 0 where clientid = 8;
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 where id = 58;
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 ('700','00103', '7', '5', '29', '1', '950', '950', '0', '', '1', '2026-10-08 23:46:05', '29', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','1','0','','58-1,','1','1','0','0','950','950','0','','0','0.00','0','0','0','0'); -- id=10
UPDATE sellbilldetail SET  lastbuyprice = 700.00 , meanbuyprice = 700.00, lastbuyprice_withDiscount = 700.00, meanbuyprice_withDiscount = 700.00
        , lastbuyprice_withTax = 700, meanbuyprice_withTax = 700, lastbuyprice_withDiscountAndTax = 700
                where sellbilldetailid = 10;
 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 (29, '2026-10-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0, 700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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 = '2', storedetaildate = '2026-10-08 23:46:05' WHERE storedetailid = '71';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('29', '2', '1', '1', '7', 'اضافة فاتورة مبيعات', 'sellbillController.php', '9', '8', '2', '2026-10-08 23:46:05','0','0'); -- id=178
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '3300',  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 ('2350','950', '0', '2', 'اضافة فاتورة مبيعات', '7', '3300', '2026-10-08 23:46:05', '2',  'sellbillController.php','8','','0'); -- id=8
UPDATE client SET  delegateid = 3 where clientid = 8;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '950', '950', '2026-10-08', '2', '0', '0', '2026-10-08 23:46:05','اضافة فاتورة مبيعات رقم 7','1','0',null,'0','7','sellbillController.php?do=showDetail&sellbillid=7'); -- id=62
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('62', '435', '950', '','0'); -- id=62
UPDATE accountstree SET name = 'ابراهيم عبدالعظيم', customName = 'ابراهيم عبدالعظيم', customNameEn = 'ابراهيم عبدالعظيم', nameEn = 'ابراهيم عبدالعظيم', parent = '58', accountNature = '0', theValue = '950', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '2', del = '0', sysdate = '2026-10-08 23:44:47' WHERE id = '435';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('62', '143', '950', '','0'); -- id=62
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '6350', 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 ( '950', '950', '2026-10-08', '2', '0', '0', '2026-10-08 23:46:05','اضافة فاتورة مبيعات رقم 7 - تحصيل الفاتورة من العميل','1','0',null,'0','7','sellbillController.php?do=showDetail&sellbillid=7'); -- id=63
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('63', '423', '950', '','0'); -- id=63
UPDATE accountstree SET name = 'خزنة المتاجر', customName = 'خزنة المتاجر', customNameEn = 'خزنة المتاجر', nameEn = 'خزنة المتاجر', parent = '40', accountNature = '0', theValue = '3300', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:53:42' WHERE id = '423';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('63', '435', '950', '','0'); -- id=63
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 = '', userid = '2', del = '0', sysdate = '2026-10-08 23:44:47' WHERE id = '435';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '700', '700', '2026-10-08', '2', '0', '0', '2026-10-08 23:46:05','اضافة فاتورة مبيعات رقم 7 - صرف البضاعة من المخزن','1','0',null,'0','7','sellbillController.php?do=showDetail&sellbillid=7'); -- id=64
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('64', '402', '700', '','0'); -- id=64
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '4370', 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 ('64', '419', '700', '','0'); -- id=64
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '77678', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-08 14:53:03' WHERE id = '419';
update sellbill set dailyentryid='62,63,64' where sellbillid=7;
 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-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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 (8, '2026-10-08', 950, 700, 700
                    , 700, 700, 700, 700
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,700, 700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+950, sellCostBuyPrice =sellCostBuyPrice+700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+700
                        , 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, 950, 700, 700
                    , 700, 700, 700, 700, 700, 700)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+950, netSellCostBuyPrice = netSellCostBuyPrice+700
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+700
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+700
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+700
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+700
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+700
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+700
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+700;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac800a9354f4 and sellbillId = 7 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 20:16:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-08 23:46:05", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-08 23:46:05', '2', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=402
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-08 20:28:28";
