-- ALTER TABLE elarabygt4it_erp.accountmovement AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.accountmovementkind AUTO_INCREMENT = 4;
-- ALTER TABLE elarabygt4it_erp.accountstree AUTO_INCREMENT = 420;
-- ALTER TABLE elarabygt4it_erp.accountstreefromprog AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.accountstreesetting AUTO_INCREMENT = 7;
-- ALTER TABLE elarabygt4it_erp.assets AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.assetssale AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.assetscat AUTO_INCREMENT = 25;
-- ALTER TABLE elarabygt4it_erp.bank AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.bankaccount AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.billname AUTO_INCREMENT = 7;
-- ALTER TABLE elarabygt4it_erp.billoperation AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.billproperty AUTO_INCREMENT = 130;
-- ALTER TABLE elarabygt4it_erp.bills AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.billsbuy AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.billsettings AUTO_INCREMENT = 1196;
-- ALTER TABLE elarabygt4it_erp.billsproducts AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.billsproductsbuy AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.billsreturn AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.billsreturnproducts AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.billtemplate AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.billtemplatedetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.bind AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.bindsettlement AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.boarding AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.branch AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buyandruternbill AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buyandruternbillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buyandruternbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buybill AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buybillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buybilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buybilldetailoffer AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buybilloffer AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buypriceshistorybook AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.capital AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.cashtransfer AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.checkcontroller AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.checkdeposit AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.checkwithdrawal AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.claimdebts AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.claimreturnsellbills AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.claims AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.claimsclientbills AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.claimsellbills AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.claimstypeclients AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.client AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.clientarea AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.clientdebtchange AUTO_INCREMENT = 13;
-- ALTER TABLE elarabygt4it_erp.clientpaymentreceiptt AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.clientproductreview AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.clinic AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.collectedparcodestemp AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.commentclient AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.costcenter AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.costcenterdetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.country AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.coupons AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.currency AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.dailyentry AUTO_INCREMENT = 671;
-- ALTER TABLE elarabygt4it_erp.dailyentrycreditor AUTO_INCREMENT = 671;
-- ALTER TABLE elarabygt4it_erp.dailyentrydebtor AUTO_INCREMENT = 671;
-- ALTER TABLE elarabygt4it_erp.damagedproduct AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.datedchecked AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.discountcontrol AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.doctorkashf AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.ebillsetting AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.eclientsetting AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employee AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employeeattendance AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employeeattendancesystem AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employeeclosedaygroupstatus AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employeeclosedayhistory AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employeeclosedaystatus AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employeeclosedaysubgroupstatus AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employeedoctor AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employeedoctordebtandpay AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employeedoctordebtchange AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employeegroup AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employeepersonnel AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.employeesubgroup AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.entryproductspurchased AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.expenseexchange AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.expenses AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.expensestype AUTO_INCREMENT = 65;
-- ALTER TABLE elarabygt4it_erp.goverarea AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.government AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.impotencetreatmentsuppliersave AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.income AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.incometype AUTO_INCREMENT = 8;
-- ALTER TABLE elarabygt4it_erp.insurancecompanies AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.kashf AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.kempiala AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.lastbillidspricesupdated AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.lastbillidsquickprofit AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.maccontrol AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.maintenancecases AUTO_INCREMENT = 5;
-- ALTER TABLE elarabygt4it_erp.maintenancecenters AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.maintenancecomments AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.maintenancecompanies AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.maintenancepolicys AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.maintenanceprocedures AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.maintenances AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.manufacuresetting AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.menuurl AUTO_INCREMENT = 31;
-- ALTER TABLE elarabygt4it_erp.movementmanage AUTO_INCREMENT = 245;
-- ALTER TABLE elarabygt4it_erp.movementmanagedeleted AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_check AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_comreceipt AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_comreceiptdetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_comreceiptimage AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_externalmaintenance AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_finishingpayed AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_handedreport AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_initialmaintenance AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_initialmaintenancedetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_insurance AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_maintenancereceipt AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_maintenancereceiptfinish AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_producthistory AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_stage AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.m_stageproperity AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.newdbbackup AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.newdbname AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.notics AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.offerpricebill AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.offerpricebillprop AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.offerpricecondition AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.onlinestoresetting AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.onlinestoremainsetting AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.onlinetempcategory AUTO_INCREMENT = 82;
-- ALTER TABLE elarabygt4it_erp.onlinetemporder AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.onlinetemporderclient AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.onlinetemporderproduct AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.onlinetempproduct AUTO_INCREMENT = 1937;
-- ALTER TABLE elarabygt4it_erp.onlinetempstoredetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.onlinetempstorereport AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.otherrequest AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.otherstoremovement AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.pages AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.partner AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.partnertransferbetween AUTO_INCREMENT = 25;
-- ALTER TABLE elarabygt4it_erp.partnerwithdrawal AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.paymentmethods AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.paymentnetworks AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.playstationcard AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.playstationclientcard AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.playstationclientcardpayhistory AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.policy AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.product AUTO_INCREMENT = 1292;
-- ALTER TABLE elarabygt4it_erp.productcat AUTO_INCREMENT = 82;
-- ALTER TABLE elarabygt4it_erp.productcatunit AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productingredients AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productionexecution AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productionexecutionoutput AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productionexecutionproduct AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productionexecutionwaste AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productionorder AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productionout AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productionoutdetails AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productionoutmany AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productionoutmanyinproducts AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productionoutmanyoutproducts AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productionrate AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productionrateproduct AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productrecieve AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productrequests AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productserial AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productsetting AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.producttemp AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.producttempunit AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.productunit AUTO_INCREMENT = 1292;
-- ALTER TABLE elarabygt4it_erp.product_images AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.programsettings AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.project AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.projectexchmaterial AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.projectexchmaterialdetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.projectexchmaterialdetailreturn AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.projectexchmaterialreturn AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.projectkind AUTO_INCREMENT = 4;
-- ALTER TABLE elarabygt4it_erp.properties AUTO_INCREMENT = 792;
-- ALTER TABLE elarabygt4it_erp.quickprofitclient AUTO_INCREMENT = 13;
-- ALTER TABLE elarabygt4it_erp.quickprofitday AUTO_INCREMENT = 13;
-- ALTER TABLE elarabygt4it_erp.quickprofitgeneral AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.quickprofitproduct AUTO_INCREMENT = 13;
-- ALTER TABLE elarabygt4it_erp.quickprofitstore AUTO_INCREMENT = 13;
-- ALTER TABLE elarabygt4it_erp.religions AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.relusergroupproperties AUTO_INCREMENT = 3912;
-- ALTER TABLE elarabygt4it_erp.rentbill AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.rentbillprop AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.rentproduct AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.rentstore AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.representativecompany AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.restauranthall AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.restaurantkitchenprint AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.restaurantorder AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.restaurantorderdeliverydetails AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.restaurantorderdetails AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.restaurantplaystation AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.restaurantplaystationplay AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.restaurantprinter AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.restaurantrawdestruction AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.restauranttable AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.returnbuybill AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.returnbuybillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.returnbuybilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.returnsellbill AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.returnsellbillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.returnsellbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.returnsellbillreview AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.richproperity AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.salaryreport AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.saudielectronicinvoice AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.save AUTO_INCREMENT = 3;
-- ALTER TABLE elarabygt4it_erp.savedaily AUTO_INCREMENT = 14;
-- ALTER TABLE elarabygt4it_erp.sellandruternbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbill AUTO_INCREMENT = 7;
-- ALTER TABLE elarabygt4it_erp.sellbillallsavepayments AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbillandreturnreview AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbillandrutern AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbillandruterncurr AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbilldetail AUTO_INCREMENT = 7;
-- ALTER TABLE elarabygt4it_erp.sellbilldetailoffer AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbilldetailorder AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbilldetailtax AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbillimage AUTO_INCREMENT = 9;
-- ALTER TABLE elarabygt4it_erp.sellbilloffer AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbillorder AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbillreview AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.settingoperation AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.shippercompanies AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.simplemanufacturesetting AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.sizecolor AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sizecolorstoredetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sliders AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.soldserialproduct AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sparepart AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sparepartstore AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.sparepartstoredetails AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sparepartstorereport AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.stage AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.stagestep AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.stock_import_logs AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.store AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.storedetail AUTO_INCREMENT = 1292;
-- ALTER TABLE elarabygt4it_erp.storemovement AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.storereport AUTO_INCREMENT = 1304;
-- ALTER TABLE elarabygt4it_erp.studentabsences AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.studentaddsubjectdetails AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.studentaddsubjects AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.students AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.studentsetting AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.studentsexams AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.studentsexamsval AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.studentspaymentsystems AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.studentspays AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.studentsubjectgroupdays AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.studentsubjectgroups AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.studentsubjects AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.suppay AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.supplier AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.supplierdebtchange AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.supplieropen AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.supplieropendebtchange AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.supplieropenexchangeorclosing AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.tamweenbill AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.tamweenclientdetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.tamweenda3mstatus AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.tamweenremainstatus AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.taskorder AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.taskorderproducts AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.taskscases AUTO_INCREMENT = 6;
-- ALTER TABLE elarabygt4it_erp.temreturnsellbill AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.temreturnsellbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.temsellandruternbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.temsellbill AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.temsellbillandrutern AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.temsellbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.toworkshoporder AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.toworkshoporderbill AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.transferbtweenbankaccount AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.transfermoney AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.unit AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.user AUTO_INCREMENT = 3;
-- ALTER TABLE elarabygt4it_erp.usergroup AUTO_INCREMENT = 5;
-- ALTER TABLE elarabygt4it_erp.usergroupadmin AUTO_INCREMENT = 1045;
-- ALTER TABLE elarabygt4it_erp.vatpayment AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.wishlist AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.workshop AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.workstation AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.workstationassets AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.workstationworker AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.typeclient AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.typesimpotencetreatment AUTO_INCREMENT = 4;
-- ALTER TABLE elarabygt4it_erp.typesupplier AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.premium AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.premiumclient AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.premiumautomatic AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.premiuminstallments AUTO_INCREMENT = 24;
-- ALTER TABLE elarabygt4it_erp.faida AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.faidaproduct AUTO_INCREMENT = 3;
-- ALTER TABLE elarabygt4it_erp.faidadirector AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.resturantcategory AUTO_INCREMENT = 4;
-- ALTER TABLE elarabygt4it_erp.languages AUTO_INCREMENT = 3;
-- ALTER TABLE elarabygt4it_erp.youtube_link AUTO_INCREMENT = 290;
-- ALTER TABLE elarabygt4it_erp.transferclientaccounts AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.knownways AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbillpayed AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbillstatus AUTO_INCREMENT = 7;
-- ALTER TABLE elarabygt4it_erp.saveclose AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.charities AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.beneficiaries AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.beneficiaries_family AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.beneficiaries_eco AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.disease AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.area AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.subvention AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.subventionpay AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.onlinecat AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.onlineproductcat AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.searchfilters AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.savetype AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.storemovement_main AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.charitysearchlog AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.charitiescenter AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.ads AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.billprinter AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.billprint AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.importcontract AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.carfile AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.cartracking AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.shippingfile AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.dollarearnings AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.carreviewer AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.carreview AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.cars AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.savestock AUTO_INCREMENT = 5;
-- ALTER TABLE elarabygt4it_erp.qrerpuserpass AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.availableparcode AUTO_INCREMENT = 100001;
-- ALTER TABLE elarabygt4it_erp.sellbillstatushistory AUTO_INCREMENT = 7;
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE programsettings SET companyname = 'سنتر احمد العربي', address = 'ش الترعة البولاقيه - امام قسم شبرا - مول العتبه', specializtion = 'ملابس جملة', phone = '01064062900', faxnumber = '', email = '', website = '', logo = '5a8dcbdd53358d13ef07e420e903d5d6.jpeg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '', commercialregistration = '', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-09-27',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='83b7fcbc8ec5f6680b38c85c5097af3b8f9e24beb34e300c92da2aed73200ef3508d6b04b93e1301b69bf990665657d386b98aa70faa9951dfc2289ed943c6cd',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 04:41:13";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 08:11:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 08:11:13', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=245
UPDATE programsettings SET companyname = 'سنتر احمد العربي', address = 'ش الترعة البولاقيه - امام قسم شبرا - مول العتبه', specializtion = 'ملابس جملة', phone = '01064062900', faxnumber = '', email = '', website = '', logo = '5a8dcbdd53358d13ef07e420e903d5d6.jpeg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '', commercialregistration = '', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-09-28',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='83b7fcbc8ec5f6680b38c85c5097af3b8f9e24beb34e300c92da2aed73200ef3508d6b04b93e1301b69bf990665657d386b98aa70faa9951dfc2289ed943c6cd',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0' WHERE programsettingsid = '1';
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 04:41:13";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 08:11:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 08:11:13', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=246
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 04:41:21";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 08:11:21", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 08:11:21', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=247
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 04:50:37";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 08:20:37", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 08:20:37', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=248
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 04:50:48";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 08:20:48", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-09-28 08:20:48', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=249
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 04:51:13";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 08:21:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 08:21:13', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=250
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 04:51:17";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 08:21:17", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 08:21:17', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=251
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 ('احمد العربي' , 'الفيوم', '01028457076', '', '0', '', '0', '2026-09-28 08:25:29', '2', '0','','0','','-10','0','0',',','0','0','.','0','0','.','2026-09-28','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-09-28 08:25:29', '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-09-28 08:25:29'); -- id=420
UPDATE client SET clientname = 'احمد العربي', clientaddress = 'الفيوم', clientphone = '01028457076', clientmobile = '', clientdebt = '0.00', clientdetails = '', conditions = '0', clientdate = '2026-09-28', userid = '2'  , clientareaid = '0'  ,clientcode = '',dailyentryid = '0' , rondomtxt = '',clientStoreIds = '-10', obygyPatientId = '0' , debtLimit='0' , typeclientid=',',priceTypeId='0',lastEditUser = '0',card_number = '0',file_faida = '.',specialDiscount = '0',specialDiscountVal = '0',file = '.',mandobCollectRatio='0',webApiId ='0' ,clientRFID = '',linkedSupplierId = '0',postponeDays='0', studentid='0', taxnumber='', password='',clientTypeForTree='0',treeId='420',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-09-28 04:56:36";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 08:26:36", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 08:26:36', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=252
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:14:02";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 08:44:02", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 08:44:02', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=253
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:14:02";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 08:44:02", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 08:44:02', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=254
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 user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:14:11";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 08:44:11", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 08:44:11', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.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 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-09-28 05:14:12";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 08:44:12", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 08:44:12', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=256
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:14:14";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 08:44:14", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 08:44:14', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=257
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:30:58";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:00:58", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:00:58', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=258
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:32:10";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:02:10", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:02:10', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=259
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:32:12";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:02:12", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:02:12', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=260
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:32:39";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:02:39", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:02:39', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=261
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:32:41";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:02:41", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:02:41', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=262
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:33:09";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:03:09", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:03:09', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=263
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:33:22";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:03:22", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:03:22', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=264
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:33:33";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:03:33", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 09:03:33', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=265
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:33:33";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 09:03:33", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 09:03:33', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=266
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:33:35";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:03:35", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:03:35', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=267
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:35:58";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:05:58", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:05:58', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=268
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:48: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 user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:48:59";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:18:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 09:18:59', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.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 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-09-28 05:49:00";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 09:19:00', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=270
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:49:04";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:19:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-09-28 09:19:04', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=271
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:49:17";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:19:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-09-28 09:19:17', '1', 'show', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php?do=show'); -- id=272
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:50:05";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:20:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:20:05', '1', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=273
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:51:16";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:21:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 09:21:16', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=274
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:52:15";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:22:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 09:22:15', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=275
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:53:15";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:23:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 09:23:15', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=276
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:53:34";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:23:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 09:23:34', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=277
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:53:53";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:23:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 09:23:53', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=278
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:57:39";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:27:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 09:27:39', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=279
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 05:57:48";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:27:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 09:27:48', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=280
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:00:42";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:30:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 09:30:42', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=281
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:01:05";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:31:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('gt4setting.php', '2026-09-28 09:31:05', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/gt4setting.php'); -- id=282
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:01:11";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:31:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-09-28 09:31:11', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/programsettingsController.php'); -- id=283
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-09-28 06:02:18";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:32:18", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 09:32:18', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=284
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:02:18";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 09:32:18", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 09:32:18', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=285
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:02:21";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:32:21", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:32:21', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=286
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:03:51";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:33:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-09-28 09:33:51', '1', 'update', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/programsettingsController.php?do=update'); -- id=287
UPDATE ebillsetting SET eTaxNum = '', eTaxNumBranch = '', eGovernorate = '', eCity = '', eStreet = '', eBuildingNum = '', eTaxType = '', eTaxTypeNum = '', eCompanyNameInTaxCard = '', eunitInTax = '' WHERE id = '1';
UPDATE programsettings SET companyname = 'سنتر احمد العربي', address = 'ش الترعة البولاقيه - امام قسم شبرا - مول العتبه', specializtion = 'ملابس جملة', phone = '01064062900', faxnumber = '', email = '', website = '', logo = '4a754be7e82553f312ecf932e16cce7d.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '', commercialregistration = '', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-09-28',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='83b7fcbc8ec5f6680b38c85c5097af3b8f9e24beb34e300c92da2aed73200ef3508d6b04b93e1301b69bf990665657d386b98aa70faa9951dfc2289ed943c6cd',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:03:51";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:33:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('programsettingsController.php', '2026-09-28 09:33:51', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/programsettingsController.php'); -- id=288
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:04:31";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:34:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:34:31', '1', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=289
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:04:40";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:34:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:34:40', '1', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=290
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:04:47";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:34:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientdebt.php', '2026-09-28 09:34:47', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientdebt.php'); -- id=291
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:04:48";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:34:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientdebt.php', '2026-09-28 09:34:48', '1', 'showallajax', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientdebt.php?do=showallajax'); -- id=292
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:05:05";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:35:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientController.php', '2026-09-28 09:35:05', '1', 'show', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientController.php?do=show'); -- id=293
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:05:21";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:35:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientReportsController.php', '2026-09-28 09:35:21', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientReportsController.php?clientid=2&find=month'); -- id=294
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:05:35";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:35:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-09-28 09:35:35', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=295
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:05:40";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:35:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-09-28 09:35:40', '1', 'show', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php?do=show'); -- id=296
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:05:52";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:35:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreport.php', '2026-09-28 09:35:52', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreport.php'); -- id=297
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:05:56";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:35:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreport.php', '2026-09-28 09:35:56', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreport.php'); -- id=298
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:08:22";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:38:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreport.php', '2026-09-28 09:38:22', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreport.php'); -- id=299
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:08:24";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:38:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-09-28 09:38:24', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=300
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:08:26";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:38:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:38:26', '1', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=301
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:08:48";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:38:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreportbills.php', '2026-09-28 09:38:48', '1', 'showbills', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreportbills.php?do=showbills'); -- id=302
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-09-28 06:10:59";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:40:59", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 09:40:59', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.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 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-09-28 06:10:59";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 09:40:59", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 09:40:59', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=304
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:11:05";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:41:05", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:41:05', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=305
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-09-28 06:17:33";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:47:33", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 09:47:33', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=306
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:17:33";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 09:47:33", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 09:47:33', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=307
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:17:40";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:47:40", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:47:40', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=308
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-09-28 06:20:06";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:50:06", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 09:50:06', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=309
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:20:06";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 09:50:06", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 09:50:06', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=310
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:20:10";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:50:10", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:50:10', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=311
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:20:10";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:50:10", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:50:10', '2', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=6'); -- id=312
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:20:33";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:50:33", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:50:33', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=313
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-09-28 06:21:15";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:51:15", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 09:51:15', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=314
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:21:15";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 09:51:15", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 09:51:15', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=315
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:21:19";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:51:19", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:51:19', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=316
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:23:33";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:53:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:53:33', '1', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=317
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:24:03";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:54:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreportbills.php', '2026-09-28 09:54:03', '1', 'showbills', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreportbills.php?do=showbills'); -- id=318
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:24:37";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:54:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:54:37', '1', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=319
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:25:14";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:55:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 09:55:14', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=320
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:25:24";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:55:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 09:55:24', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=321
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:25:54";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:55:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:55:54', '1', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=322
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:28:03";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:58:03", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:58:03', '2', 'addAndRetuen', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=323

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06aba0e6778ad5
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-09-28 09:58:03', '06aba0e6778ad5', '1', '0.00', '0', '0', '1', '2250.00', '2250', '2250', '0', '1', '2026-09-28 09:58:03', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '5' ,'0','','','','','-1','0','0','0','0','0','2250','0','','0','0','2250','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-09-28','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=7
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','7', '0', '2026-09-28 09:58:03', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '2250', '0', null, '0', null, null,'', '0','1','1','0','1','2026-09-28 09:58:03','0','0','',''); -- id=14
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('430','08955', '7', '68', '1239', '5', '450', '2250', '0', '', '0', '2026-09-28 09:58:03', '1239', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','450','2250','0','','0','0.00','0','0','0','0'); -- id=7
UPDATE sellbilldetail SET  lastbuyprice = 430.00 , meanbuyprice = 430.00, lastbuyprice_withDiscount = 430.00, meanbuyprice_withDiscount = 430.00
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 430, lastbuyprice_withDiscountAndTax = 430
                where sellbilldetailid = 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 (1239, '2026-09-28', 2250, 2150, 2150
                    , 2150, 2150, 2150, 2150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2150, 2150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2250, sellCostBuyPrice =sellCostBuyPrice+2150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2150
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-09-28', 2250, 2150, 2150
                    , 2150, 2150, 2150, 2150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2150, 2150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2250, sellCostBuyPrice =sellCostBuyPrice+2150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2150
                        , returnSellVal = returnSellVal+0, 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 = '130', userid = '2', storedetaildate = '2026-09-28 09:58:03' WHERE storedetailid = '1239';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1239', '1', '5', '1', '7', 'اضافة فاتورة مبيعات', 'sellbillController.php', '135', '130', '2', '2026-09-28 09:58:03','0','0'); -- id=1304
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '2250',  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','2250', '0', '2', 'اضافة فاتورة مبيعات', '7', '2250', '2026-09-28 09:58:03', '2',  'sellbillController.php','1','','0'); -- id=14
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2250', '2250', '2026-09-28', '2', '0', '0', '2026-09-28 09:58:03','اضافة فاتورة مبيعات رقم 7','1','0',null,'0','7','sellbillController.php?do=showDetail&sellbillid=7'); -- id=671
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('671', '419', '2250', '','0'); -- id=671
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '2250', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('671', '143', '2250', '','0'); -- id=671
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '2250', 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 ( '2150', '2150', '2026-09-28', '2', '0', '0', '2026-09-28 09:58:03','اضافة فاتورة مبيعات رقم 7 - صرف البضاعة من المخزن','1','0',null,'0','7','sellbillController.php?do=showDetail&sellbillid=7'); -- id=672
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('672', '402', '2150', '','0'); -- id=672
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';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('672', '382', '2150', '','0'); -- id=672
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '11978035', 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='671,0,672' 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-09-28', 2250, 2150, 2150
                    , 2150, 2150, 2150, 2150
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,2150, 2150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2250, sellCostBuyPrice =sellCostBuyPrice+2150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2150
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-09-28', 2250, 2150, 2150
                    , 2150, 2150, 2150, 2150
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,2150, 2150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2250, sellCostBuyPrice =sellCostBuyPrice+2150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2150
                        , returnSellVal = returnSellVal+0, 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, 2250, 2150, 2150
                    , 2150, 2150, 2150, 2150, 2150, 2150)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+2250, netSellCostBuyPrice = netSellCostBuyPrice+2150
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+2150
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+2150
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+2150
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+2150
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+2150
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+2150
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+2150;
COMMIT;

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

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:28:04";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:58:04", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:58:04', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=324
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-09-28 06:28:40";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:58:40", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 09:58:40', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=325
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:28:40";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 09:58:40", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 09:58:40', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=326
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:28:42";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:58:42", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:58:42', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=327
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:28:51";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:58:51", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:58:51', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=328
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:28:58";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 09:58:58", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 09:58:58', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=329
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:41:19";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:11:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 10:11:19', '1', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=330
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:41:29";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:11:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreport.php', '2026-09-28 10:11:29', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreport.php'); -- id=331
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:41:31";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:11:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreport.php', '2026-09-28 10:11:31', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreport.php'); -- id=332
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:42:42";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:12:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreport.php', '2026-09-28 10:12:42', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreport.php'); -- id=333
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:50:02";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:20:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 10:20:02', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=334
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:51:23";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:21:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 10:21:23', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=335
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:52:40";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:22:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 10:22:40', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=336
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:52:56";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:22:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 10:22:56', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=337
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:53:10";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:23:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 10:23:10', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=338
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:53:49";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:23:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 10:23:49', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=339
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:54:13";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:24:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 10:24:13', '1', 'showbarcode', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=340
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:54:53";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:24:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 10:24:53', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=341
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:57:31";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:27:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-09-28 10:27:31', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=342
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:58:37";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:28:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 10:28:37', '1', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=343
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 06:58:39";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:28:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 10:28:39', '1', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=7'); -- id=344
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 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-09-28 07:01:58";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:31:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 10:31:58', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=345
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:01:59";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 10:31:59', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=346
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:02:03";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:32:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 10:32:03', '1', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=347
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:02:07";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:32:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 10:32:07', '1', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=7'); -- id=348
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:02:44";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:32:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 10:32:44', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=349
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:02:44";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 10:32:44', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=350
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 user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:02:50";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:32:50", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 10:32:50', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=351
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:02:50";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 10:32:50", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 10:32:50', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=352
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-09-28 07:04:31";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:34:31", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 10:34:31', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.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 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-09-28 07:04:32";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 10:34:32", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 10:34:32', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=354
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:04:33";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 10:34:33", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 10:34:33', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=355
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-09-28 07:11:32";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 10:41:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 10:41:32', '1', '', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=356
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:11:32";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 10:41:33', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=357
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:11:40";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 10:41:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-09-28 10:41:40', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/billsettingsController.php?do=show'); -- id=358
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:11:43";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 10:41:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-09-28 10:41:43', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/billsettingsController.php?do=edit&id=3'); -- id=359
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:11:52";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 10:41:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-09-28 10:41:52', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/billsettingsController.php?do=update'); -- id=360
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-09-28', 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 = '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 = '0' 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 user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:11:52";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 10:41:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-09-28 10:41:52', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=361
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:11:53";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 10:41:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-09-28 10:41:53', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/billsettingsController.php?do=show'); -- id=362
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 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-09-28 07:24:07";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 10:54:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 10:54:07', '1', '', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.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 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-09-28 07:24:07";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 10:54:07', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=364
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:24:15";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 10:54:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-09-28 10:54:15', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=show'); -- id=365
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:24:18";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 10:54:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-09-28 10:54:18', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=edit&id=3'); -- id=366
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:24:33";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 10:54:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-09-28 10:54:33', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=update'); -- id=367
UPDATE usergroup SET priceupdate=0 WHERE usergroupid = 3;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:24:34";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 10:54:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-09-28 10:54:34', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=sucess'); -- id=368
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 07:24:35";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 10:54:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-09-28 10:54:35', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=show'); -- id=369
UPDATE user SET loginip = "" WHERE userid = 1;
UPDATE user SET loginip = "" WHERE userid = 1;
UPDATE user SET loginip = "" WHERE userid = 2;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:33:39";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:33:46";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:03:46", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 12:03:46', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=370
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:33:47";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 12:03:47", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 12:03:47', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=371
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:33:52";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:03:52", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 12:03:52', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=372
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:33:57";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:03:57", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 12:03:57', '2', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=7'); -- id=373
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:34:05";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:04:05", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 12:04:05', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=374
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:34:19";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:04:19", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 12:04:19', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=375
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:34:38";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:04:38", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 12:04:38', '2', 'addAndRetuen', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=376

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06aba2d9314d8a
-- ----------------------------------------------------------------------------------------------------

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

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06aba2d9314d8a and sellbillId = 8 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:34:38";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:04:38", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 12:04:38', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=377
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:34:54";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:04:54", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 12:04:54', '2', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=8'); -- id=378
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:35:05";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:05:05", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 12:05:05', '2', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=8'); -- id=379
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:35:08";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:05:08", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 12:05:08', '2', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=8'); -- id=380
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:35:11";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:05:11", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 12:05:11', '2', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=8'); -- id=381
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:35:13";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:05:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 12:05:13', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=382
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 08:36:19";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 12:06:19", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 12:06:19', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=383
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 09:37:11";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 13:07:11", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 13:07:11', '2', 'addAndRetuen', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=384

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06aba2e0b31abd
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-09-28 13:07:11', '06aba2e0b31abd', '1', '0.00', '0', '0', '1', '1750.00', '1750', '1750', '0', '1', '2026-09-28 13:07:11', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '5' ,'0','','','','','-1','0','0','0','0','0','1750','0','','0','0','1750','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-09-28','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=9
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','9', '0', '2026-09-28 13:07:11', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '1750', '0', null, '0', null, null,'', '0','1','1','0','1','2026-09-28 13:07:11','0','0','',''); -- id=16
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('250','06790', '9', '76', '1269', '1', '270', '270', '0', '', '0', '2026-09-28 13:07:11', '1269', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','270','270','0','','0','0.00','0','0','0','0'); -- id=9
UPDATE sellbilldetail SET  lastbuyprice = 250.00 , meanbuyprice = 250.00, lastbuyprice_withDiscount = 250.00, meanbuyprice_withDiscount = 250.00
        , lastbuyprice_withTax = 250, meanbuyprice_withTax = 250, lastbuyprice_withDiscountAndTax = 250
                where sellbilldetailid = 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 (1269, '2026-09-28', 270, 250, 250
                    , 250, 250, 250, 250
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 250, 250, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+270, sellCostBuyPrice =sellCostBuyPrice+250
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+250, sellCostMeanBuyPrice = sellCostMeanBuyPrice+250
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+250, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+250
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+250
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+250
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+250
                        , returnSellVal = returnSellVal+0, 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-09-28', 270, 250, 250
                    , 250, 250, 250, 250
                    , 0, 0, 0, 0
                    , 0, 0, 0, 250, 250, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+270, sellCostBuyPrice =sellCostBuyPrice+250
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+250, sellCostMeanBuyPrice = sellCostMeanBuyPrice+250
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+250, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+250
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+250
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+250
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+250
                        , returnSellVal = returnSellVal+0, 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 = '11', userid = '2', storedetaildate = '2026-09-28 13:07:11' WHERE storedetailid = '1269';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1269', '1', '1', '1', '9', 'اضافة فاتورة مبيعات', 'sellbillController.php', '12', '11', '2', '2026-09-28 13:07:11','0','0'); -- id=1306
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('350','09426', '9', '58', '1203', '4', '370', '1480', '0', '', '0', '2026-09-28 13:07:11', '1203', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','370','1480','0','','0','0.00','0','0','0','0'); -- id=10
UPDATE sellbilldetail SET  lastbuyprice = 350.00 , meanbuyprice = 350.00, lastbuyprice_withDiscount = 350.00, meanbuyprice_withDiscount = 350.00
        , lastbuyprice_withTax = 350, meanbuyprice_withTax = 350, lastbuyprice_withDiscountAndTax = 350
                where sellbilldetailid = 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 (1203, '2026-09-28', 1480, 1400, 1400
                    , 1400, 1400, 1400, 1400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4, 0, 1400, 1400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1480, sellCostBuyPrice =sellCostBuyPrice+1400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+4
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-09-28', 1480, 1400, 1400
                    , 1400, 1400, 1400, 1400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1400, 1400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1480, sellCostBuyPrice =sellCostBuyPrice+1400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1400
                        , returnSellVal = returnSellVal+0, 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 = '152', userid = '2', storedetaildate = '2026-09-28 13:07:11' WHERE storedetailid = '1203';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1203', '1', '4', '1', '9', 'اضافة فاتورة مبيعات', 'sellbillController.php', '156', '152', '2', '2026-09-28 13:07:11','0','0'); -- id=1307
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '5900',  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 ('4150','1750', '0', '2', 'اضافة فاتورة مبيعات', '9', '5900', '2026-09-28 13:07:11', '2',  'sellbillController.php','1','','0'); -- id=16
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1750', '1750', '2026-09-28', '2', '0', '0', '2026-09-28 13:07:11','اضافة فاتورة مبيعات رقم 9','1','0',null,'0','9','sellbillController.php?do=showDetail&sellbillid=9'); -- id=675
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('675', '419', '1750', '','0'); -- id=675
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '5900', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('675', '143', '1750', '','0'); -- id=675
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '5900', 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 ( '1650', '1650', '2026-09-28', '2', '0', '0', '2026-09-28 13:07:11','اضافة فاتورة مبيعات رقم 9 - صرف البضاعة من المخزن','1','0',null,'0','9','sellbillController.php?do=showDetail&sellbillid=9'); -- id=676
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('676', '402', '1650', '','0'); -- id=676
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '5600', 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 ('676', '382', '1650', '','0'); -- id=676
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '11974585', 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='675,0,676' where sellbillid=9;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-09-28', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1750, sellCostBuyPrice =sellCostBuyPrice+1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 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-09-28', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1750, sellCostBuyPrice =sellCostBuyPrice+1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650, 1650, 1650)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+1750, netSellCostBuyPrice = netSellCostBuyPrice+1650
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+1650
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+1650
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+1650
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+1650
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+1650
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+1650
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+1650;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06aba2e0b31abd and sellbillId = 9 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 09:37:11";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 13:07:11", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 13:07:11', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=385
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-09-28 09:38:29";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 13:08:29", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 13:08:29', '2', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.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 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-09-28 09:38:29";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-09-28 13:08:29", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 13:08:29', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=387
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 09:38:31";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 13:08:31", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 13:08:31', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=388
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 09:38:36";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 13:08:36", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 13:08:36', '2', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=9'); -- id=389
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 09:39:04";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 13:09:04", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 13:09:04', '2', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=9'); -- id=390
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 09:39:07";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 13:09:07", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 13:09:07', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=391
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 09:39:10";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 13:09:10", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 13:09:10', '2', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=9'); -- id=392
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 09:39:15";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 13:09:15", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 13:09:15', '2', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=393
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:42:25";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:42:32";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 14:12:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 14:12:32', '1', '', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=394
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:42:32";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 14:12:32', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=395
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:42:39";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 14:12:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-09-28 14:12:39', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=show'); -- id=396
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:42:43";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 14:12:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-09-28 14:12:43', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=edit&id=3'); -- id=397
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:42:47";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 14:12:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('menuurController.php', '2026-09-28 14:12:47', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/menuurController.php?do=show'); -- id=398
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:42:59";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 14:12:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-09-28 14:12:59', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=show'); -- id=399
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:43:02";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 14:13:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-09-28 14:13:02', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=edit&id=3'); -- id=400
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:43:18";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 14:13:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-09-28 14:13:18', '1', 'update', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=update'); -- id=401
UPDATE usergroup SET percentageDiscount='2' WHERE usergroupid = 3;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:43:18";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 14:13:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-09-28 14:13:18', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=sucess'); -- id=402
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:43:20";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-09-28 14:13:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-09-28 14:13:20', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=show'); -- id=403
UPDATE user SET loginip = "" WHERE userid = 1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:54:28";
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-09-28 10:54:32";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 14:24:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 14:24:32', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=404
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:54:32";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 14:24:32', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=405
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:54:58";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 14:24:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('currencyController.php', '2026-09-28 14:24:58', '1', 'show', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/currencyController.php?do=show'); -- id=406
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 10:55:20";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 14:25:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-09-28 14:25:20', '1', 'show', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=show'); -- id=407
UPDATE user SET loginip = "" WHERE userid = 1;
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 user SET loginip = "" WHERE lastactivetime < "2026-09-28 11:38:22";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 15:08:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 15:08:22', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=408
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 11:38:22";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 15:08:22', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=409
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 11:38:40";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 15:08:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 15:08:40', '1', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=410
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 11:38:42";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 15:08:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 15:08:42', '1', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=9'); -- id=411
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 11:39:13";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 15:09:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 15:09:13', '1', 'showDetail', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=9'); -- id=412
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 12:12:41";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 15:42:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-09-28 15:42:41', '1', 'addsellBill', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=413
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 12:12:55";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 15:42:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellBillReportsController.php', '2026-09-28 15:42:55', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellBillReportsController.php'); -- id=414
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 12:13:23";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 15:43:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellBillReportsController.php', '2026-09-28 15:43:23', '1', 'show', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellBillReportsController.php?do=show'); -- id=415
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-09-28 12:24:00";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 15:54:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-09-28 15:54:00', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=416
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 12:24:00";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-09-28 15:54:00', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=417
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 12:24:18";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 15:54:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-09-28 15:54:18', '1', '', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php'); -- id=418
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-09-28 12:26:35";
UPDATE user SET loginip = "156.196.137.141", lastactivetime = "2026-09-28 15:56:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-09-28 15:56:35', '1', 'addexcel', '156.196.137.141', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=addexcel'); -- id=419
