-- ALTER TABLE elarabygt4it_erp.accountmovement AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.accountmovementkind AUTO_INCREMENT = 4;
-- ALTER TABLE elarabygt4it_erp.accountstree AUTO_INCREMENT = 589;
-- 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 = 45;
-- ALTER TABLE elarabygt4it_erp.buybillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buybilldetail AUTO_INCREMENT = 251;
-- ALTER TABLE elarabygt4it_erp.buybilldetailoffer AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buybilloffer AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buypriceshistorybook AUTO_INCREMENT = 327;
-- 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 = 62;
-- ALTER TABLE elarabygt4it_erp.clientarea AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.clientdebtchange AUTO_INCREMENT = 198;
-- 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 = 1215;
-- ALTER TABLE elarabygt4it_erp.dailyentrycreditor AUTO_INCREMENT = 1215;
-- ALTER TABLE elarabygt4it_erp.dailyentrydebtor AUTO_INCREMENT = 1221;
-- 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 = 209;
-- 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 = 2;
-- 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 = 3654;
-- 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 = 2;
-- 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 = 114;
-- 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 = 2343;
-- 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 = 1549;
-- ALTER TABLE elarabygt4it_erp.productcat AUTO_INCREMENT = 112;
-- ALTER TABLE elarabygt4it_erp.productcatunit AUTO_INCREMENT = 26;
-- 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 = 1549;
-- 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 = 132;
-- ALTER TABLE elarabygt4it_erp.quickprofitday AUTO_INCREMENT = 132;
-- ALTER TABLE elarabygt4it_erp.quickprofitgeneral AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.quickprofitproduct AUTO_INCREMENT = 617;
-- ALTER TABLE elarabygt4it_erp.quickprofitstore AUTO_INCREMENT = 617;
-- ALTER TABLE elarabygt4it_erp.religions AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.relusergroupproperties AUTO_INCREMENT = 4158;
-- 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 = 5;
-- ALTER TABLE elarabygt4it_erp.returnbuybillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.returnbuybilldetail AUTO_INCREMENT = 19;
-- ALTER TABLE elarabygt4it_erp.returnsellbill AUTO_INCREMENT = 5;
-- ALTER TABLE elarabygt4it_erp.returnsellbillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.returnsellbilldetail AUTO_INCREMENT = 8;
-- 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 = 5;
-- ALTER TABLE elarabygt4it_erp.savedaily AUTO_INCREMENT = 137;
-- ALTER TABLE elarabygt4it_erp.sellandruternbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbill AUTO_INCREMENT = 108;
-- 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 = 447;
-- 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 = 4;
-- ALTER TABLE elarabygt4it_erp.storedetail AUTO_INCREMENT = 1574;
-- ALTER TABLE elarabygt4it_erp.storemovement AUTO_INCREMENT = 18;
-- ALTER TABLE elarabygt4it_erp.storereport AUTO_INCREMENT = 2529;
-- 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 = 106;
-- ALTER TABLE elarabygt4it_erp.supplierdebtchange AUTO_INCREMENT = 186;
-- 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 = 61;
-- 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 = 7;
-- ALTER TABLE elarabygt4it_erp.usergroup AUTO_INCREMENT = 5;
-- ALTER TABLE elarabygt4it_erp.usergroupadmin AUTO_INCREMENT = 1293;
-- 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 = 108;
-- 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 = 14;
-- ALTER TABLE elarabygt4it_erp.qrerpuserpass AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.availableparcode AUTO_INCREMENT = 100001;
-- ALTER TABLE elarabygt4it_erp.sellbillstatushistory AUTO_INCREMENT = 95;
-- ALTER TABLE elarabygt4it_erp.clientdetails AUTO_INCREMENT = 3;
-- ALTER TABLE elarabygt4it_erp.productstore AUTO_INCREMENT = 560;
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE programsettings SET companyname = 'سنتر احمد العربي', address = 'ش الترعة البولاقيه - امام قسم شبرا - مول العتبه', specializtion = 'ملابس جملة', phone = '01064062900', faxnumber = '', email = '', website = '', logo = '4a754be7e82553f312ecf932e16cce7d.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '-1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '', commercialregistration = '', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-06',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='0',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='1',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='83b7fcbc8ec5f6680b38c85c5097af3b8f9e24beb34e300c92da2aed73200ef3508d6b04b93e1301b69bf990665657d386b98aa70faa9951dfc2289ed943c6cd',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 04:57:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 08:27:09", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 08:27:09', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3654
UPDATE programsettings SET companyname = 'سنتر احمد العربي', address = 'ش الترعة البولاقيه - امام قسم شبرا - مول العتبه', specializtion = 'ملابس جملة', phone = '01064062900', faxnumber = '', email = '', website = '', logo = '4a754be7e82553f312ecf932e16cce7d.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '-1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '', commercialregistration = '', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='0',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='1',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='83b7fcbc8ec5f6680b38c85c5097af3b8f9e24beb34e300c92da2aed73200ef3508d6b04b93e1301b69bf990665657d386b98aa70faa9951dfc2289ed943c6cd',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0' WHERE programsettingsid = '1';
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 04:57:09";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 08:27:09", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 08:27:09', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3655
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 04:57:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 08:27:11", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 08:27:11', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3656
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 04:58:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 08:28:07", deviceType = "DESKTOP" WHERE userid = 3;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 08:28:07', '3', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3657
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 04:58:08";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 08:28:08', '3', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3658
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 04:58:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 08:28:13", deviceType = "DESKTOP" WHERE userid = 3;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 08:28:13', '3', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3659
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 04:58:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 08:28:23", deviceType = "DESKTOP" WHERE userid = 3;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 08:28:23', '3', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php?do=show'); -- id=3660
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:05:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 08:35:28", deviceType = "DESKTOP" WHERE userid = 3;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 08:35:28', '3', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php?do=show'); -- id=3661
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:05:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 08:35:30", deviceType = "DESKTOP" WHERE userid = 3;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 08:35:30', '3', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3662
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:05:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 08:35:38", deviceType = "DESKTOP" WHERE userid = 3;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 08:35:38', '3', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php?do=show'); -- id=3663
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:10:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 08:40:20", deviceType = "DESKTOP" WHERE userid = 3;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 08:40:20', '3', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3664
UPDATE user SET loginip = "" WHERE userid = 3;
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:10:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 08:40:27", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 08:40:27', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3665
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:10:27";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 08:40:27", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 08:40:27', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3666
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:10:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 08:40:29", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 08:40:29', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3667
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:16:49";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:30:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:00:38", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 09:00:38', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3668
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:30:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:00:40", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 09:00:40', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3669
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:41:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:11:25", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 09:11:25', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3670

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac5e0086769b
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 09:11:26', '06ac5e0086769b', '1', '0.00', '0', '0', '1', '3450.00', '3450', '3450', '0', '1', '2026-10-07 09:11:26', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '10' ,'0','','','','','-1','0','0','0','0','0','3450','0','','0','0','3450','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=108
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','اضافة فاتورة مبيعات','108', '0', '2026-10-07 09:11:26', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '3450', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 09:11:26','0','0','',''); -- id=198
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('330','09773', '108', '6', '684', '5', '350', '1750', '0', '', '0', '2026-10-07 09:11:26', '684', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','350','1750','0','','0','0.00','0','0','0','0'); -- id=447
UPDATE sellbilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where sellbilldetailid = 447;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (684, '2026-10-07', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1750, sellCostBuyPrice =sellCostBuyPrice+1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1750, sellCostBuyPrice =sellCostBuyPrice+1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '49', userid = '2', storedetaildate = '2026-10-07 09:11:26' WHERE storedetailid = '684';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('684', '1', '5', '1', '108', 'اضافة فاتورة مبيعات', 'sellbillController.php', '54', '49', '2', '2026-10-07 09:11:26','0','0'); -- id=2529
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 ('320','09565', '108', '24', '883', '5', '340', '1700', '0', '', '0', '2026-10-07 09:11:26', '883', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','340','1700','0','','0','0.00','0','0','0','0'); -- id=448
UPDATE sellbilldetail SET  lastbuyprice = 320.00 , meanbuyprice = 320.00, lastbuyprice_withDiscount = 320.00, meanbuyprice_withDiscount = 320.00
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 320
                where sellbilldetailid = 448;
 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 (883, '2026-10-07', 1700, 1600, 1600
                    , 1600, 1600, 1600, 1600
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1600, 1600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1700, sellCostBuyPrice =sellCostBuyPrice+1600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1600, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1600
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1600
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1600
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 1700, 1600, 1600
                    , 1600, 1600, 1600, 1600
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1600, 1600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1700, sellCostBuyPrice =sellCostBuyPrice+1600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1600, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1600
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1600
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1600
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '45', userid = '2', storedetaildate = '2026-10-07 09:11:26' WHERE storedetailid = '883';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('883', '1', '5', '1', '108', 'اضافة فاتورة مبيعات', 'sellbillController.php', '50', '45', '2', '2026-10-07 09:11:26','0','0'); -- id=2530
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '337725',  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 ('334275','3450', '0', '2', 'اضافة فاتورة مبيعات', '108', '337725', '2026-10-07 09:11:26', '2',  'sellbillController.php','1','','0'); -- id=137
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3450', '3450', '2026-10-07', '2', '0', '0', '2026-10-07 09:11:26','اضافة فاتورة مبيعات رقم 108','1','0',null,'0','108','sellbillController.php?do=showDetail&sellbillid=108'); -- id=1215
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1215', '419', '3450', '','0'); -- id=1221
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '337725', 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 ('1215', '143', '3450', '','0'); -- id=1215
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1017150', 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 ( '3250', '3250', '2026-10-07', '2', '0', '0', '2026-10-07 09:11:26','اضافة فاتورة مبيعات رقم 108 - صرف البضاعة من المخزن','1','0',null,'0','108','sellbillController.php?do=showDetail&sellbillid=108'); -- id=1216
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1216', '402', '3250', '','0'); -- id=1222
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '987137.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1216', '382', '3250', '','0'); -- id=1216
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16324524.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1215,0,1216' where sellbillid=108;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 3450, 3250, 3250
                    , 3250, 3250, 3250, 3250
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3250, 3250, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3450, sellCostBuyPrice =sellCostBuyPrice+3250
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3250, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3250
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3250, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3250
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3250
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3250
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3250
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3450, 3250, 3250
                    , 3250, 3250, 3250, 3250
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3250, 3250, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3450, sellCostBuyPrice =sellCostBuyPrice+3250
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3250, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3250
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3250, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3250
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3250
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3250
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3250
                        , returnSellVal = returnSellVal+0, 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, 3450, 3250, 3250
                    , 3250, 3250, 3250, 3250, 3250, 3250)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+3450, netSellCostBuyPrice = netSellCostBuyPrice+3250
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+3250
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+3250
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+3250
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+3250
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+3250
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+3250
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+3250;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac5e0086769b and sellbillId = 108 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:41:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:11:26", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 09:11:26', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3671
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:46:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:16:04", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 09:16:04', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3672
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:46:04";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 09:16:04", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 09:16:04', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3673
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:46:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:16:06", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 09:16:06', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3674
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:54:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:24:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 09:24:24', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3675
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:54:25";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 09:24:25', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3676
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:54:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:24:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 09:24:32', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3677
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:54:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:24:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 09:24:42', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3678
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:56:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:26:56", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 09:26:56', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3679
UPDATE product SET productName = 'جاكت 4914 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '675.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01491',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675.00',lastbuyprice_withDiscount = '675',meanbuyprice = '675.00',meanbuyprice_withDiscount = '675' , productbuypricereal = '675.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.70' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1491';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1491, 1,'2026-10-07 09:28:52',1)
                ON DUPLICATE KEY UPDATE productid = 1491, edited = 1, sysdate = '2026-10-07 09:28:52', userid = 1; -- id=2285
UPDATE product SET productName = 'جاكت 4301 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '600.00', productSellAllPrice = '625.00', productSellUnitPrice = '625.00', productSellHalfPrice = '625.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01492',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600.00',lastbuyprice_withDiscount = '600',meanbuyprice = '600.00',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1492';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1492, 1,'2026-10-07 09:30:18',1)
                ON DUPLICATE KEY UPDATE productid = 1492, edited = 1, sysdate = '2026-10-07 09:30:18', userid = 1; -- id=2286
UPDATE product SET productName = 'جاكت 4300 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '600.00', productSellAllPrice = '625.00', productSellUnitPrice = '625.00', productSellHalfPrice = '625.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01493',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600.00',lastbuyprice_withDiscount = '600',meanbuyprice = '600.00',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1493';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1493, 1,'2026-10-07 09:30:35',1)
                ON DUPLICATE KEY UPDATE productid = 1493, edited = 1, sysdate = '2026-10-07 09:30:35', userid = 1; -- id=2287
UPDATE product SET productName = 'جاكت 4303 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01494',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480.00',lastbuyprice_withDiscount = '480',meanbuyprice = '480.00',meanbuyprice_withDiscount = '480' , productbuypricereal = '480.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1494';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1494, 1,'2026-10-07 09:30:42',1)
                ON DUPLICATE KEY UPDATE productid = 1494, edited = 1, sysdate = '2026-10-07 09:30:42', userid = 1; -- id=2288
UPDATE product SET productName = 'جاكت 4008 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '625.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01495',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '625.00',lastbuyprice_withDiscount = '625',meanbuyprice = '625.00',meanbuyprice_withDiscount = '625' , productbuypricereal = '625.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='625',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='625',meanbuyprice_withTax='625',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='625',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1495';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1495, 1,'2026-10-07 09:30:49',1)
                ON DUPLICATE KEY UPDATE productid = 1495, edited = 1, sysdate = '2026-10-07 09:30:49', userid = 1; -- id=2289
UPDATE product SET productName = 'جاكت 4912 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '530.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01496',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530.00',lastbuyprice_withDiscount = '530',meanbuyprice = '530.00',meanbuyprice_withDiscount = '530' , productbuypricereal = '530.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.77' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='530',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1496';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1496, 1,'2026-10-07 09:30:55',1)
                ON DUPLICATE KEY UPDATE productid = 1496, edited = 1, sysdate = '2026-10-07 09:30:55', userid = 1; -- id=2290
UPDATE product SET productName = 'جاكت 4903 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01497',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430.00',lastbuyprice_withDiscount = '430',meanbuyprice = '430.00',meanbuyprice_withDiscount = '430' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.65' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1497';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1497, 1,'2026-10-07 09:31:01',1)
                ON DUPLICATE KEY UPDATE productid = 1497, edited = 1, sysdate = '2026-10-07 09:31:01', userid = 1; -- id=2291
UPDATE product SET productName = 'جاكت 4905 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01498',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480.00',lastbuyprice_withDiscount = '480',meanbuyprice = '480.00',meanbuyprice_withDiscount = '480' , productbuypricereal = '480.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1498';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1498, 1,'2026-10-07 09:31:07',1)
                ON DUPLICATE KEY UPDATE productid = 1498, edited = 1, sysdate = '2026-10-07 09:31:07', userid = 1; -- id=2292
UPDATE product SET productName = 'جاكت 4918 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '675.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01499',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675.00',lastbuyprice_withDiscount = '675',meanbuyprice = '675.00',meanbuyprice_withDiscount = '675' , productbuypricereal = '675.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.70' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1499';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1499, 1,'2026-10-07 09:31:31',1)
                ON DUPLICATE KEY UPDATE productid = 1499, edited = 1, sysdate = '2026-10-07 09:31:31', userid = 1; -- id=2293
UPDATE product SET productName = 'جاكت 4919 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '675.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01500',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675.00',lastbuyprice_withDiscount = '675',meanbuyprice = '675.00',meanbuyprice_withDiscount = '675' , productbuypricereal = '675.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.70' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1500';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1500, 1,'2026-10-07 09:31:51',1)
                ON DUPLICATE KEY UPDATE productid = 1500, edited = 1, sysdate = '2026-10-07 09:31:51', userid = 1; -- id=2294
UPDATE product SET productName = 'جاكت 4005 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '650.00', productSellAllPrice = '675.00', productSellUnitPrice = '675.00', productSellHalfPrice = '675.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01501',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650.00',lastbuyprice_withDiscount = '650',meanbuyprice = '650.00',meanbuyprice_withDiscount = '650' , productbuypricereal = '650.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.85' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1501';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1501, 1,'2026-10-07 09:32:01',1)
                ON DUPLICATE KEY UPDATE productid = 1501, edited = 1, sysdate = '2026-10-07 09:32:01', userid = 1; -- id=2295
UPDATE product SET productName = 'جاكت 4017 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '675.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01502',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675.00',lastbuyprice_withDiscount = '675',meanbuyprice = '675.00',meanbuyprice_withDiscount = '675' , productbuypricereal = '675.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.70' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1502';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1502, 1,'2026-10-07 09:32:07',1)
                ON DUPLICATE KEY UPDATE productid = 1502, edited = 1, sysdate = '2026-10-07 09:32:07', userid = 1; -- id=2296
UPDATE product SET productName = 'جاكت 2957 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '580.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01503',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580.00',lastbuyprice_withDiscount = '580',meanbuyprice = '580.00',meanbuyprice_withDiscount = '580' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.45' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1503';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1503, 1,'2026-10-07 09:32:12',1)
                ON DUPLICATE KEY UPDATE productid = 1503, edited = 1, sysdate = '2026-10-07 09:32:12', userid = 1; -- id=2297
UPDATE product SET productName = 'جاكت 4302 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '580.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01504',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580.00',lastbuyprice_withDiscount = '580',meanbuyprice = '580.00',meanbuyprice_withDiscount = '580' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.45' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1504';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1504, 1,'2026-10-07 09:32:22',1)
                ON DUPLICATE KEY UPDATE productid = 1504, edited = 1, sysdate = '2026-10-07 09:32:22', userid = 1; -- id=2298
UPDATE product SET productName = 'جاكت 4304 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '600.00', productSellAllPrice = '625.00', productSellUnitPrice = '625.00', productSellHalfPrice = '625.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01505',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600.00',lastbuyprice_withDiscount = '600',meanbuyprice = '600.00',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1505';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1505, 1,'2026-10-07 09:32:30',1)
                ON DUPLICATE KEY UPDATE productid = 1505, edited = 1, sysdate = '2026-10-07 09:32:30', userid = 1; -- id=2299
UPDATE product SET productName = 'جاكت 4911 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01506',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480.00',lastbuyprice_withDiscount = '480',meanbuyprice = '480.00',meanbuyprice_withDiscount = '480' , productbuypricereal = '480.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1506';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1506, 1,'2026-10-07 09:32:37',1)
                ON DUPLICATE KEY UPDATE productid = 1506, edited = 1, sysdate = '2026-10-07 09:32:37', userid = 1; -- id=2300
UPDATE product SET productName = 'جاكت 4915 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '650.00', productSellAllPrice = '675.00', productSellUnitPrice = '675.00', productSellHalfPrice = '675.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01507',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650.00',lastbuyprice_withDiscount = '650',meanbuyprice = '650.00',meanbuyprice_withDiscount = '650' , productbuypricereal = '650.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.85' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1507';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1507, 1,'2026-10-07 09:32:44',1)
                ON DUPLICATE KEY UPDATE productid = 1507, edited = 1, sysdate = '2026-10-07 09:32:44', userid = 1; -- id=2301
UPDATE product SET productName = 'جاكت 4900 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '600.00', productSellAllPrice = '625.00', productSellUnitPrice = '625.00', productSellHalfPrice = '625.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01508',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600.00',lastbuyprice_withDiscount = '600',meanbuyprice = '600.00',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1508';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1508, 1,'2026-10-07 09:32:52',1)
                ON DUPLICATE KEY UPDATE productid = 1508, edited = 1, sysdate = '2026-10-07 09:32:52', userid = 1; -- id=2302
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:02:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:32:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 09:32:56', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3680
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('تمبو', '', '', '', '', '0', '1', '2026-10-07 09:33:15', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=106
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('106', '0', '', '0', 'إضافة مورد جديد', '106', '', '2026-10-07 09:33:15', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=186
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('تمبو', 'تمبو', 'تمبو', 'تمبو', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-07 09:33:15'); -- id=589
UPDATE supplier SET suppliername = 'تمبو', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-07', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='589',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '106';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:06:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:36:34", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 09:36:34', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3681
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:15:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:45:02", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 09:45:02', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3682
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:22:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:52:50", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 09:52:50', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3683
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:26:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:56:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 09:56:29', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3684
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac5e798d7ae1', '2026-10-07 09:32:56', '106', '0.00', '628290', '0', '0', '628290.00',  '628290.00', '0', '628290', '1', '2026-10-07 09:56:29', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=45
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01457', '45', '103', '1457', '36', '430', '15480.00', '0', '', '2026-10-07 09:56:29', '1457','','','0','0','0','0','0',null,'430','15480','0','0','0','0','0','0','0','0','1'); -- id=251
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1457, 0, 0
                    , 430, 36, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 430,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=327
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1457', '430', '36', '0', 'buyBillController.php', '251', '', '0', '0'); -- id=209
UPDATE product SET  productBuyPrice = "430" WHERE productId = 1457 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 251 ;
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 450', productDescription = '', productCatId = '103', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01457',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.65' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1457';
UPDATE buybilldetail SET  lastbuyprice = 430 , meanbuyprice = 430, lastbuyprice_withDiscount = 430, meanbuyprice_withDiscount = 430
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 430, lastbuyprice_withDiscountAndTax = 430
                where buybilldetailid = 251;
UPDATE productunit SET proUnitBuyPrice  = 430 * productnumber WHERE productid = 1457;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1482';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1457', '1', '36', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 09:32:56','0','0'); -- id=2531
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01458', '45', '103', '1458', '36', '300', '10800.00', '0', '', '2026-10-07 09:56:29', '1458','','','0','0','0','0','0',null,'300','10800','0','0','0','0','0','0','0','0','1'); -- id=252
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1458, 0, 0
                    , 300, 36, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 300,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=328
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1458', '300', '36', '0', 'buyBillController.php', '252', '', '0', '0'); -- id=210
UPDATE product SET  productBuyPrice = "300" WHERE productId = 1458 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 252 ;
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 320', productDescription = '', productCatId = '103', productBuyPrice = '300.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01458',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '300',lastbuyprice_withDiscount = '300',meanbuyprice = '300',meanbuyprice_withDiscount = '300' , productbuypricereal = '300.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.67' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='300',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='300',meanbuyprice_withTax='300',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='300',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1458';
UPDATE buybilldetail SET  lastbuyprice = 300 , meanbuyprice = 300, lastbuyprice_withDiscount = 300, meanbuyprice_withDiscount = 300
        , lastbuyprice_withTax = 300, meanbuyprice_withTax = 300, lastbuyprice_withDiscountAndTax = 300
                where buybilldetailid = 252;
UPDATE productunit SET proUnitBuyPrice  = 300 * productnumber WHERE productid = 1458;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1483';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1458', '1', '36', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 09:32:56','0','0'); -- id=2532
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01459', '45', '103', '1459', '108', '310', '33480.00', '0', '', '2026-10-07 09:56:29', '1459','','','0','0','0','0','0',null,'310','33480','0','0','0','0','0','0','0','0','1'); -- id=253
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1459, 0, 0
                    , 310, 108, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 310,
                        buyQuantity =buyQuantity+108, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=329
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1459', '310', '108', '0', 'buyBillController.php', '253', '', '0', '0'); -- id=211
UPDATE product SET  productBuyPrice = "310" WHERE productId = 1459 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 253 ;
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 330', productDescription = '', productCatId = '103', productBuyPrice = '310.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01459',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '310',lastbuyprice_withDiscount = '310',meanbuyprice = '310',meanbuyprice_withDiscount = '310' , productbuypricereal = '310.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.45' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='310',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='310',meanbuyprice_withTax='310',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='310',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1459';
UPDATE buybilldetail SET  lastbuyprice = 310 , meanbuyprice = 310, lastbuyprice_withDiscount = 310, meanbuyprice_withDiscount = 310
        , lastbuyprice_withTax = 310, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 310
                where buybilldetailid = 253;
UPDATE productunit SET proUnitBuyPrice  = 310 * productnumber WHERE productid = 1459;
UPDATE storedetail SET  productquantity = '108', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1484';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1459', '1', '108', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '108', '1', '2026-10-07 09:32:56','0','0'); -- id=2533
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01460', '45', '103', '1460', '36', '360', '12960.00', '0', '', '2026-10-07 09:56:29', '1460','','','0','0','0','0','0',null,'360','12960','0','0','0','0','0','0','0','0','1'); -- id=254
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1460, 0, 0
                    , 360, 36, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 360,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=330
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1460', '360', '36', '0', 'buyBillController.php', '254', '', '0', '0'); -- id=212
UPDATE product SET  productBuyPrice = "360" WHERE productId = 1460 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 254 ;
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 380', productDescription = '', productCatId = '103', productBuyPrice = '360.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01460',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '360',lastbuyprice_withDiscount = '360',meanbuyprice = '360',meanbuyprice_withDiscount = '360' , productbuypricereal = '360.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '5.56' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='360',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='360',meanbuyprice_withTax='360',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='360',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1460';
UPDATE buybilldetail SET  lastbuyprice = 360 , meanbuyprice = 360, lastbuyprice_withDiscount = 360, meanbuyprice_withDiscount = 360
        , lastbuyprice_withTax = 360, meanbuyprice_withTax = 360, lastbuyprice_withDiscountAndTax = 360
                where buybilldetailid = 254;
UPDATE productunit SET proUnitBuyPrice  = 360 * productnumber WHERE productid = 1460;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1485';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1460', '1', '36', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 09:32:56','0','0'); -- id=2534
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01461', '45', '103', '1461', '36', '530', '19080.00', '0', '', '2026-10-07 09:56:29', '1461','','','0','0','0','0','0',null,'530','19080','0','0','0','0','0','0','0','0','1'); -- id=255
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1461, 0, 0
                    , 530, 36, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 530,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=331
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1461', '530', '36', '0', 'buyBillController.php', '255', '', '0', '0'); -- id=213
UPDATE product SET  productBuyPrice = "530" WHERE productId = 1461 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 255 ;
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 550', productDescription = '', productCatId = '103', productBuyPrice = '530.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01461',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '530',meanbuyprice = '530',meanbuyprice_withDiscount = '530' , productbuypricereal = '530.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.77' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='530',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1461';
UPDATE buybilldetail SET  lastbuyprice = 530 , meanbuyprice = 530, lastbuyprice_withDiscount = 530, meanbuyprice_withDiscount = 530
        , lastbuyprice_withTax = 530, meanbuyprice_withTax = 530, lastbuyprice_withDiscountAndTax = 530
                where buybilldetailid = 255;
UPDATE productunit SET proUnitBuyPrice  = 530 * productnumber WHERE productid = 1461;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1486';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1461', '1', '36', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 09:32:56','0','0'); -- id=2535
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01462', '45', '103', '1462', '324', '410', '132840.00', '0', '', '2026-10-07 09:56:29', '1462','','','0','0','0','0','0',null,'410','132840','0','0','0','0','0','0','0','0','1'); -- id=256
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1462, 0, 0
                    , 410, 324, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 410,
                        buyQuantity =buyQuantity+324, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=332
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1462', '410', '324', '0', 'buyBillController.php', '256', '', '0', '0'); -- id=214
UPDATE product SET  productBuyPrice = "410" WHERE productId = 1462 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 256 ;
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 430', productDescription = '', productCatId = '103', productBuyPrice = '410.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01462',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410',meanbuyprice_withDiscount = '410' , productbuypricereal = '410.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.88' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='410',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1462';
UPDATE buybilldetail SET  lastbuyprice = 410 , meanbuyprice = 410, lastbuyprice_withDiscount = 410, meanbuyprice_withDiscount = 410
        , lastbuyprice_withTax = 410, meanbuyprice_withTax = 410, lastbuyprice_withDiscountAndTax = 410
                where buybilldetailid = 256;
UPDATE productunit SET proUnitBuyPrice  = 410 * productnumber WHERE productid = 1462;
UPDATE storedetail SET  productquantity = '324', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1487';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1462', '1', '324', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '324', '1', '2026-10-07 09:32:56','0','0'); -- id=2536
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01463', '45', '103', '1463', '72', '450', '32400.00', '0', '', '2026-10-07 09:56:29', '1463','','','0','0','0','0','0',null,'450','32400','0','0','0','0','0','0','0','0','1'); -- id=257
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1463, 0, 0
                    , 450, 72, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 450,
                        buyQuantity =buyQuantity+72, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=333
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1463', '450', '72', '0', 'buyBillController.php', '257', '', '0', '0'); -- id=215
UPDATE product SET  productBuyPrice = "450" WHERE productId = 1463 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 257 ;
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 470', productDescription = '', productCatId = '103', productBuyPrice = '450.00', productSellAllPrice = '470.00', productSellUnitPrice = '470.00', productSellHalfPrice = '470.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01463',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.44' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1463';
UPDATE buybilldetail SET  lastbuyprice = 450 , meanbuyprice = 450, lastbuyprice_withDiscount = 450, meanbuyprice_withDiscount = 450
        , lastbuyprice_withTax = 450, meanbuyprice_withTax = 450, lastbuyprice_withDiscountAndTax = 450
                where buybilldetailid = 257;
UPDATE productunit SET proUnitBuyPrice  = 450 * productnumber WHERE productid = 1463;
UPDATE storedetail SET  productquantity = '72', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1488';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1463', '1', '72', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '72', '1', '2026-10-07 09:32:56','0','0'); -- id=2537
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01464', '45', '103', '1464', '36', '580', '20880.00', '0', '', '2026-10-07 09:56:29', '1464','','','0','0','0','0','0',null,'580','20880','0','0','0','0','0','0','0','0','1'); -- id=258
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1464, 0, 0
                    , 580, 36, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 580,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=334
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1464', '580', '36', '0', 'buyBillController.php', '258', '', '0', '0'); -- id=216
UPDATE product SET  productBuyPrice = "580" WHERE productId = 1464 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 258 ;
UPDATE product SET productName = 'تي شيرت ميلتون تمبو 600', productDescription = '', productCatId = '103', productBuyPrice = '580.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01464',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.45' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1464';
UPDATE buybilldetail SET  lastbuyprice = 580 , meanbuyprice = 580, lastbuyprice_withDiscount = 580, meanbuyprice_withDiscount = 580
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 580
                where buybilldetailid = 258;
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1464;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1489';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1464', '1', '36', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 09:32:56','0','0'); -- id=2538
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01465', '45', '103', '1465', '30', '480', '14400.00', '0', '', '2026-10-07 09:56:29', '1465','','','0','0','0','0','0',null,'480','14400','0','0','0','0','0','0','0','0','1'); -- id=259
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1465, 0, 0
                    , 480, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 480,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=335
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1465', '480', '30', '0', 'buyBillController.php', '259', '', '0', '0'); -- id=217
UPDATE product SET  productBuyPrice = "480" WHERE productId = 1465 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 259 ;
UPDATE product SET productName = 'فيست تمبو 500', productDescription = '', productCatId = '103', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01465',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1465';
UPDATE buybilldetail SET  lastbuyprice = 480 , meanbuyprice = 480, lastbuyprice_withDiscount = 480, meanbuyprice_withDiscount = 480
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 480, lastbuyprice_withDiscountAndTax = 480
                where buybilldetailid = 259;
UPDATE productunit SET proUnitBuyPrice  = 480 * productnumber WHERE productid = 1465;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1490';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1465', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2539
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01491', '45', '108', '1491', '30', '675', '20250.00', '0', '', '2026-10-07 09:56:29', '1491','','','0','0','0','0','0',null,'675','20250','0','0','0','0','0','0','0','0','1'); -- id=260
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1491, 0, 0
                    , 675, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 675,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=336
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1491', '675', '30', '0', 'buyBillController.php', '260', '', '0', '0'); -- id=218
UPDATE product SET  productBuyPrice = "675" WHERE productId = 1491 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 260 ;
UPDATE product SET productName = 'جاكت 4914 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '675.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01491',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675',lastbuyprice_withDiscount = '675',meanbuyprice = '675',meanbuyprice_withDiscount = '675' , productbuypricereal = '675.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.70' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1491';
UPDATE buybilldetail SET  lastbuyprice = 675 , meanbuyprice = 675, lastbuyprice_withDiscount = 675, meanbuyprice_withDiscount = 675
        , lastbuyprice_withTax = 675, meanbuyprice_withTax = 675, lastbuyprice_withDiscountAndTax = 675
                where buybilldetailid = 260;
UPDATE productunit SET proUnitBuyPrice  = 675 * productnumber WHERE productid = 1491;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1516';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1491', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2540
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01492', '45', '108', '1492', '30', '600', '18000.00', '0', '', '2026-10-07 09:56:29', '1492','','','0','0','0','0','0',null,'600','18000','0','0','0','0','0','0','0','0','1'); -- id=261
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1492, 0, 0
                    , 600, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 600,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=337
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1492', '600', '30', '0', 'buyBillController.php', '261', '', '0', '0'); -- id=219
UPDATE product SET  productBuyPrice = "600" WHERE productId = 1492 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 261 ;
UPDATE product SET productName = 'جاكت 4301 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '600.00', productSellAllPrice = '625.00', productSellUnitPrice = '625.00', productSellHalfPrice = '625.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01492',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1492';
UPDATE buybilldetail SET  lastbuyprice = 600 , meanbuyprice = 600, lastbuyprice_withDiscount = 600, meanbuyprice_withDiscount = 600
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where buybilldetailid = 261;
UPDATE productunit SET proUnitBuyPrice  = 600 * productnumber WHERE productid = 1492;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1517';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1492', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2541
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01493', '45', '108', '1493', '30', '600', '18000.00', '0', '', '2026-10-07 09:56:29', '1493','','','0','0','0','0','0',null,'600','18000','0','0','0','0','0','0','0','0','1'); -- id=262
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1493, 0, 0
                    , 600, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 600,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=338
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1493', '600', '30', '0', 'buyBillController.php', '262', '', '0', '0'); -- id=220
UPDATE product SET  productBuyPrice = "600" WHERE productId = 1493 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 262 ;
UPDATE product SET productName = 'جاكت 4300 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '600.00', productSellAllPrice = '625.00', productSellUnitPrice = '625.00', productSellHalfPrice = '625.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01493',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1493';
UPDATE buybilldetail SET  lastbuyprice = 600 , meanbuyprice = 600, lastbuyprice_withDiscount = 600, meanbuyprice_withDiscount = 600
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where buybilldetailid = 262;
UPDATE productunit SET proUnitBuyPrice  = 600 * productnumber WHERE productid = 1493;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1518';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1493', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2542
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01495', '45', '108', '1495', '30', '625', '18750.00', '0', '', '2026-10-07 09:56:29', '1495','','','0','0','0','0','0',null,'625','18750','0','0','0','0','0','0','0','0','1'); -- id=263
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1495, 0, 0
                    , 625, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 625,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=339
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1495', '625', '30', '0', 'buyBillController.php', '263', '', '0', '0'); -- id=221
UPDATE product SET  productBuyPrice = "625" WHERE productId = 1495 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 263 ;
UPDATE product SET productName = 'جاكت 4008 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '625.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01495',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '625',lastbuyprice_withDiscount = '625',meanbuyprice = '625',meanbuyprice_withDiscount = '625' , productbuypricereal = '625.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='625',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='625',meanbuyprice_withTax='625',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='625',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1495';
UPDATE buybilldetail SET  lastbuyprice = 625 , meanbuyprice = 625, lastbuyprice_withDiscount = 625, meanbuyprice_withDiscount = 625
        , lastbuyprice_withTax = 625, meanbuyprice_withTax = 625, lastbuyprice_withDiscountAndTax = 625
                where buybilldetailid = 263;
UPDATE productunit SET proUnitBuyPrice  = 625 * productnumber WHERE productid = 1495;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1520';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1495', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2543
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01496', '45', '108', '1496', '30', '530', '15900.00', '0', '', '2026-10-07 09:56:29', '1496','','','0','0','0','0','0',null,'530','15900','0','0','0','0','0','0','0','0','1'); -- id=264
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1496, 0, 0
                    , 530, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 530,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=340
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1496', '530', '30', '0', 'buyBillController.php', '264', '', '0', '0'); -- id=222
UPDATE product SET  productBuyPrice = "530" WHERE productId = 1496 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 264 ;
UPDATE product SET productName = 'جاكت 4912 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '530.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01496',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '530',meanbuyprice = '530',meanbuyprice_withDiscount = '530' , productbuypricereal = '530.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.77' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='530',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1496';
UPDATE buybilldetail SET  lastbuyprice = 530 , meanbuyprice = 530, lastbuyprice_withDiscount = 530, meanbuyprice_withDiscount = 530
        , lastbuyprice_withTax = 530, meanbuyprice_withTax = 530, lastbuyprice_withDiscountAndTax = 530
                where buybilldetailid = 264;
UPDATE productunit SET proUnitBuyPrice  = 530 * productnumber WHERE productid = 1496;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1521';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1496', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2544
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01497', '45', '108', '1497', '36', '430', '15480.00', '0', '', '2026-10-07 09:56:29', '1497','','','0','0','0','0','0',null,'430','15480','0','0','0','0','0','0','0','0','1'); -- id=265
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1497, 0, 0
                    , 430, 36, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 430,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=341
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1497', '430', '36', '0', 'buyBillController.php', '265', '', '0', '0'); -- id=223
UPDATE product SET  productBuyPrice = "430" WHERE productId = 1497 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 265 ;
UPDATE product SET productName = 'جاكت 4903 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01497',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.65' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1497';
UPDATE buybilldetail SET  lastbuyprice = 430 , meanbuyprice = 430, lastbuyprice_withDiscount = 430, meanbuyprice_withDiscount = 430
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 430, lastbuyprice_withDiscountAndTax = 430
                where buybilldetailid = 265;
UPDATE productunit SET proUnitBuyPrice  = 430 * productnumber WHERE productid = 1497;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1522';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1497', '1', '36', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 09:32:56','0','0'); -- id=2545
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01498', '45', '108', '1498', '36', '480', '17280.00', '0', '', '2026-10-07 09:56:29', '1498','','','0','0','0','0','0',null,'480','17280','0','0','0','0','0','0','0','0','1'); -- id=266
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1498, 0, 0
                    , 480, 36, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 480,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=342
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1498', '480', '36', '0', 'buyBillController.php', '266', '', '0', '0'); -- id=224
UPDATE product SET  productBuyPrice = "480" WHERE productId = 1498 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 266 ;
UPDATE product SET productName = 'جاكت 4905 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01498',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1498';
UPDATE buybilldetail SET  lastbuyprice = 480 , meanbuyprice = 480, lastbuyprice_withDiscount = 480, meanbuyprice_withDiscount = 480
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 480, lastbuyprice_withDiscountAndTax = 480
                where buybilldetailid = 266;
UPDATE productunit SET proUnitBuyPrice  = 480 * productnumber WHERE productid = 1498;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1523';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1498', '1', '36', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 09:32:56','0','0'); -- id=2546
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01508', '45', '108', '1508', '36', '600', '21600.00', '0', '', '2026-10-07 09:56:29', '1508','','','0','0','0','0','0',null,'600','21600','0','0','0','0','0','0','0','0','1'); -- id=267
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1508, 0, 0
                    , 600, 36, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 600,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=343
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1508', '600', '36', '0', 'buyBillController.php', '267', '', '0', '0'); -- id=225
UPDATE product SET  productBuyPrice = "600" WHERE productId = 1508 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 267 ;
UPDATE product SET productName = 'جاكت 4900 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '600.00', productSellAllPrice = '625.00', productSellUnitPrice = '625.00', productSellHalfPrice = '625.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01508',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1508';
UPDATE buybilldetail SET  lastbuyprice = 600 , meanbuyprice = 600, lastbuyprice_withDiscount = 600, meanbuyprice_withDiscount = 600
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where buybilldetailid = 267;
UPDATE productunit SET proUnitBuyPrice  = 600 * productnumber WHERE productid = 1508;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1533';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1508', '1', '36', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 09:32:56','0','0'); -- id=2547
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01499', '45', '108', '1499', '30', '675', '20250.00', '0', '', '2026-10-07 09:56:29', '1499','','','0','0','0','0','0',null,'675','20250','0','0','0','0','0','0','0','0','1'); -- id=268
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1499, 0, 0
                    , 675, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 675,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=344
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1499', '675', '30', '0', 'buyBillController.php', '268', '', '0', '0'); -- id=226
UPDATE product SET  productBuyPrice = "675" WHERE productId = 1499 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 268 ;
UPDATE product SET productName = 'جاكت 4918 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '675.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01499',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675',lastbuyprice_withDiscount = '675',meanbuyprice = '675',meanbuyprice_withDiscount = '675' , productbuypricereal = '675.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.70' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1499';
UPDATE buybilldetail SET  lastbuyprice = 675 , meanbuyprice = 675, lastbuyprice_withDiscount = 675, meanbuyprice_withDiscount = 675
        , lastbuyprice_withTax = 675, meanbuyprice_withTax = 675, lastbuyprice_withDiscountAndTax = 675
                where buybilldetailid = 268;
UPDATE productunit SET proUnitBuyPrice  = 675 * productnumber WHERE productid = 1499;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1524';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1499', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2548
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01500', '45', '108', '1500', '30', '675', '20250.00', '0', '', '2026-10-07 09:56:29', '1500','','','0','0','0','0','0',null,'675','20250','0','0','0','0','0','0','0','0','1'); -- id=269
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1500, 0, 0
                    , 675, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 675,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=345
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1500', '675', '30', '0', 'buyBillController.php', '269', '', '0', '0'); -- id=227
UPDATE product SET  productBuyPrice = "675" WHERE productId = 1500 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 269 ;
UPDATE product SET productName = 'جاكت 4919 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '675.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01500',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675',lastbuyprice_withDiscount = '675',meanbuyprice = '675',meanbuyprice_withDiscount = '675' , productbuypricereal = '675.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.70' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1500';
UPDATE buybilldetail SET  lastbuyprice = 675 , meanbuyprice = 675, lastbuyprice_withDiscount = 675, meanbuyprice_withDiscount = 675
        , lastbuyprice_withTax = 675, meanbuyprice_withTax = 675, lastbuyprice_withDiscountAndTax = 675
                where buybilldetailid = 269;
UPDATE productunit SET proUnitBuyPrice  = 675 * productnumber WHERE productid = 1500;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1525';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1500', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2549
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01501', '45', '108', '1501', '30', '650', '19500.00', '0', '', '2026-10-07 09:56:29', '1501','','','0','0','0','0','0',null,'650','19500','0','0','0','0','0','0','0','0','1'); -- id=270
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1501, 0, 0
                    , 650, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 650,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=346
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1501', '650', '30', '0', 'buyBillController.php', '270', '', '0', '0'); -- id=228
UPDATE product SET  productBuyPrice = "650" WHERE productId = 1501 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 270 ;
UPDATE product SET productName = 'جاكت 4005 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '650.00', productSellAllPrice = '675.00', productSellUnitPrice = '675.00', productSellHalfPrice = '675.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01501',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650',lastbuyprice_withDiscount = '650',meanbuyprice = '650',meanbuyprice_withDiscount = '650' , productbuypricereal = '650.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.85' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1501';
UPDATE buybilldetail SET  lastbuyprice = 650 , meanbuyprice = 650, lastbuyprice_withDiscount = 650, meanbuyprice_withDiscount = 650
        , lastbuyprice_withTax = 650, meanbuyprice_withTax = 650, lastbuyprice_withDiscountAndTax = 650
                where buybilldetailid = 270;
UPDATE productunit SET proUnitBuyPrice  = 650 * productnumber WHERE productid = 1501;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1526';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1501', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2550
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01502', '45', '108', '1502', '30', '675', '20250.00', '0', '', '2026-10-07 09:56:29', '1502','','','0','0','0','0','0',null,'675','20250','0','0','0','0','0','0','0','0','1'); -- id=271
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1502, 0, 0
                    , 675, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 675,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=347
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1502', '675', '30', '0', 'buyBillController.php', '271', '', '0', '0'); -- id=229
UPDATE product SET  productBuyPrice = "675" WHERE productId = 1502 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 271 ;
UPDATE product SET productName = 'جاكت 4017 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '675.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01502',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '675',lastbuyprice_withDiscount = '675',meanbuyprice = '675',meanbuyprice_withDiscount = '675' , productbuypricereal = '675.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.70' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='675',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='675',meanbuyprice_withTax='675',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='675',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1502';
UPDATE buybilldetail SET  lastbuyprice = 675 , meanbuyprice = 675, lastbuyprice_withDiscount = 675, meanbuyprice_withDiscount = 675
        , lastbuyprice_withTax = 675, meanbuyprice_withTax = 675, lastbuyprice_withDiscountAndTax = 675
                where buybilldetailid = 271;
UPDATE productunit SET proUnitBuyPrice  = 675 * productnumber WHERE productid = 1502;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1527';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1502', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2551
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01503', '45', '108', '1503', '36', '580', '20880.00', '0', '', '2026-10-07 09:56:29', '1503','','','0','0','0','0','0',null,'580','20880','0','0','0','0','0','0','0','0','1'); -- id=272
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1503, 0, 0
                    , 580, 36, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 580,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=348
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1503', '580', '36', '0', 'buyBillController.php', '272', '', '0', '0'); -- id=230
UPDATE product SET  productBuyPrice = "580" WHERE productId = 1503 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 272 ;
UPDATE product SET productName = 'جاكت 2957 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '580.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01503',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.45' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1503';
UPDATE buybilldetail SET  lastbuyprice = 580 , meanbuyprice = 580, lastbuyprice_withDiscount = 580, meanbuyprice_withDiscount = 580
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 580
                where buybilldetailid = 272;
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1503;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1528';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1503', '1', '36', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 09:32:56','0','0'); -- id=2552
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01504', '45', '108', '1504', '30', '580', '17400.00', '0', '', '2026-10-07 09:56:29', '1504','','','0','0','0','0','0',null,'580','17400','0','0','0','0','0','0','0','0','1'); -- id=273
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1504, 0, 0
                    , 580, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 580,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=349
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1504', '580', '30', '0', 'buyBillController.php', '273', '', '0', '0'); -- id=231
UPDATE product SET  productBuyPrice = "580" WHERE productId = 1504 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 273 ;
UPDATE product SET productName = 'جاكت 4302 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '580.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01504',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.45' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1504';
UPDATE buybilldetail SET  lastbuyprice = 580 , meanbuyprice = 580, lastbuyprice_withDiscount = 580, meanbuyprice_withDiscount = 580
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 580
                where buybilldetailid = 273;
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1504;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1529';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1504', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2553
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01505', '45', '108', '1505', '30', '600', '18000.00', '0', '', '2026-10-07 09:56:29', '1505','','','0','0','0','0','0',null,'600','18000','0','0','0','0','0','0','0','0','1'); -- id=274
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1505, 0, 0
                    , 600, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 600,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=350
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1505', '600', '30', '0', 'buyBillController.php', '274', '', '0', '0'); -- id=232
UPDATE product SET  productBuyPrice = "600" WHERE productId = 1505 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 274 ;
UPDATE product SET productName = 'جاكت 4304 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '600.00', productSellAllPrice = '625.00', productSellUnitPrice = '625.00', productSellHalfPrice = '625.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01505',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1505';
UPDATE buybilldetail SET  lastbuyprice = 600 , meanbuyprice = 600, lastbuyprice_withDiscount = 600, meanbuyprice_withDiscount = 600
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where buybilldetailid = 274;
UPDATE productunit SET proUnitBuyPrice  = 600 * productnumber WHERE productid = 1505;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1530';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1505', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2554
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01504', '45', '108', '1504', '30', '580', '17400.00', '0', '', '2026-10-07 09:56:29', '1504','','','0','0','0','0','0',null,'580','17400','0','0','0','0','0','0','0','0','1'); -- id=275
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1504, 0, 0
                    , 580, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 580,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=349
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1504', '580', '30', '0', 'buyBillController.php', '275', '', '0', '0'); -- id=233
UPDATE product SET  productBuyPrice = "580" WHERE productId = 1504 ;
UPDATE buybilldetail SET  quantitybefore = 30 WHERE buybilldetailid = 275 ;
UPDATE product SET productName = 'جاكت 4302 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '580.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01504',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.45' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1504';
UPDATE buybilldetail SET  lastbuyprice = 580 , meanbuyprice = 580, lastbuyprice_withDiscount = 580, meanbuyprice_withDiscount = 580
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 580
                where buybilldetailid = 275;
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1504;
UPDATE storedetail SET  productquantity = '60', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1529';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1504', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '30', '60', '1', '2026-10-07 09:32:56','0','0'); -- id=2555
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01506', '45', '108', '1506', '36', '480', '17280.00', '0', '', '2026-10-07 09:56:29', '1506','','','0','0','0','0','0',null,'480','17280','0','0','0','0','0','0','0','0','1'); -- id=276
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1506, 0, 0
                    , 480, 36, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 480,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=352
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1506', '480', '36', '0', 'buyBillController.php', '276', '', '0', '0'); -- id=234
UPDATE product SET  productBuyPrice = "480" WHERE productId = 1506 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 276 ;
UPDATE product SET productName = 'جاكت 4911 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01506',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1506';
UPDATE buybilldetail SET  lastbuyprice = 480 , meanbuyprice = 480, lastbuyprice_withDiscount = 480, meanbuyprice_withDiscount = 480
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 480, lastbuyprice_withDiscountAndTax = 480
                where buybilldetailid = 276;
UPDATE productunit SET proUnitBuyPrice  = 480 * productnumber WHERE productid = 1506;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1531';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1506', '1', '36', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 09:32:56','0','0'); -- id=2556
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01507', '45', '108', '1507', '30', '650', '19500.00', '0', '', '2026-10-07 09:56:29', '1507','','','0','0','0','0','0',null,'650','19500','0','0','0','0','0','0','0','0','1'); -- id=277
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 09:32:56', 1, 1507, 0, 0
                    , 650, 30, 0, 0, 1, '2026-10-07 09:56:29')
                ON DUPLICATE KEY UPDATE buyprice = 650,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 09:56:29' ; -- id=353
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1507', '650', '30', '0', 'buyBillController.php', '277', '', '0', '0'); -- id=235
UPDATE product SET  productBuyPrice = "650" WHERE productId = 1507 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 277 ;
UPDATE product SET productName = 'جاكت 4915 تمبو', productDescription = '', productCatId = '108', productBuyPrice = '650.00', productSellAllPrice = '675.00', productSellUnitPrice = '675.00', productSellHalfPrice = '675.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01507',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650',lastbuyprice_withDiscount = '650',meanbuyprice = '650',meanbuyprice_withDiscount = '650' , productbuypricereal = '650.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.85' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1507';
UPDATE buybilldetail SET  lastbuyprice = 650 , meanbuyprice = 650, lastbuyprice_withDiscount = 650, meanbuyprice_withDiscount = 650
        , lastbuyprice_withTax = 650, meanbuyprice_withTax = 650, lastbuyprice_withDiscountAndTax = 650
                where buybilldetailid = 277;
UPDATE productunit SET proUnitBuyPrice  = 650 * productnumber WHERE productid = 1507;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1532';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1507', '1', '30', '0', '45', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 09:32:56','0','0'); -- id=2557
UPDATE supplier SET  suppliercurrentDebt = '628290',suppliercurrentDebtInCurrency= '628290' , userid = '1', supplierdate = '2026-10-07 09:56:29'   WHERE supplierid = '106';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('106', '0.00', '628290', '0', 'اضافة فاتورة مشتريات', '45', '628290', '2026-10-07 09:32:56', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','628290','1','0','628290','628290','0',''); -- id=187
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '628290', '628290', '2026-10-07', '1', '0', '0', '2026-10-07 09:56:29','اضافة فاتورة مشتريات رقم 45','1','0',null,'0','45','buyBillController.php?do=details&id=45'); -- id=1217
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1217', '382', '628290', '','0'); -- id=1223
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16952814.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1217', '589', '628290', '','0'); -- id=1217
UPDATE accountstree SET name = 'تمبو', customName = 'تمبو', customNameEn = 'تمبو', nameEn = 'تمبو', parent = '81', accountNature = '1', theValue = '628290', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 09:33:15' WHERE id = '589';
update buybill set dailyentryid='1217,0' where buybillid=45;
COMMIT;
UPDATE product SET overAllAveragePrice = 430 WHERE productId = 1457;UPDATE product SET overAllAveragePrice = 300 WHERE productId = 1458;UPDATE product SET overAllAveragePrice = 310 WHERE productId = 1459;UPDATE product SET overAllAveragePrice = 360 WHERE productId = 1460;UPDATE product SET overAllAveragePrice = 530 WHERE productId = 1461;UPDATE product SET overAllAveragePrice = 410 WHERE productId = 1462;UPDATE product SET overAllAveragePrice = 450 WHERE productId = 1463;UPDATE product SET overAllAveragePrice = 580 WHERE productId = 1464;UPDATE product SET overAllAveragePrice = 480 WHERE productId = 1465;UPDATE product SET overAllAveragePrice = 675 WHERE productId = 1491;UPDATE product SET overAllAveragePrice = 600 WHERE productId = 1492;UPDATE product SET overAllAveragePrice = 600 WHERE productId = 1493;UPDATE product SET overAllAveragePrice = 625 WHERE productId = 1495;UPDATE product SET overAllAveragePrice = 530 WHERE productId = 1496;UPDATE product SET overAllAveragePrice = 430 WHERE productId = 1497;UPDATE product SET overAllAveragePrice = 480 WHERE productId = 1498;UPDATE product SET overAllAveragePrice = 675 WHERE productId = 1499;UPDATE product SET overAllAveragePrice = 675 WHERE productId = 1500;UPDATE product SET overAllAveragePrice = 650 WHERE productId = 1501;UPDATE product SET overAllAveragePrice = 675 WHERE productId = 1502;UPDATE product SET overAllAveragePrice = 580 WHERE productId = 1503;UPDATE product SET overAllAveragePrice = 580 WHERE productId = 1504;UPDATE product SET overAllAveragePrice = 600 WHERE productId = 1505;UPDATE product SET overAllAveragePrice = 480 WHERE productId = 1506;UPDATE product SET overAllAveragePrice = 650 WHERE productId = 1507;UPDATE product SET overAllAveragePrice = 600 WHERE productId = 1508;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:26:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:56:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 09:56:30', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=45'); -- id=3685
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:26:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:56:47", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 09:56:47', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3686
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:26:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:56:51", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 09:56:51', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3687
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:26:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 09:56:54", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 09:56:54', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3688
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:45:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:15:58", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:15:58', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3689

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac5ed36aa90c
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 10:15:58', '06ac5ed36aa90c', '1', '0.00', '0', '0', '1', '5850.00', '5850', '5850', '0', '1', '2026-10-07 10:15:58', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '9' ,'0','','','','','-1','0','0','0','0','0','5850','0','','0','0','5850','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=109
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','اضافة فاتورة مبيعات','109', '0', '2026-10-07 10:15:58', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '5850', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 10:15:58','0','0','',''); -- id=199
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 339;
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 ('625','01495', '109', '108', '1495', '9', '650', '5850', '0', '', '0', '2026-10-07 10:15:58', '1495', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','339-9,','1','1','0','0','650','5850','0','','0','0.00','0','0','0','0'); -- id=449
UPDATE sellbilldetail SET  lastbuyprice = 625.00 , meanbuyprice = 625.00, lastbuyprice_withDiscount = 625.00, meanbuyprice_withDiscount = 625.00
        , lastbuyprice_withTax = 625, meanbuyprice_withTax = 625, lastbuyprice_withDiscountAndTax = 625
                where sellbilldetailid = 449;
 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 (1495, '2026-10-07', 5850, 5625, 5625
                    , 5625, 5625, 5625, 5625
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 5625, 5625, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5850, sellCostBuyPrice =sellCostBuyPrice+5625
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5625, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5625
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5625, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5625
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5625
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5625
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5625
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+9
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 5850, 5625, 5625
                    , 5625, 5625, 5625, 5625
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5625, 5625, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5850, sellCostBuyPrice =sellCostBuyPrice+5625
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5625, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5625
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5625, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5625
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5625
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5625
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5625
                        , returnSellVal = returnSellVal+0, 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 = '21', userid = '2', storedetaildate = '2026-10-07 10:15:58' WHERE storedetailid = '1520';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1495', '1', '9', '1', '109', 'اضافة فاتورة مبيعات', 'sellbillController.php', '30', '21', '2', '2026-10-07 10:15:58','0','0'); -- id=2558
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '343575',  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 ('337725','5850', '0', '2', 'اضافة فاتورة مبيعات', '109', '343575', '2026-10-07 10:15:58', '2',  'sellbillController.php','1','','0'); -- id=138
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '5850', '5850', '2026-10-07', '2', '0', '0', '2026-10-07 10:15:58','اضافة فاتورة مبيعات رقم 109','1','0',null,'0','109','sellbillController.php?do=showDetail&sellbillid=109'); -- id=1218
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1218', '419', '5850', '','0'); -- id=1224
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '343575', 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 ('1218', '143', '5850', '','0'); -- id=1218
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1023000', 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 ( '5625', '5625', '2026-10-07', '2', '0', '0', '2026-10-07 10:15:58','اضافة فاتورة مبيعات رقم 109 - صرف البضاعة من المخزن','1','0',null,'0','109','sellbillController.php?do=showDetail&sellbillid=109'); -- id=1219
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1219', '402', '5625', '','0'); -- id=1225
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '992762.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1219', '382', '5625', '','0'); -- id=1219
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16947189.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1218,0,1219' where sellbillid=109;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 5850, 5625, 5625
                    , 5625, 5625, 5625, 5625
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,5625, 5625, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5850, sellCostBuyPrice =sellCostBuyPrice+5625
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5625, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5625
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5625, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5625
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5625
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5625
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5625
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 5850, 5625, 5625
                    , 5625, 5625, 5625, 5625
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,5625, 5625, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5850, sellCostBuyPrice =sellCostBuyPrice+5625
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5625, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5625
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5625, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5625
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5625
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5625
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5625
                        , returnSellVal = returnSellVal+0, 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, 5850, 5625, 5625
                    , 5625, 5625, 5625, 5625, 5625, 5625)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+5850, netSellCostBuyPrice = netSellCostBuyPrice+5625
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+5625
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+5625
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+5625
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+5625
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+5625
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+5625
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+5625;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac5ed36aa90c and sellbillId = 109 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:45:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:15:58", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:15:58', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3690
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:49:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:19:36", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:19:36', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3691

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac5f1aecd48c
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 10:19:36', '06ac5f1aecd48c', '1', '0.00', '0', '115', '1', '37815.00', '37700', '37700', '0', '1', '2026-10-07 10:19:36', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '66' ,'0','','','','','-1','0','0','0','0','0','37700','0','','0','0','37700','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=110
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','اضافة فاتورة مبيعات','110', '0', '2026-10-07 10:19:36', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '37700', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 10:19:36','0','0','',''); -- id=200
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+12 where id = 342;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('480','01498', '110', '108', '1498', '12', '500', '6000', '0', '', '0', '2026-10-07 10:19:36', '1498', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','342-12,','1','1','0','0','500','6000','0','','0','0.00','0','0','0','0'); -- id=450
UPDATE sellbilldetail SET  lastbuyprice = 480.00 , meanbuyprice = 480.00, lastbuyprice_withDiscount = 480.00, meanbuyprice_withDiscount = 480.00
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 480, lastbuyprice_withDiscountAndTax = 480
                where sellbilldetailid = 450;
 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 (1498, '2026-10-07', 5981.7532725109, 5760, 5760
                    , 5760, 5760, 5760, 5760
                    , 0, 0, 0, 0
                    , 0, 0, 0, 12, 0, 5760, 5760, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5981.7532725109, sellCostBuyPrice =sellCostBuyPrice+5760
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5760, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5760
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5760, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5760
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5760
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5760
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5760
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+12
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 5981.7532725109, 5760, 5760
                    , 5760, 5760, 5760, 5760
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5760, 5760, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5981.7532725109, sellCostBuyPrice =sellCostBuyPrice+5760
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5760, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5760
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5760, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5760
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5760
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5760
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5760
                        , returnSellVal = returnSellVal+0, 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 = '24', userid = '2', storedetaildate = '2026-10-07 10:19:36' WHERE storedetailid = '1523';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1498', '1', '12', '1', '110', 'اضافة فاتورة مبيعات', 'sellbillController.php', '36', '24', '2', '2026-10-07 10:19:36','0','0'); -- id=2559
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 336;
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 ('675','01491', '110', '108', '1491', '9', '700', '6300', '0', '', '0', '2026-10-07 10:19:36', '1491', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','336-9,','1','1','0','0','700','6300','0','','0','0.00','0','0','0','0'); -- id=451
UPDATE sellbilldetail SET  lastbuyprice = 675.00 , meanbuyprice = 675.00, lastbuyprice_withDiscount = 675.00, meanbuyprice_withDiscount = 675.00
        , lastbuyprice_withTax = 675, meanbuyprice_withTax = 675, lastbuyprice_withDiscountAndTax = 675
                where sellbilldetailid = 451;
 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 (1491, '2026-10-07', 6280.8409361365, 6075, 6075
                    , 6075, 6075, 6075, 6075
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 6075, 6075, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6280.8409361365, sellCostBuyPrice =sellCostBuyPrice+6075
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6075, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6075
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6075, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6075
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6075
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6075
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6075
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+9
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 6280.8409361365, 6075, 6075
                    , 6075, 6075, 6075, 6075
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6075, 6075, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6280.8409361365, sellCostBuyPrice =sellCostBuyPrice+6075
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6075, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6075
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6075, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6075
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6075
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6075
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6075
                        , returnSellVal = returnSellVal+0, 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 = '21', userid = '2', storedetaildate = '2026-10-07 10:19:36' WHERE storedetailid = '1516';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1491', '1', '9', '1', '110', 'اضافة فاتورة مبيعات', 'sellbillController.php', '30', '21', '2', '2026-10-07 10:19:36','0','0'); -- id=2560
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+15 where id = 350;
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 ('600','01505', '110', '108', '1505', '15', '625', '9375', '0', '', '0', '2026-10-07 10:19:36', '1505', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','350-15,','1','1','0','0','625','9375','0','','0','0.00','0','0','0','0'); -- id=452
UPDATE sellbilldetail SET  lastbuyprice = 600.00 , meanbuyprice = 600.00, lastbuyprice_withDiscount = 600.00, meanbuyprice_withDiscount = 600.00
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where sellbilldetailid = 452;
 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 (1505, '2026-10-07', 9346.4894882983, 9000, 9000
                    , 9000, 9000, 9000, 9000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 15, 0, 9000, 9000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+9346.4894882983, sellCostBuyPrice =sellCostBuyPrice+9000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+9000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+9000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+9000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+9000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+9000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+9000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+9000
                        , returnSellVal = returnSellVal+0, 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+15
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 9346.4894882983, 9000, 9000
                    , 9000, 9000, 9000, 9000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9000, 9000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+9346.4894882983, sellCostBuyPrice =sellCostBuyPrice+9000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+9000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+9000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+9000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+9000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+9000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+9000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+9000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-07 10:19:36' WHERE storedetailid = '1530';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1505', '1', '15', '1', '110', 'اضافة فاتورة مبيعات', 'sellbillController.php', '30', '15', '2', '2026-10-07 10:19:36','0','0'); -- id=2561
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+12 where id = 349;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('580','01504', '110', '108', '1504', '12', '600', '7200', '0', '', '0', '2026-10-07 10:19:36', '1504', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','349-12,','1','1','0','0','600','7200','0','','0','0.00','0','0','0','0'); -- id=453
UPDATE sellbilldetail SET  lastbuyprice = 580.00 , meanbuyprice = 580.00, lastbuyprice_withDiscount = 580.00, meanbuyprice_withDiscount = 580.00
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 580
                where sellbilldetailid = 453;
 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 (1504, '2026-10-07', 7178.1039270131, 6960, 6960
                    , 6960, 6960, 6960, 6960
                    , 0, 0, 0, 0
                    , 0, 0, 0, 12, 0, 6960, 6960, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7178.1039270131, sellCostBuyPrice =sellCostBuyPrice+6960
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6960, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6960
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6960, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6960
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6960
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6960
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6960
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+12
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 7178.1039270131, 6960, 6960
                    , 6960, 6960, 6960, 6960
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6960, 6960, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7178.1039270131, sellCostBuyPrice =sellCostBuyPrice+6960
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6960, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6960
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6960, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6960
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6960
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6960
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6960
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '48', userid = '2', storedetaildate = '2026-10-07 10:19:36' WHERE storedetailid = '1529';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1504', '1', '12', '1', '110', 'اضافة فاتورة مبيعات', 'sellbillController.php', '60', '48', '2', '2026-10-07 10:19:36','0','0'); -- id=2562
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 340;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('530','01496', '110', '108', '1496', '6', '550', '3300', '0', '', '0', '2026-10-07 10:19:36', '1496', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','340-6,','1','1','0','0','550','3300','0','','0','0.00','0','0','0','0'); -- id=454
UPDATE sellbilldetail SET  lastbuyprice = 530.00 , meanbuyprice = 530.00, lastbuyprice_withDiscount = 530.00, meanbuyprice_withDiscount = 530.00
        , lastbuyprice_withTax = 530, meanbuyprice_withTax = 530, lastbuyprice_withDiscountAndTax = 530
                where sellbilldetailid = 454;
 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 (1496, '2026-10-07', 3289.964299881, 3180, 3180
                    , 3180, 3180, 3180, 3180
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 3180, 3180, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3289.964299881, sellCostBuyPrice =sellCostBuyPrice+3180
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3180, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3180
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3180, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3180
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3180
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3180
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3180
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3289.964299881, 3180, 3180
                    , 3180, 3180, 3180, 3180
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3180, 3180, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3289.964299881, sellCostBuyPrice =sellCostBuyPrice+3180
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3180, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3180
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3180, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3180
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3180
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3180
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3180
                        , returnSellVal = returnSellVal+0, 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 = '24', userid = '2', storedetaildate = '2026-10-07 10:19:36' WHERE storedetailid = '1521';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1496', '1', '6', '1', '110', 'اضافة فاتورة مبيعات', 'sellbillController.php', '30', '24', '2', '2026-10-07 10:19:36','0','0'); -- id=2563
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+12 where id = 333;
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 ('450','01463', '110', '103', '1463', '12', '470', '5640', '0', '', '0', '2026-10-07 10:19:36', '1463', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','333-12,','1','1','0','0','470','5640','0','','0','0.00','0','0','0','0'); -- id=455
UPDATE sellbilldetail SET  lastbuyprice = 450.00 , meanbuyprice = 450.00, lastbuyprice_withDiscount = 450.00, meanbuyprice_withDiscount = 450.00
        , lastbuyprice_withTax = 450, meanbuyprice_withTax = 450, lastbuyprice_withDiscountAndTax = 450
                where sellbilldetailid = 455;
 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 (1463, '2026-10-07', 5622.8480761603, 5400, 5400
                    , 5400, 5400, 5400, 5400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 12, 0, 5400, 5400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5622.8480761603, sellCostBuyPrice =sellCostBuyPrice+5400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+12
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 5622.8480761603, 5400, 5400
                    , 5400, 5400, 5400, 5400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5400, 5400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5622.8480761603, sellCostBuyPrice =sellCostBuyPrice+5400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5400
                        , returnSellVal = returnSellVal+0, 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 = '60', userid = '2', storedetaildate = '2026-10-07 10:19:36' WHERE storedetailid = '1488';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1463', '1', '12', '1', '110', 'اضافة فاتورة مبيعات', 'sellbillController.php', '72', '60', '2', '2026-10-07 10:19:36','0','0'); -- id=2564
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '381275',  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 ('343575','37700', '0', '2', 'اضافة فاتورة مبيعات', '110', '381275', '2026-10-07 10:19:36', '2',  'sellbillController.php','1','','0'); -- id=139
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '37815', '37815', '2026-10-07', '2', '0', '0', '2026-10-07 10:19:36','اضافة فاتورة مبيعات رقم 110','1','0',null,'0','110','sellbillController.php?do=showDetail&sellbillid=110'); -- id=1220
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1220', '419', '37700', '','0'); -- id=1226
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '381275', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1220', '398', '115', '','0'); -- id=1227
UPDATE accountstree SET name = 'خصم مسموح به', customName = 'خصم مسموح به', customNameEn = '', nameEn = '', parent = '158', accountNature = '0', theValue = '136173', theOrder = '0', layingOrder = '51', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-08-08 17:58:26' WHERE id = '398';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1220', '143', '37815', '','0'); -- id=1220
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1060815', 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 ( '36375', '36375', '2026-10-07', '2', '0', '0', '2026-10-07 10:19:36','اضافة فاتورة مبيعات رقم 110 - صرف البضاعة من المخزن','1','0',null,'0','110','sellbillController.php?do=showDetail&sellbillid=110'); -- id=1221
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1221', '402', '36375', '','0'); -- id=1228
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1029137.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1221', '382', '36375', '','0'); -- id=1221
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16910814.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1220,0,1221' where sellbillid=110;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 37700, 36375, 36375
                    , 36375, 36375, 36375, 36375
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,36375, 36375, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+37700, sellCostBuyPrice =sellCostBuyPrice+36375
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+36375, sellCostMeanBuyPrice = sellCostMeanBuyPrice+36375
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+36375, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+36375
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+36375
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+36375
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+36375
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 37700, 36375, 36375
                    , 36375, 36375, 36375, 36375
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,36375, 36375, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+37700, sellCostBuyPrice =sellCostBuyPrice+36375
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+36375, sellCostMeanBuyPrice = sellCostMeanBuyPrice+36375
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+36375, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+36375
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+36375
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+36375
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+36375
                        , returnSellVal = returnSellVal+0, 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, 37700, 36375, 36375
                    , 36375, 36375, 36375, 36375, 36375, 36375)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+37700, netSellCostBuyPrice = netSellCostBuyPrice+36375
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+36375
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+36375
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+36375
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+36375
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+36375
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+36375
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+36375;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac5f1aecd48c and sellbillId = 110 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:49:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:19:36", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:19:36', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3692
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:50:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:20:15", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:20:15', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3693

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac5f288ae82e
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 10:20:15', '06ac5f288ae82e', '1', '0.00', '0', '0', '1', '3300.00', '3300', '3300', '0', '1', '2026-10-07 10:20:15', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '6' ,'0','','','','','-1','0','0','0','0','0','3300','0','','0','0','3300','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=111
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','اضافة فاتورة مبيعات','111', '0', '2026-10-07 10:20:15', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '3300', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 10:20:15','0','0','',''); -- id=201
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 340;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('530','01496', '111', '108', '1496', '6', '550', '3300', '0', '', '0', '2026-10-07 10:20:15', '1496', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','340-6,','1','1','0','0','550','3300','0','','0','0.00','0','0','0','0'); -- id=456
UPDATE sellbilldetail SET  lastbuyprice = 530.00 , meanbuyprice = 530.00, lastbuyprice_withDiscount = 530.00, meanbuyprice_withDiscount = 530.00
        , lastbuyprice_withTax = 530, meanbuyprice_withTax = 530, lastbuyprice_withDiscountAndTax = 530
                where sellbilldetailid = 456;
 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 (1496, '2026-10-07', 3300, 3180, 3180
                    , 3180, 3180, 3180, 3180
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 3180, 3180, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3300, sellCostBuyPrice =sellCostBuyPrice+3180
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3180, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3180
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3180, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3180
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3180
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3180
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3180
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3300, 3180, 3180
                    , 3180, 3180, 3180, 3180
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3180, 3180, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3300, sellCostBuyPrice =sellCostBuyPrice+3180
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3180, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3180
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3180, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3180
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3180
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3180
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3180
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '18', userid = '2', storedetaildate = '2026-10-07 10:20:15' WHERE storedetailid = '1521';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1496', '1', '6', '1', '111', 'اضافة فاتورة مبيعات', 'sellbillController.php', '24', '18', '2', '2026-10-07 10:20:15','0','0'); -- id=2565
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '384575',  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 ('381275','3300', '0', '2', 'اضافة فاتورة مبيعات', '111', '384575', '2026-10-07 10:20:15', '2',  'sellbillController.php','1','','0'); -- id=140
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3300', '3300', '2026-10-07', '2', '0', '0', '2026-10-07 10:20:15','اضافة فاتورة مبيعات رقم 111','1','0',null,'0','111','sellbillController.php?do=showDetail&sellbillid=111'); -- id=1222
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1222', '419', '3300', '','0'); -- id=1229
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '384575', 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 ('1222', '143', '3300', '','0'); -- id=1222
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1064115', 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 ( '3180', '3180', '2026-10-07', '2', '0', '0', '2026-10-07 10:20:15','اضافة فاتورة مبيعات رقم 111 - صرف البضاعة من المخزن','1','0',null,'0','111','sellbillController.php?do=showDetail&sellbillid=111'); -- id=1223
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1223', '402', '3180', '','0'); -- id=1230
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1032317.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1223', '382', '3180', '','0'); -- id=1223
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16907634.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1222,0,1223' where sellbillid=111;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 3300, 3180, 3180
                    , 3180, 3180, 3180, 3180
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3180, 3180, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3300, sellCostBuyPrice =sellCostBuyPrice+3180
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3180, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3180
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3180, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3180
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3180
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3180
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3180
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3300, 3180, 3180
                    , 3180, 3180, 3180, 3180
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3180, 3180, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3300, sellCostBuyPrice =sellCostBuyPrice+3180
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3180, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3180
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3180, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3180
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3180
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3180
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3180
                        , returnSellVal = returnSellVal+0, 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, 3300, 3180, 3180
                    , 3180, 3180, 3180, 3180, 3180, 3180)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+3300, netSellCostBuyPrice = netSellCostBuyPrice+3180
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+3180
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+3180
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+3180
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+3180
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+3180
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+3180
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+3180;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac5f288ae82e and sellbillId = 111 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:50:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:20:15", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:20:15', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3694
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:50:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:20:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-07 10:20:39', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3695
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:51:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:21:27", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:21:27', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3696

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac5f2afe27ac
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 10:21:27', '06ac5f2afe27ac', '1', '0.00', '0', '0', '1', '11400.00', '11400', '11400', '0', '1', '2026-10-07 10:21:27', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '18' ,'0','','','','','-1','0','0','0','0','0','11400','0','','0','0','11400','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=112
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','اضافة فاتورة مبيعات','112', '0', '2026-10-07 10:21:27', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '11400', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 10:21:27','0','0','',''); -- id=202
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+12 where id = 350;
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 ('600','01505', '112', '108', '1505', '12', '625', '7500', '0', '', '0', '2026-10-07 10:21:27', '1505', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','350-12,','1','1','0','0','625','7500','0','','0','0.00','0','0','0','0'); -- id=457
UPDATE sellbilldetail SET  lastbuyprice = 600.00 , meanbuyprice = 600.00, lastbuyprice_withDiscount = 600.00, meanbuyprice_withDiscount = 600.00
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where sellbilldetailid = 457;
 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 (1505, '2026-10-07', 7500, 7200, 7200
                    , 7200, 7200, 7200, 7200
                    , 0, 0, 0, 0
                    , 0, 0, 0, 12, 0, 7200, 7200, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7500, sellCostBuyPrice =sellCostBuyPrice+7200
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7200, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7200
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7200, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7200
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7200
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7200
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7200
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+12
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 7500, 7200, 7200
                    , 7200, 7200, 7200, 7200
                    , 0, 0, 0, 0
                    , 0, 0, 0, 7200, 7200, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7500, sellCostBuyPrice =sellCostBuyPrice+7200
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7200, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7200
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7200, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7200
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7200
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7200
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7200
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '3', userid = '2', storedetaildate = '2026-10-07 10:21:27' WHERE storedetailid = '1530';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1505', '1', '12', '1', '112', 'اضافة فاتورة مبيعات', 'sellbillController.php', '15', '3', '2', '2026-10-07 10:21:27','0','0'); -- id=2566
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 339;
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 ('625','01495', '112', '108', '1495', '6', '650', '3900', '0', '', '0', '2026-10-07 10:21:27', '1495', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','339-6,','1','1','0','0','650','3900','0','','0','0.00','0','0','0','0'); -- id=458
UPDATE sellbilldetail SET  lastbuyprice = 625.00 , meanbuyprice = 625.00, lastbuyprice_withDiscount = 625.00, meanbuyprice_withDiscount = 625.00
        , lastbuyprice_withTax = 625, meanbuyprice_withTax = 625, lastbuyprice_withDiscountAndTax = 625
                where sellbilldetailid = 458;
 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 (1495, '2026-10-07', 3900, 3750, 3750
                    , 3750, 3750, 3750, 3750
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 3750, 3750, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3900, sellCostBuyPrice =sellCostBuyPrice+3750
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3750, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3750
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3750, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3750
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3750
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3750
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3750
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3900, 3750, 3750
                    , 3750, 3750, 3750, 3750
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3750, 3750, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3900, sellCostBuyPrice =sellCostBuyPrice+3750
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3750, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3750
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3750, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3750
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3750
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3750
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3750
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-07 10:21:27' WHERE storedetailid = '1520';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1495', '1', '6', '1', '112', 'اضافة فاتورة مبيعات', 'sellbillController.php', '21', '15', '2', '2026-10-07 10:21:27','0','0'); -- id=2567
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '395975',  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 ('384575','11400', '0', '2', 'اضافة فاتورة مبيعات', '112', '395975', '2026-10-07 10:21:27', '2',  'sellbillController.php','1','','0'); -- id=141
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '11400', '11400', '2026-10-07', '2', '0', '0', '2026-10-07 10:21:27','اضافة فاتورة مبيعات رقم 112','1','0',null,'0','112','sellbillController.php?do=showDetail&sellbillid=112'); -- id=1224
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1224', '419', '11400', '','0'); -- id=1231
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '395975', 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 ('1224', '143', '11400', '','0'); -- id=1224
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1075515', 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 ( '10950', '10950', '2026-10-07', '2', '0', '0', '2026-10-07 10:21:27','اضافة فاتورة مبيعات رقم 112 - صرف البضاعة من المخزن','1','0',null,'0','112','sellbillController.php?do=showDetail&sellbillid=112'); -- id=1225
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1225', '402', '10950', '','0'); -- id=1232
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1043267.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1225', '382', '10950', '','0'); -- id=1225
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '16896684.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1224,0,1225' where sellbillid=112;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 11400, 10950, 10950
                    , 10950, 10950, 10950, 10950
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,10950, 10950, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+11400, sellCostBuyPrice =sellCostBuyPrice+10950
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+10950, sellCostMeanBuyPrice = sellCostMeanBuyPrice+10950
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+10950, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+10950
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+10950
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+10950
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+10950
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 11400, 10950, 10950
                    , 10950, 10950, 10950, 10950
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,10950, 10950, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+11400, sellCostBuyPrice =sellCostBuyPrice+10950
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+10950, sellCostMeanBuyPrice = sellCostMeanBuyPrice+10950
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+10950, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+10950
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+10950
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+10950
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+10950
                        , returnSellVal = returnSellVal+0, 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, 11400, 10950, 10950
                    , 10950, 10950, 10950, 10950, 10950, 10950)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+11400, netSellCostBuyPrice = netSellCostBuyPrice+10950
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+10950
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+10950
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+10950
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+10950
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+10950
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+10950
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+10950;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac5f2afe27ac and sellbillId = 112 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:51:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:21:27", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:21:27', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3697
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:52:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:22:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 10:22:00', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3698
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('تصنيع احمد العربي', '', '', '', '', '0', '1', '2026-10-07 10:22:14', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=107
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('107', '0', '', '0', 'إضافة مورد جديد', '107', '', '2026-10-07 10:22:14', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=188
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('تصنيع احمد العربي', 'تصنيع احمد العربي', 'تصنيع احمد العربي', 'تصنيع احمد العربي', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-07 10:22:14'); -- id=590
UPDATE supplier SET suppliername = 'تصنيع احمد العربي', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-07', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='590',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '107';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:54:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:24:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 10:24:03', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3699
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac5f3185c8d0', '2026-10-07 10:22:00', '107', '0.00', '320940', '0', '0', '320940.00',  '320940.00', '0', '320940', '1', '2026-10-07 10:24:03', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=46
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01466', '46', '104', '1466', '504', '300', '151200.00', '0', '', '2026-10-07 10:24:03', '1466','','','0','0','0','0','0',null,'300','151200','0','0','0','0','0','0','0','0','1'); -- id=278
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 10:22:00', 1, 1466, 0, 0
                    , 300, 504, 0, 0, 1, '2026-10-07 10:24:03')
                ON DUPLICATE KEY UPDATE buyprice = 300,
                        buyQuantity =buyQuantity+504, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 10:24:03' ; -- id=354
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1466', '300', '504', '0', 'buyBillController.php', '278', '', '0', '0'); -- id=236
UPDATE product SET  productBuyPrice = "300" WHERE productId = 1466 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 278 ;
UPDATE product SET productName = 'هودي ساده تصنيع 370', productDescription = '', productCatId = '104', productBuyPrice = '300.00', productSellAllPrice = '370.00', productSellUnitPrice = '370.00', productSellHalfPrice = '370.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01466',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '300',lastbuyprice_withDiscount = '300',meanbuyprice = '300',meanbuyprice_withDiscount = '300' , productbuypricereal = '300.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '23.33' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='300',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='300',meanbuyprice_withTax='300',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='300',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1466';
UPDATE buybilldetail SET  lastbuyprice = 300 , meanbuyprice = 300, lastbuyprice_withDiscount = 300, meanbuyprice_withDiscount = 300
        , lastbuyprice_withTax = 300, meanbuyprice_withTax = 300, lastbuyprice_withDiscountAndTax = 300
                where buybilldetailid = 278;
UPDATE productunit SET proUnitBuyPrice  = 300 * productnumber WHERE productid = 1466;
UPDATE storedetail SET  productquantity = '504', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1491';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1466', '1', '504', '0', '46', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '504', '1', '2026-10-07 10:22:00','0','0'); -- id=2568
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01467', '46', '104', '1467', '208', '276', '57408.00', '0', '', '2026-10-07 10:24:03', '1467','','','0','0','0','0','0',null,'276','57408','0','0','0','0','0','0','0','0','1'); -- id=279
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 10:22:00', 1, 1467, 0, 0
                    , 276, 208, 0, 0, 1, '2026-10-07 10:24:03')
                ON DUPLICATE KEY UPDATE buyprice = 276,
                        buyQuantity =buyQuantity+208, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 10:24:03' ; -- id=355
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1467', '276', '208', '0', 'buyBillController.php', '279', '', '0', '0'); -- id=237
UPDATE product SET  productBuyPrice = "276" WHERE productId = 1467 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 279 ;
UPDATE product SET productName = 'بيزك تصنيع 340', productDescription = '', productCatId = '104', productBuyPrice = '276.00', productSellAllPrice = '340.00', productSellUnitPrice = '340.00', productSellHalfPrice = '340.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01467',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '276',lastbuyprice_withDiscount = '276',meanbuyprice = '276',meanbuyprice_withDiscount = '276' , productbuypricereal = '276.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '23.19' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='276',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='276',meanbuyprice_withTax='276',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='276',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1467';
UPDATE buybilldetail SET  lastbuyprice = 276 , meanbuyprice = 276, lastbuyprice_withDiscount = 276, meanbuyprice_withDiscount = 276
        , lastbuyprice_withTax = 276, meanbuyprice_withTax = 276, lastbuyprice_withDiscountAndTax = 276
                where buybilldetailid = 279;
UPDATE productunit SET proUnitBuyPrice  = 276 * productnumber WHERE productid = 1467;
UPDATE storedetail SET  productquantity = '208', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1492';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1467', '1', '208', '0', '46', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '208', '1', '2026-10-07 10:22:00','0','0'); -- id=2569
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01467', '46', '104', '1467', '203', '276', '56028.00', '0', '', '2026-10-07 10:24:03', '1467','','','0','0','0','0','0',null,'276','56028','0','0','0','0','0','0','0','0','1'); -- id=280
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 10:22:00', 1, 1467, 0, 0
                    , 276, 203, 0, 0, 1, '2026-10-07 10:24:03')
                ON DUPLICATE KEY UPDATE buyprice = 276,
                        buyQuantity =buyQuantity+203, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 10:24:03' ; -- id=355
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1467', '276', '203', '0', 'buyBillController.php', '280', '', '0', '0'); -- id=238
UPDATE product SET  productBuyPrice = "276" WHERE productId = 1467 ;
UPDATE buybilldetail SET  quantitybefore = 208 WHERE buybilldetailid = 280 ;
UPDATE product SET productName = 'بيزك تصنيع 340', productDescription = '', productCatId = '104', productBuyPrice = '276.00', productSellAllPrice = '340.00', productSellUnitPrice = '340.00', productSellHalfPrice = '340.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01467',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '276',lastbuyprice_withDiscount = '276',meanbuyprice = '276',meanbuyprice_withDiscount = '276' , productbuypricereal = '276.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '23.19' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='276',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='276',meanbuyprice_withTax='276',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='276',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1467';
UPDATE buybilldetail SET  lastbuyprice = 276 , meanbuyprice = 276, lastbuyprice_withDiscount = 276, meanbuyprice_withDiscount = 276
        , lastbuyprice_withTax = 276, meanbuyprice_withTax = 276, lastbuyprice_withDiscountAndTax = 276
                where buybilldetailid = 280;
UPDATE productunit SET proUnitBuyPrice  = 276 * productnumber WHERE productid = 1467;
UPDATE storedetail SET  productquantity = '411', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1492';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1467', '1', '203', '0', '46', 'اضافة فاتورة مشتريات', 'buyBillController.php', '208', '411', '1', '2026-10-07 10:22:00','0','0'); -- id=2570
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01467', '46', '104', '1467', '204', '276', '56304.00', '0', '', '2026-10-07 10:24:03', '1467','','','0','0','0','0','0',null,'276','56304','0','0','0','0','0','0','0','0','1'); -- id=281
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 10:22:00', 1, 1467, 0, 0
                    , 276, 204, 0, 0, 1, '2026-10-07 10:24:03')
                ON DUPLICATE KEY UPDATE buyprice = 276,
                        buyQuantity =buyQuantity+204, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 10:24:03' ; -- id=355
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1467', '276', '204', '0', 'buyBillController.php', '281', '', '0', '0'); -- id=239
UPDATE product SET  productBuyPrice = "276" WHERE productId = 1467 ;
UPDATE buybilldetail SET  quantitybefore = 411 WHERE buybilldetailid = 281 ;
UPDATE product SET productName = 'بيزك تصنيع 340', productDescription = '', productCatId = '104', productBuyPrice = '276.00', productSellAllPrice = '340.00', productSellUnitPrice = '340.00', productSellHalfPrice = '340.00', productDate = '2026-10-06', conditions = '0', userId = '1', limitamount = '0', parcode = '01467',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '276',lastbuyprice_withDiscount = '276',meanbuyprice = '276',meanbuyprice_withDiscount = '276' , productbuypricereal = '276.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '23.19' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='276',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='276',meanbuyprice_withTax='276',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='276',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1467';
UPDATE buybilldetail SET  lastbuyprice = 276 , meanbuyprice = 276, lastbuyprice_withDiscount = 276, meanbuyprice_withDiscount = 276
        , lastbuyprice_withTax = 276, meanbuyprice_withTax = 276, lastbuyprice_withDiscountAndTax = 276
                where buybilldetailid = 281;
UPDATE productunit SET proUnitBuyPrice  = 276 * productnumber WHERE productid = 1467;
UPDATE storedetail SET  productquantity = '615', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1492';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1467', '1', '204', '0', '46', 'اضافة فاتورة مشتريات', 'buyBillController.php', '411', '615', '1', '2026-10-07 10:22:00','0','0'); -- id=2571
UPDATE supplier SET  suppliercurrentDebt = '320940',suppliercurrentDebtInCurrency= '320940' , userid = '1', supplierdate = '2026-10-07 10:24:03'   WHERE supplierid = '107';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('107', '0.00', '320940', '0', 'اضافة فاتورة مشتريات', '46', '320940', '2026-10-07 10:22:00', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','320940','1','0','320940','320940','0',''); -- id=189
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '320940', '320940', '2026-10-07', '1', '0', '0', '2026-10-07 10:24:03','اضافة فاتورة مشتريات رقم 46','1','0',null,'0','46','buyBillController.php?do=details&id=46'); -- id=1226
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1226', '382', '320940', '','0'); -- id=1233
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17217624.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1226', '590', '320940', '','0'); -- id=1226
UPDATE accountstree SET name = 'تصنيع احمد العربي', customName = 'تصنيع احمد العربي', customNameEn = 'تصنيع احمد العربي', nameEn = 'تصنيع احمد العربي', parent = '81', accountNature = '1', theValue = '320940', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 10:22:14' WHERE id = '590';
update buybill set dailyentryid='1226,0' where buybillid=46;
COMMIT;
UPDATE product SET overAllAveragePrice = 300 WHERE productId = 1466;UPDATE product SET overAllAveragePrice = 276 WHERE productId = 1467;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:54:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:24:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 10:24:03', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=46'); -- id=3700
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:59:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:29:36", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:29:36', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3701

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac5f2f7ba4d6
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 10:29:36', '06ac5f2f7ba4d6', '1', '0.00', '0', '0', '1', '3975.00', '3975', '3975', '0', '1', '2026-10-07 10:29:36', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '6' ,'0','','','','','-1','0','0','0','0','0','3975','0','','0','0','3975','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=113
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','اضافة فاتورة مبيعات','113', '0', '2026-10-07 10:29:36', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '3975', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 10:29:36','0','0','',''); -- id=203
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 339;
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 ('625','01495', '113', '108', '1495', '3', '650', '1950', '0', '', '0', '2026-10-07 10:29:36', '1495', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','339-3,','1','1','0','0','650','1950','0','','0','0.00','0','0','0','0'); -- id=459
UPDATE sellbilldetail SET  lastbuyprice = 625.00 , meanbuyprice = 625.00, lastbuyprice_withDiscount = 625.00, meanbuyprice_withDiscount = 625.00
        , lastbuyprice_withTax = 625, meanbuyprice_withTax = 625, lastbuyprice_withDiscountAndTax = 625
                where sellbilldetailid = 459;
 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 (1495, '2026-10-07', 1950, 1875, 1875
                    , 1875, 1875, 1875, 1875
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1875, 1875, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1950, sellCostBuyPrice =sellCostBuyPrice+1875
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1875, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1875
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1875, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1875
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1875
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1875
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1875
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 1950, 1875, 1875
                    , 1875, 1875, 1875, 1875
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1875, 1875, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1950, sellCostBuyPrice =sellCostBuyPrice+1875
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1875, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1875
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1875, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1875
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1875
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1875
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1875
                        , returnSellVal = returnSellVal+0, 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 = '12', userid = '2', storedetaildate = '2026-10-07 10:29:36' WHERE storedetailid = '1520';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1495', '1', '3', '1', '113', 'اضافة فاتورة مبيعات', 'sellbillController.php', '15', '12', '2', '2026-10-07 10:29:36','0','0'); -- id=2572
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 353;
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 ('650','01507', '113', '108', '1507', '3', '675', '2025', '0', '', '0', '2026-10-07 10:29:36', '1507', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','353-3,','1','1','0','0','675','2025','0','','0','0.00','0','0','0','0'); -- id=460
UPDATE sellbilldetail SET  lastbuyprice = 650.00 , meanbuyprice = 650.00, lastbuyprice_withDiscount = 650.00, meanbuyprice_withDiscount = 650.00
        , lastbuyprice_withTax = 650, meanbuyprice_withTax = 650, lastbuyprice_withDiscountAndTax = 650
                where sellbilldetailid = 460;
 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 (1507, '2026-10-07', 2025, 1950, 1950
                    , 1950, 1950, 1950, 1950
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1950, 1950, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2025, sellCostBuyPrice =sellCostBuyPrice+1950
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1950, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1950
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1950, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1950
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1950
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1950
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1950
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2025, 1950, 1950
                    , 1950, 1950, 1950, 1950
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1950, 1950, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2025, sellCostBuyPrice =sellCostBuyPrice+1950
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1950, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1950
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1950, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1950
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1950
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1950
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1950
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '27', userid = '2', storedetaildate = '2026-10-07 10:29:36' WHERE storedetailid = '1532';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1507', '1', '3', '1', '113', 'اضافة فاتورة مبيعات', 'sellbillController.php', '30', '27', '2', '2026-10-07 10:29:36','0','0'); -- id=2573
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '399950',  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 ('395975','3975', '0', '2', 'اضافة فاتورة مبيعات', '113', '399950', '2026-10-07 10:29:36', '2',  'sellbillController.php','1','','0'); -- id=142
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3975', '3975', '2026-10-07', '2', '0', '0', '2026-10-07 10:29:36','اضافة فاتورة مبيعات رقم 113','1','0',null,'0','113','sellbillController.php?do=showDetail&sellbillid=113'); -- id=1227
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1227', '419', '3975', '','0'); -- id=1234
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '399950', 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 ('1227', '143', '3975', '','0'); -- id=1227
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1079490', 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 ( '3825', '3825', '2026-10-07', '2', '0', '0', '2026-10-07 10:29:36','اضافة فاتورة مبيعات رقم 113 - صرف البضاعة من المخزن','1','0',null,'0','113','sellbillController.php?do=showDetail&sellbillid=113'); -- id=1228
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1228', '402', '3825', '','0'); -- id=1235
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1047092.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1228', '382', '3825', '','0'); -- id=1228
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17213799.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1227,0,1228' where sellbillid=113;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 3975, 3825, 3825
                    , 3825, 3825, 3825, 3825
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3825, 3825, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3975, sellCostBuyPrice =sellCostBuyPrice+3825
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3825, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3825
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3825, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3825
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3825
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3825
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3825
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3975, 3825, 3825
                    , 3825, 3825, 3825, 3825
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3825, 3825, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3975, sellCostBuyPrice =sellCostBuyPrice+3825
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3825, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3825
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3825, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3825
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3825
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3825
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3825
                        , returnSellVal = returnSellVal+0, 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, 3975, 3825, 3825
                    , 3825, 3825, 3825, 3825, 3825, 3825)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+3975, netSellCostBuyPrice = netSellCostBuyPrice+3825
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+3825
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+3825
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+3825
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+3825
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+3825
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+3825
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+3825;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac5f2f7ba4d6 and sellbillId = 113 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:59:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:29:36", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:29:36', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3702
update user set blockedByLimits = 0;
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:20:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:50:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 10:50:13', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3703
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:20:13";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 10:50:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 10:50:13', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3704
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:20:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:50:15", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:50:15', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3705
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:23:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:53:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:53:13', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3706

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac5f9b78ccb5
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 10:53:13', '06ac5f9b78ccb5', '1', '0.00', '0', '0', '1', '2040.00', '2040', '2040', '0', '1', '2026-10-07 10:53:13', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '6' ,'0','','','','','-1','0','0','0','0','0','2040','0','','0','0','2040','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=114
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','اضافة فاتورة مبيعات','114', '0', '2026-10-07 10:53:13', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '2040', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 10:53:13','0','0','',''); -- id=204
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 215;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('310','01434', '114', '100', '1434', '6', '340', '2040', '0', '', '0', '2026-10-07 10:53:13', '1434', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','215-6,','1','1','0','0','340','2040','0','','0','0.00','0','0','0','0'); -- id=461
UPDATE sellbilldetail SET  lastbuyprice = 310.00 , meanbuyprice = 310.00, lastbuyprice_withDiscount = 310.00, meanbuyprice_withDiscount = 310.00
        , lastbuyprice_withTax = 310, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 310
                where sellbilldetailid = 461;
 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 (1434, '2026-10-07', 2040, 1860, 1860
                    , 1860, 1860, 1860, 1860
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 1860, 1860, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2040, sellCostBuyPrice =sellCostBuyPrice+1860
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1860, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1860
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1860, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1860
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1860
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1860
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1860
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2040, 1860, 1860
                    , 1860, 1860, 1860, 1860
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1860, 1860, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2040, sellCostBuyPrice =sellCostBuyPrice+1860
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1860, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1860
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1860, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1860
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1860
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1860
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1860
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '39', userid = '2', storedetaildate = '2026-10-07 10:53:13' WHERE storedetailid = '1447';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1434', '1', '6', '1', '114', 'اضافة فاتورة مبيعات', 'sellbillController.php', '45', '39', '2', '2026-10-07 10:53:13','0','0'); -- id=2574
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '401990',  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 ('399950','2040', '0', '2', 'اضافة فاتورة مبيعات', '114', '401990', '2026-10-07 10:53:13', '2',  'sellbillController.php','1','','0'); -- id=143
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2040', '2040', '2026-10-07', '2', '0', '0', '2026-10-07 10:53:13','اضافة فاتورة مبيعات رقم 114','1','0',null,'0','114','sellbillController.php?do=showDetail&sellbillid=114'); -- id=1229
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1229', '419', '2040', '','0'); -- id=1236
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '401990', 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 ('1229', '143', '2040', '','0'); -- id=1229
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1081530', 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 ( '1860', '1860', '2026-10-07', '2', '0', '0', '2026-10-07 10:53:13','اضافة فاتورة مبيعات رقم 114 - صرف البضاعة من المخزن','1','0',null,'0','114','sellbillController.php?do=showDetail&sellbillid=114'); -- id=1230
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1230', '402', '1860', '','0'); -- id=1237
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1048952.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1230', '382', '1860', '','0'); -- id=1230
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17211939.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1229,0,1230' where sellbillid=114;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 2040, 1860, 1860
                    , 1860, 1860, 1860, 1860
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1860, 1860, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2040, sellCostBuyPrice =sellCostBuyPrice+1860
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1860, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1860
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1860, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1860
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1860
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1860
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1860
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2040, 1860, 1860
                    , 1860, 1860, 1860, 1860
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1860, 1860, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2040, sellCostBuyPrice =sellCostBuyPrice+1860
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1860, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1860
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1860, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1860
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1860
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1860
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1860
                        , returnSellVal = returnSellVal+0, 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, 2040, 1860, 1860
                    , 1860, 1860, 1860, 1860, 1860, 1860)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+2040, netSellCostBuyPrice = netSellCostBuyPrice+1860
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+1860
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+1860
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+1860
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+1860
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+1860
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+1860
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+1860;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac5f9b78ccb5 and sellbillId = 114 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:23:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 10:53:14", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 10:53:14', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3707
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:40:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:10:57", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 11:10:57', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3708
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:41:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:11:02", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 11:11:02', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3709
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:41:42";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:41:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:11:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 11:11:45', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3710
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:41:45";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 11:11:45', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3711
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:41:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:11:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 11:11:53', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3712
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:42:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:12:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 11:12:12', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3713
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:42:12";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 11:12:12', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3714
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:43:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:13:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 11:13:40', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3715
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:43:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:13:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 11:13:48', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3716
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:44:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:14:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 11:14:28', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3717
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:45:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:15:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 11:15:18', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3718
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('بنطلون جينز العقرب','','11','485','500','500','500','2026-10-07','0','1','0','','0','0','0','0','0','485','485','485','485','485','0','3.09','0','0','.','0','0','0','485','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','485','485','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','485','0','0','0','0','0','0','','','0','0','0','0'); -- id=1549
UPDATE product SET productName = 'بنطلون جينز العقرب', productDescription = '', productCatId = '11', productBuyPrice = '485', productSellAllPrice = '500', productSellUnitPrice = '500', productSellHalfPrice = '500', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01549',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '485',lastbuyprice_withDiscount = '485',meanbuyprice = '485',meanbuyprice_withDiscount = '485' , productbuypricereal = '485' , buypricereal_precentage = '0' , buytotal_precentage = '3.09' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='485',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='485',meanbuyprice_withTax='485',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='485',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1549';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1549', '1', '2026-10-07', '1', '0','0154901','500','500','500','485','','0','0','0','0','0','0','0','0','0','0'); -- id=1549
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1549', '1', '0', '1', '2026-10-07'); -- id=1574
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1549', '1', '0', '0', '1549', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2575
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1549, 1,'2026-10-07 11:15:18',1)
                ON DUPLICATE KEY UPDATE productid = 1549, edited = 1, sysdate = '2026-10-07 11:15:18', userid = 1; -- id=2361
UPDATE product SET productName = 'بنطلون جينز العقرب', productDescription = '', productCatId = '11', productBuyPrice = '485.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01549',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '485',lastbuyprice_withDiscount = '485',meanbuyprice = '485',meanbuyprice_withDiscount = '485' , productbuypricereal = '485' , buypricereal_precentage = '0' , buytotal_precentage = '3.09' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='485',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='485',meanbuyprice_withTax='485',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='485',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1549';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:45:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:15:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 11:15:20', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3719
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:45:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:15:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 11:15:23', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3720
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:45:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:15:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 11:15:52', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3721
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac5ff9b3c55a', '2026-10-07 11:15:23', '77', '209600.00', '224150', '0', '0', '14550.00',  '14550.00', '0', '14550', '1', '2026-10-07 11:15:52', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=47
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01549', '47', '11', '1549', '30', '485', '14550.00', '0', '', '2026-10-07 11:15:52', '1549','','','0','0','0','0','0',null,'485','14550','0','0','0','0','0','0','0','0','1'); -- id=282
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 11:15:23', 1, 1549, 0, 0
                    , 485, 30, 0, 0, 1, '2026-10-07 11:15:52')
                ON DUPLICATE KEY UPDATE buyprice = 485,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 11:15:52' ; -- id=358
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1549', '485', '30', '0', 'buyBillController.php', '282', '', '0', '0'); -- id=240
UPDATE product SET  productBuyPrice = "485" WHERE productId = 1549 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 282 ;
UPDATE product SET productName = 'بنطلون جينز العقرب', productDescription = '', productCatId = '11', productBuyPrice = '485.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01549',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '485',lastbuyprice_withDiscount = '485',meanbuyprice = '485',meanbuyprice_withDiscount = '485' , productbuypricereal = '485.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.09' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='485',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='485',meanbuyprice_withTax='485',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='485',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1549';
UPDATE buybilldetail SET  lastbuyprice = 485 , meanbuyprice = 485, lastbuyprice_withDiscount = 485, meanbuyprice_withDiscount = 485
        , lastbuyprice_withTax = 485, meanbuyprice_withTax = 485, lastbuyprice_withDiscountAndTax = 485
                where buybilldetailid = 282;
UPDATE productunit SET proUnitBuyPrice  = 485 * productnumber WHERE productid = 1549;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1574';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1549', '1', '30', '0', '47', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 11:15:23','0','0'); -- id=2576
UPDATE supplier SET  suppliercurrentDebt = '224150',suppliercurrentDebtInCurrency= '224150' , userid = '1', supplierdate = '2026-10-07 11:15:52'   WHERE supplierid = '77';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('77', '209600.00', '14550', '0', 'اضافة فاتورة مشتريات', '47', '224150', '2026-10-07 11:15:23', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','14550','1','209600','14550','224150','0',''); -- id=190
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '14550', '14550', '2026-10-07', '1', '0', '0', '2026-10-07 11:15:52','اضافة فاتورة مشتريات رقم 47','1','0',null,'0','47','buyBillController.php?do=details&id=47'); -- id=1231
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1231', '382', '14550', '','0'); -- id=1238
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17226489.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1231', '503', '14550', '','0'); -- id=1231
UPDATE accountstree SET name = 'العقرب جينز', customName = 'العقرب جينز', customNameEn = 'العقرب جينز', nameEn = 'العقرب جينز', parent = '81', accountNature = '1', theValue = '224150', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-01 17:30:16' WHERE id = '503';
update buybill set dailyentryid='1231,0' where buybillid=47;
COMMIT;
UPDATE product SET overAllAveragePrice = 485 WHERE productId = 1549;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:45:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:15:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 11:15:52', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=47'); -- id=3722
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:47:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:17:58", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 11:17:58', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3723
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:48:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:18:11", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 11:18:11', '2', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=110'); -- id=3724
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:48:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:18:31", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 11:18:31', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3725
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 07:53:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:23:59", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 11:23:59', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3726

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac600578aac8
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 11:23:59', '06ac600578aac8', '1', '0.00', '0', '0', '1', '4200.00', '4200', '4200', '0', '1', '2026-10-07 11:23:59', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '6' ,'0','','','','','-1','0','0','0','0','0','4200','0','','0','0','4200','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=115
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','اضافة فاتورة مبيعات','115', '0', '2026-10-07 11:23:59', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '4200', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 11:23:59','0','0','',''); -- id=205
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 336;
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 ('675','01491', '115', '108', '1491', '6', '700', '4200', '0', '', '0', '2026-10-07 11:23:59', '1491', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','336-6,','1','1','0','0','700','4200','0','','0','0.00','0','0','0','0'); -- id=462
UPDATE sellbilldetail SET  lastbuyprice = 675.00 , meanbuyprice = 675.00, lastbuyprice_withDiscount = 675.00, meanbuyprice_withDiscount = 675.00
        , lastbuyprice_withTax = 675, meanbuyprice_withTax = 675, lastbuyprice_withDiscountAndTax = 675
                where sellbilldetailid = 462;
 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 (1491, '2026-10-07', 4200, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4200, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 4200, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4200, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-07 11:23:59' WHERE storedetailid = '1516';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1491', '1', '6', '1', '115', 'اضافة فاتورة مبيعات', 'sellbillController.php', '21', '15', '2', '2026-10-07 11:23:59','0','0'); -- id=2577
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '406190',  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 ('401990','4200', '0', '2', 'اضافة فاتورة مبيعات', '115', '406190', '2026-10-07 11:23:59', '2',  'sellbillController.php','1','','0'); -- id=144
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '4200', '4200', '2026-10-07', '2', '0', '0', '2026-10-07 11:23:59','اضافة فاتورة مبيعات رقم 115','1','0',null,'0','115','sellbillController.php?do=showDetail&sellbillid=115'); -- id=1232
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1232', '419', '4200', '','0'); -- id=1239
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '406190', 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 ('1232', '143', '4200', '','0'); -- id=1232
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1085730', 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 ( '4050', '4050', '2026-10-07', '2', '0', '0', '2026-10-07 11:23:59','اضافة فاتورة مبيعات رقم 115 - صرف البضاعة من المخزن','1','0',null,'0','115','sellbillController.php?do=showDetail&sellbillid=115'); -- id=1233
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1233', '402', '4050', '','0'); -- id=1240
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1053002.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1233', '382', '4050', '','0'); -- id=1233
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17222439.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1232,0,1233' where sellbillid=115;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 4200, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4200, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 4200, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4200, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 4200, 4050, 4050
                    , 4050, 4050, 4050, 4050, 4050, 4050)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+4200, netSellCostBuyPrice = netSellCostBuyPrice+4050
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+4050
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+4050
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+4050
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+4050
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+4050
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+4050
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+4050;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac600578aac8 and sellbillId = 115 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

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

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac5f4e0c8a12
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 11:38:07', '06ac5f4e0c8a12', '1', '0.00', '0', '0', '1', '87540.00', '87540', '87540', '0', '1', '2026-10-07 11:38:07', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '162' ,'0','','','','','-1','0','0','0','0','0','87540','0','','0','0','87540','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=116
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','اضافة فاتورة مبيعات','116', '0', '2026-10-07 11:38:07', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '87540', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 11:38:07','0','0','',''); -- id=206
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+15 where id = 333;
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 ('450','01463', '116', '103', '1463', '15', '470', '7050', '0', '', '0', '2026-10-07 11:38:07', '1463', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','333-15,','1','1','0','0','470','7050','0','','0','0.00','0','0','0','0'); -- id=463
UPDATE sellbilldetail SET  lastbuyprice = 450.00 , meanbuyprice = 450.00, lastbuyprice_withDiscount = 450.00, meanbuyprice_withDiscount = 450.00
        , lastbuyprice_withTax = 450, meanbuyprice_withTax = 450, lastbuyprice_withDiscountAndTax = 450
                where sellbilldetailid = 463;
 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 (1463, '2026-10-07', 7050, 6750, 6750
                    , 6750, 6750, 6750, 6750
                    , 0, 0, 0, 0
                    , 0, 0, 0, 15, 0, 6750, 6750, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7050, sellCostBuyPrice =sellCostBuyPrice+6750
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6750, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6750
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6750, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6750
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6750
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6750
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6750
                        , returnSellVal = returnSellVal+0, 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+15
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 7050, 6750, 6750
                    , 6750, 6750, 6750, 6750
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6750, 6750, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7050, sellCostBuyPrice =sellCostBuyPrice+6750
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6750, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6750
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6750, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6750
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6750
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6750
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6750
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '45', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1488';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1463', '1', '15', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '60', '45', '2', '2026-10-07 11:38:07','0','0'); -- id=2578
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+18 where id = 332;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('410','01462', '116', '103', '1462', '18', '430', '7740', '0', '', '0', '2026-10-07 11:38:07', '1462', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','332-18,','1','1','0','0','430','7740','0','','0','0.00','0','0','0','0'); -- id=464
UPDATE sellbilldetail SET  lastbuyprice = 410.00 , meanbuyprice = 410.00, lastbuyprice_withDiscount = 410.00, meanbuyprice_withDiscount = 410.00
        , lastbuyprice_withTax = 410, meanbuyprice_withTax = 410, lastbuyprice_withDiscountAndTax = 410
                where sellbilldetailid = 464;
 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 (1462, '2026-10-07', 7740, 7380, 7380
                    , 7380, 7380, 7380, 7380
                    , 0, 0, 0, 0
                    , 0, 0, 0, 18, 0, 7380, 7380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7740, sellCostBuyPrice =sellCostBuyPrice+7380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7380, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7380
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+18
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 7740, 7380, 7380
                    , 7380, 7380, 7380, 7380
                    , 0, 0, 0, 0
                    , 0, 0, 0, 7380, 7380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7740, sellCostBuyPrice =sellCostBuyPrice+7380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7380, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7380
                        , returnSellVal = returnSellVal+0, 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 = '306', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1487';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1462', '1', '18', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '324', '306', '2', '2026-10-07 11:38:07','0','0'); -- id=2579
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+15 where id = 327;
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','01457', '116', '103', '1457', '15', '450', '6750', '0', '', '0', '2026-10-07 11:38:07', '1457', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','327-15,','1','1','0','0','450','6750','0','','0','0.00','0','0','0','0'); -- id=465
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 = 465;
 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 (1457, '2026-10-07', 6750, 6450, 6450
                    , 6450, 6450, 6450, 6450
                    , 0, 0, 0, 0
                    , 0, 0, 0, 15, 0, 6450, 6450, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6750, sellCostBuyPrice =sellCostBuyPrice+6450
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6450, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6450
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6450, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6450
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6450
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6450
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6450
                        , returnSellVal = returnSellVal+0, 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+15
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 6750, 6450, 6450
                    , 6450, 6450, 6450, 6450
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6450, 6450, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6750, sellCostBuyPrice =sellCostBuyPrice+6450
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6450, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6450
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6450, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6450
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6450
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6450
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6450
                        , returnSellVal = returnSellVal+0, 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 = '21', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1482';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1457', '1', '15', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '36', '21', '2', '2026-10-07 11:38:07','0','0'); -- id=2580
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+18 where id = 347;
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 ('675','01502', '116', '108', '1502', '18', '700', '12600', '0', '', '0', '2026-10-07 11:38:07', '1502', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','347-18,','1','1','0','0','700','12600','0','','0','0.00','0','0','0','0'); -- id=466
UPDATE sellbilldetail SET  lastbuyprice = 675.00 , meanbuyprice = 675.00, lastbuyprice_withDiscount = 675.00, meanbuyprice_withDiscount = 675.00
        , lastbuyprice_withTax = 675, meanbuyprice_withTax = 675, lastbuyprice_withDiscountAndTax = 675
                where sellbilldetailid = 466;
 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 (1502, '2026-10-07', 12600, 12150, 12150
                    , 12150, 12150, 12150, 12150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 18, 0, 12150, 12150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+12600, sellCostBuyPrice =sellCostBuyPrice+12150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+12150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+12150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+12150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+12150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+12150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+12150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+12150
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+18
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 12600, 12150, 12150
                    , 12150, 12150, 12150, 12150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 12150, 12150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+12600, sellCostBuyPrice =sellCostBuyPrice+12150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+12150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+12150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+12150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+12150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+12150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+12150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+12150
                        , returnSellVal = returnSellVal+0, 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 = '12', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1527';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1502', '1', '18', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '30', '12', '2', '2026-10-07 11:38:07','0','0'); -- id=2581
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 353;
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 ('650','01507', '116', '108', '1507', '9', '675', '6075', '0', '', '0', '2026-10-07 11:38:07', '1507', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','353-9,','1','1','0','0','675','6075','0','','0','0.00','0','0','0','0'); -- id=467
UPDATE sellbilldetail SET  lastbuyprice = 650.00 , meanbuyprice = 650.00, lastbuyprice_withDiscount = 650.00, meanbuyprice_withDiscount = 650.00
        , lastbuyprice_withTax = 650, meanbuyprice_withTax = 650, lastbuyprice_withDiscountAndTax = 650
                where sellbilldetailid = 467;
 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 (1507, '2026-10-07', 6075, 5850, 5850
                    , 5850, 5850, 5850, 5850
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 5850, 5850, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6075, sellCostBuyPrice =sellCostBuyPrice+5850
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5850, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5850
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5850, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5850
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5850
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5850
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5850
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+9
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 6075, 5850, 5850
                    , 5850, 5850, 5850, 5850
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5850, 5850, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6075, sellCostBuyPrice =sellCostBuyPrice+5850
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5850, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5850
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5850, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5850
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5850
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5850
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5850
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '18', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1532';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1507', '1', '9', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '27', '18', '2', '2026-10-07 11:38:07','0','0'); -- id=2582
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+15 where id = 72;
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','01380', '116', '94', '1380', '15', '390', '5850', '0', '', '0', '2026-10-07 11:38:07', '1380', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','72-15,','1','1','0','0','390','5850','0','','0','0.00','0','0','0','0'); -- id=468
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 = 468;
 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 (1380, '2026-10-07', 5850, 5250, 5250
                    , 5250, 5250, 5250, 5250
                    , 0, 0, 0, 0
                    , 0, 0, 0, 15, 0, 5250, 5250, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5850, sellCostBuyPrice =sellCostBuyPrice+5250
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5250, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5250
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5250, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5250
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5250
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5250
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5250
                        , returnSellVal = returnSellVal+0, 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+15
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 5850, 5250, 5250
                    , 5250, 5250, 5250, 5250
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5250, 5250, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5850, sellCostBuyPrice =sellCostBuyPrice+5250
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5250, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5250
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5250, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5250
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5250
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5250
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5250
                        , returnSellVal = returnSellVal+0, 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 = '735', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1380';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1380', '1', '15', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '750', '735', '2', '2026-10-07 11:38:07','0','0'); -- id=2583
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+15 where id = 74;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('360','01382', '116', '94', '1382', '15', '400', '6000', '0', '', '0', '2026-10-07 11:38:07', '1382', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','74-15,','1','1','0','0','400','6000','0','','0','0.00','0','0','0','0'); -- id=469
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 = 469;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1382, '2026-10-07', 6000, 5400, 5400
                    , 5400, 5400, 5400, 5400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 15, 0, 5400, 5400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6000, sellCostBuyPrice =sellCostBuyPrice+5400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5400
                        , returnSellVal = returnSellVal+0, 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+15
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 6000, 5400, 5400
                    , 5400, 5400, 5400, 5400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5400, 5400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6000, sellCostBuyPrice =sellCostBuyPrice+5400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5400
                        , returnSellVal = returnSellVal+0, 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 = '237', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1382';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1382', '1', '15', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '252', '237', '2', '2026-10-07 11:38:07','0','0'); -- id=2584
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 349;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('580','01504', '116', '108', '1504', '9', '600', '5400', '0', '', '0', '2026-10-07 11:38:07', '1504', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','349-9,','1','1','0','0','600','5400','0','','0','0.00','0','0','0','0'); -- id=470
UPDATE sellbilldetail SET  lastbuyprice = 580.00 , meanbuyprice = 580.00, lastbuyprice_withDiscount = 580.00, meanbuyprice_withDiscount = 580.00
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 580
                where sellbilldetailid = 470;
 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 (1504, '2026-10-07', 5400, 5220, 5220
                    , 5220, 5220, 5220, 5220
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 5220, 5220, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5400, sellCostBuyPrice =sellCostBuyPrice+5220
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5220, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5220
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5220, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5220
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5220
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5220
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5220
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+9
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 5400, 5220, 5220
                    , 5220, 5220, 5220, 5220
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5220, 5220, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5400, sellCostBuyPrice =sellCostBuyPrice+5220
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5220, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5220
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5220, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5220
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5220
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5220
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5220
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '39', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1529';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1504', '1', '9', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '48', '39', '2', '2026-10-07 11:38:07','0','0'); -- id=2585
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 350;
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 ('600','01505', '116', '108', '1505', '3', '625', '1875', '0', '', '0', '2026-10-07 11:38:07', '1505', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','350-3,','1','1','0','0','625','1875','0','','0','0.00','0','0','0','0'); -- id=471
UPDATE sellbilldetail SET  lastbuyprice = 600.00 , meanbuyprice = 600.00, lastbuyprice_withDiscount = 600.00, meanbuyprice_withDiscount = 600.00
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where sellbilldetailid = 471;
 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 (1505, '2026-10-07', 1875, 1800, 1800
                    , 1800, 1800, 1800, 1800
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1800, 1800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1875, 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+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 1875, 1800, 1800
                    , 1800, 1800, 1800, 1800
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1800, 1800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1875, 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 = '0', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1530';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1505', '1', '3', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '3', '0', '2', '2026-10-07 11:38:07','0','0'); -- id=2586
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 337;
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 ('600','01492', '116', '108', '1492', '6', '625', '3750', '0', '', '0', '2026-10-07 11:38:07', '1492', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','337-6,','1','1','0','0','625','3750','0','','0','0.00','0','0','0','0'); -- id=472
UPDATE sellbilldetail SET  lastbuyprice = 600.00 , meanbuyprice = 600.00, lastbuyprice_withDiscount = 600.00, meanbuyprice_withDiscount = 600.00
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where sellbilldetailid = 472;
 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 (1492, '2026-10-07', 3750, 3600, 3600
                    , 3600, 3600, 3600, 3600
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 3600, 3600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3750, sellCostBuyPrice =sellCostBuyPrice+3600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3600, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3600
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3600
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3600
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3750, 3600, 3600
                    , 3600, 3600, 3600, 3600
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3600, 3600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3750, sellCostBuyPrice =sellCostBuyPrice+3600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3600, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3600
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3600
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3600
                        , returnSellVal = returnSellVal+0, 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 = '24', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1517';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1492', '1', '6', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '30', '24', '2', '2026-10-07 11:38:07','0','0'); -- id=2587
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+12 where id = 339;
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 ('625','01495', '116', '108', '1495', '12', '650', '7800', '0', '', '0', '2026-10-07 11:38:07', '1495', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','339-12,','1','1','0','0','650','7800','0','','0','0.00','0','0','0','0'); -- id=473
UPDATE sellbilldetail SET  lastbuyprice = 625.00 , meanbuyprice = 625.00, lastbuyprice_withDiscount = 625.00, meanbuyprice_withDiscount = 625.00
        , lastbuyprice_withTax = 625, meanbuyprice_withTax = 625, lastbuyprice_withDiscountAndTax = 625
                where sellbilldetailid = 473;
 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 (1495, '2026-10-07', 7800, 7500, 7500
                    , 7500, 7500, 7500, 7500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 12, 0, 7500, 7500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7800, sellCostBuyPrice =sellCostBuyPrice+7500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7500
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+12
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 7800, 7500, 7500
                    , 7500, 7500, 7500, 7500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 7500, 7500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7800, sellCostBuyPrice =sellCostBuyPrice+7500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7500
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1520';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1495', '1', '12', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '12', '0', '2', '2026-10-07 11:38:07','0','0'); -- id=2588
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 340;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('530','01496', '116', '108', '1496', '3', '550', '1650', '0', '', '0', '2026-10-07 11:38:07', '1496', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','340-3,','1','1','0','0','550','1650','0','','0','0.00','0','0','0','0'); -- id=474
UPDATE sellbilldetail SET  lastbuyprice = 530.00 , meanbuyprice = 530.00, lastbuyprice_withDiscount = 530.00, meanbuyprice_withDiscount = 530.00
        , lastbuyprice_withTax = 530, meanbuyprice_withTax = 530, lastbuyprice_withDiscountAndTax = 530
                where sellbilldetailid = 474;
 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 (1496, '2026-10-07', 1650, 1590, 1590
                    , 1590, 1590, 1590, 1590
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1590, 1590, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1650, sellCostBuyPrice =sellCostBuyPrice+1590
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1590, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1590
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1590, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1590
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1590
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1590
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1590
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 1650, 1590, 1590
                    , 1590, 1590, 1590, 1590
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1590, 1590, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1650, sellCostBuyPrice =sellCostBuyPrice+1590
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1590, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1590
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1590, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1590
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1590
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1590
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1590
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1521';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1496', '1', '3', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '18', '15', '2', '2026-10-07 11:38:07','0','0'); -- id=2589
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+24 where id = 337;
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 ('600','i0001492', '116', '108', '1492', '24', '625', '15000', '0', '', '0', '2026-10-07 11:38:07', '1492', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','337-24,','1','1','0','0','625','15000','0','','0','0.00','0','0','0','0'); -- id=475
UPDATE sellbilldetail SET  lastbuyprice = 600.00 , meanbuyprice = 600.00, lastbuyprice_withDiscount = 600.00, meanbuyprice_withDiscount = 600.00
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where sellbilldetailid = 475;
 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 (1492, '2026-10-07', 15000, 14400, 14400
                    , 14400, 14400, 14400, 14400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 24, 0, 14400, 14400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+15000, sellCostBuyPrice =sellCostBuyPrice+14400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+14400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+14400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+14400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+14400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+14400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+14400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+14400
                        , returnSellVal = returnSellVal+0, 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+24
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 15000, 14400, 14400
                    , 14400, 14400, 14400, 14400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 14400, 14400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+15000, sellCostBuyPrice =sellCostBuyPrice+14400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+14400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+14400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+14400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+14400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+14400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+14400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+14400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '2', storedetaildate = '2026-10-07 11:38:07' WHERE storedetailid = '1517';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1492', '1', '24', '1', '116', 'اضافة فاتورة مبيعات', 'sellbillController.php', '24', '0', '2', '2026-10-07 11:38:07','0','0'); -- id=2590
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '493730',  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 ('406190','87540', '0', '2', 'اضافة فاتورة مبيعات', '116', '493730', '2026-10-07 11:38:07', '2',  'sellbillController.php','1','','0'); -- id=145
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '87540', '87540', '2026-10-07', '2', '0', '0', '2026-10-07 11:38:07','اضافة فاتورة مبيعات رقم 116','1','0',null,'0','116','sellbillController.php?do=showDetail&sellbillid=116'); -- id=1234
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1234', '419', '87540', '','0'); -- id=1241
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '493730', 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 ('1234', '143', '87540', '','0'); -- id=1234
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1173270', 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 ( '83340', '83340', '2026-10-07', '2', '0', '0', '2026-10-07 11:38:07','اضافة فاتورة مبيعات رقم 116 - صرف البضاعة من المخزن','1','0',null,'0','116','sellbillController.php?do=showDetail&sellbillid=116'); -- id=1235
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1235', '402', '83340', '','0'); -- id=1242
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1136342.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1235', '382', '83340', '','0'); -- id=1235
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17139099.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1234,0,1235' where sellbillid=116;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 87540, 83340, 83340
                    , 83340, 83340, 83340, 83340
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,83340, 83340, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+87540, sellCostBuyPrice =sellCostBuyPrice+83340
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+83340, sellCostMeanBuyPrice = sellCostMeanBuyPrice+83340
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+83340, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+83340
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+83340
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+83340
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+83340
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 87540, 83340, 83340
                    , 83340, 83340, 83340, 83340
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,83340, 83340, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+87540, sellCostBuyPrice =sellCostBuyPrice+83340
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+83340, sellCostMeanBuyPrice = sellCostMeanBuyPrice+83340
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+83340, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+83340
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+83340
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+83340
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+83340
                        , returnSellVal = returnSellVal+0, 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, 87540, 83340, 83340
                    , 83340, 83340, 83340, 83340, 83340, 83340)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+87540, netSellCostBuyPrice = netSellCostBuyPrice+83340
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+83340
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+83340
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+83340
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+83340
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+83340
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+83340
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+83340;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac5f4e0c8a12 and sellbillId = 116 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:08:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:38:07", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 11:38:07', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3729
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:23:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:53:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 11:53:02', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3730
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:28:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:58:38", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 11:58:38', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3731

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac604efb9a88
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 11:58:38', '06ac604efb9a88', '1', '0.00', '0', '0', '1', '9150.00', '9150', '9150', '0', '1', '2026-10-07 11:58:38', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '21' ,'0','','','','','-1','0','0','0','0','0','9150','0','','0','0','9150','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=117
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','اضافة فاتورة مبيعات','117', '0', '2026-10-07 11:58:38', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '9150', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 11:58:38','0','0','',''); -- id=207
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+15 where id = 329;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('310','01459', '117', '103', '1459', '15', '330', '4950', '0', '', '0', '2026-10-07 11:58:38', '1459', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','329-15,','1','1','0','0','330','4950','0','','0','0.00','0','0','0','0'); -- id=476
UPDATE sellbilldetail SET  lastbuyprice = 310.00 , meanbuyprice = 310.00, lastbuyprice_withDiscount = 310.00, meanbuyprice_withDiscount = 310.00
        , lastbuyprice_withTax = 310, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 310
                where sellbilldetailid = 476;
 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 (1459, '2026-10-07', 4950, 4650, 4650
                    , 4650, 4650, 4650, 4650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 15, 0, 4650, 4650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4950, sellCostBuyPrice =sellCostBuyPrice+4650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4650
                        , returnSellVal = returnSellVal+0, 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+15
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 4950, 4650, 4650
                    , 4650, 4650, 4650, 4650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4650, 4650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4950, sellCostBuyPrice =sellCostBuyPrice+4650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4650
                        , returnSellVal = returnSellVal+0, 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 = '93', userid = '2', storedetaildate = '2026-10-07 11:58:38' WHERE storedetailid = '1484';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1459', '1', '15', '1', '117', 'اضافة فاتورة مبيعات', 'sellbillController.php', '108', '93', '2', '2026-10-07 11:58:38','0','0'); -- id=2591
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 347;
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 ('675','01502', '117', '108', '1502', '6', '700', '4200', '0', '', '0', '2026-10-07 11:58:38', '1502', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','347-6,','1','1','0','0','700','4200','0','','0','0.00','0','0','0','0'); -- id=477
UPDATE sellbilldetail SET  lastbuyprice = 675.00 , meanbuyprice = 675.00, lastbuyprice_withDiscount = 675.00, meanbuyprice_withDiscount = 675.00
        , lastbuyprice_withTax = 675, meanbuyprice_withTax = 675, lastbuyprice_withDiscountAndTax = 675
                where sellbilldetailid = 477;
 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 (1502, '2026-10-07', 4200, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4200, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 4200, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4200, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '6', userid = '2', storedetaildate = '2026-10-07 11:58:38' WHERE storedetailid = '1527';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1502', '1', '6', '1', '117', 'اضافة فاتورة مبيعات', 'sellbillController.php', '12', '6', '2', '2026-10-07 11:58:38','0','0'); -- id=2592
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '502880',  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 ('493730','9150', '0', '2', 'اضافة فاتورة مبيعات', '117', '502880', '2026-10-07 11:58:38', '2',  'sellbillController.php','1','','0'); -- id=146
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '9150', '9150', '2026-10-07', '2', '0', '0', '2026-10-07 11:58:39','اضافة فاتورة مبيعات رقم 117','1','0',null,'0','117','sellbillController.php?do=showDetail&sellbillid=117'); -- id=1236
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1236', '419', '9150', '','0'); -- id=1243
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '502880', 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 ('1236', '143', '9150', '','0'); -- id=1236
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1182420', 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 ( '8700', '8700', '2026-10-07', '2', '0', '0', '2026-10-07 11:58:39','اضافة فاتورة مبيعات رقم 117 - صرف البضاعة من المخزن','1','0',null,'0','117','sellbillController.php?do=showDetail&sellbillid=117'); -- id=1237
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1237', '402', '8700', '','0'); -- id=1244
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1145042.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1237', '382', '8700', '','0'); -- id=1237
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17130399.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1236,0,1237' where sellbillid=117;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 9150, 8700, 8700
                    , 8700, 8700, 8700, 8700
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,8700, 8700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+9150, sellCostBuyPrice =sellCostBuyPrice+8700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+8700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+8700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+8700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+8700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+8700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+8700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+8700
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 9150, 8700, 8700
                    , 8700, 8700, 8700, 8700
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,8700, 8700, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+9150, sellCostBuyPrice =sellCostBuyPrice+8700
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+8700, sellCostMeanBuyPrice = sellCostMeanBuyPrice+8700
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+8700, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+8700
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+8700
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+8700
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+8700
                        , returnSellVal = returnSellVal+0, 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, 9150, 8700, 8700
                    , 8700, 8700, 8700, 8700, 8700, 8700)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+9150, netSellCostBuyPrice = netSellCostBuyPrice+8700
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+8700
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+8700
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+8700
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+8700
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+8700
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+8700
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+8700;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac604efb9a88 and sellbillId = 117 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:28:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 11:58:39", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 11:58:39', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3732
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:38:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:08:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 12:08:05', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3733
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('ريفال تريكو','2026-10-07','','85', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=112
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (112, 1,'2026-10-07 12:08:05',1)
                ON DUPLICATE KEY UPDATE catid = 112, edited = 1, sysdate = '2026-10-07 12:08:05', userid = 1; -- id=114
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '112', '1', '2026-10-07', '1', '0'); -- id=26
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:38:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:08:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 12:08:06', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3734
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:38:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:08:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 12:08:07', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3735
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:38:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:08:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 12:08:11', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3736
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:38:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:08:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 12:08:31', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3737
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:42:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:12:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 12:12:28', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3738
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('زنط ريفال','','112','370','430','430','430','2026-10-07','0','1','0','','0','0','0','0','0','370','370','370','370','370','0','16.22','0','0','.','0','0','0','370','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','370','370','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','370','0','0','0','0','0','0','','','0','0','0','0'); -- id=1550
UPDATE product SET productName = 'زنط ريفال', productDescription = '', productCatId = '112', productBuyPrice = '370', productSellAllPrice = '430', productSellUnitPrice = '430', productSellHalfPrice = '430', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01550',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '370',lastbuyprice_withDiscount = '370',meanbuyprice = '370',meanbuyprice_withDiscount = '370' , productbuypricereal = '370' , buypricereal_precentage = '0' , buytotal_precentage = '16.22' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='370',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='370',meanbuyprice_withTax='370',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='370',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1550';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1550', '1.00', '2026-10-07', '1', '0','0155001','430','430','430','370','','0','0','0','0','0','0','0','0','0','0'); -- id=1550
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1550', '1', '0', '1', '2026-10-07'); -- id=1575
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1550', '1', '0', '0', '1550', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2593
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1550, 1,'2026-10-07 12:12:28',1)
                ON DUPLICATE KEY UPDATE productid = 1550, edited = 1, sysdate = '2026-10-07 12:12:28', userid = 1; -- id=2362
UPDATE product SET productName = 'زنط ريفال', productDescription = '', productCatId = '112', productBuyPrice = '370.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01550',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '370',lastbuyprice_withDiscount = '370',meanbuyprice = '370',meanbuyprice_withDiscount = '370' , productbuypricereal = '370' , buypricereal_precentage = '0' , buytotal_precentage = '16.22' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='370',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='370',meanbuyprice_withTax='370',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='370',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1550';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('حوض ريفال','','112','320','380','380','380','2026-10-07','0','1','0','','0','0','0','0','0','320','320','320','320','320','0','18.75','0','0','.','0','0','0','320','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','320','320','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','320','0','0','0','0','0','0','','','0','0','0','0'); -- id=1551
UPDATE product SET productName = 'حوض ريفال', productDescription = '', productCatId = '112', productBuyPrice = '320', productSellAllPrice = '380', productSellUnitPrice = '380', productSellHalfPrice = '380', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01551',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '18.75' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1551';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1551', '1.00', '2026-10-07', '1', '0','0155101','380','380','380','320','','0','0','0','0','0','0','0','0','0','0'); -- id=1551
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1551', '1', '0', '1', '2026-10-07'); -- id=1576
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1551', '1', '0', '0', '1551', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2594
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1551, 1,'2026-10-07 12:12:28',1)
                ON DUPLICATE KEY UPDATE productid = 1551, edited = 1, sysdate = '2026-10-07 12:12:28', userid = 1; -- id=2363
UPDATE product SET productName = 'حوض ريفال', productDescription = '', productCatId = '112', productBuyPrice = '320.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01551',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '18.75' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1551';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:42:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:12:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 12:12:29', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3739
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:42:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:12:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 12:12:32', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3740
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('ريفال تريكو', '', '', '', '', '0', '1', '2026-10-07 12:12:44', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=108
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('108', '0', '', '0', 'إضافة مورد جديد', '108', '', '2026-10-07 12:12:44', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=191
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('ريفال تريكو', 'ريفال تريكو', 'ريفال تريكو', 'ريفال تريكو', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-07 12:12:44'); -- id=591
UPDATE supplier SET suppliername = 'ريفال تريكو', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-07', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='591',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '108';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:44:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:14:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 12:14:36', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3741
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac60d005f277', '2026-10-07 12:12:32', '108', '0.00', '214650', '0', '0', '214650.00',  '214650.00', '0', '214650', '1', '2026-10-07 12:14:36', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=48
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01550', '48', '112', '1550', '60', '370', '22200.00', '0', '', '2026-10-07 12:14:36', '1550','','','0','0','0','0','0',null,'370','22200','0','0','0','0','0','0','0','0','1'); -- id=283
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 12:12:32', 1, 1550, 0, 0
                    , 370, 60, 0, 0, 1, '2026-10-07 12:14:36')
                ON DUPLICATE KEY UPDATE buyprice = 370,
                        buyQuantity =buyQuantity+60, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 12:14:36' ; -- id=359
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1550', '370', '60', '0', 'buyBillController.php', '283', '', '0', '0'); -- id=241
UPDATE product SET  productBuyPrice = "370" WHERE productId = 1550 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 283 ;
UPDATE product SET productName = 'زنط ريفال', productDescription = '', productCatId = '112', productBuyPrice = '370.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01550',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '370',lastbuyprice_withDiscount = '370',meanbuyprice = '370',meanbuyprice_withDiscount = '370' , productbuypricereal = '370.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '16.22' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='370',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='370',meanbuyprice_withTax='370',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='370',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1550';
UPDATE buybilldetail SET  lastbuyprice = 370 , meanbuyprice = 370, lastbuyprice_withDiscount = 370, meanbuyprice_withDiscount = 370
        , lastbuyprice_withTax = 370, meanbuyprice_withTax = 370, lastbuyprice_withDiscountAndTax = 370
                where buybilldetailid = 283;
UPDATE productunit SET proUnitBuyPrice  = 370 * productnumber WHERE productid = 1550;
UPDATE storedetail SET  productquantity = '60', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1575';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1550', '1', '60', '0', '48', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '60', '1', '2026-10-07 12:12:32','0','0'); -- id=2595
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01550', '48', '112', '1550', '60', '370', '22200.00', '0', '', '2026-10-07 12:14:36', '1550','','','0','0','0','0','0',null,'370','22200','0','0','0','0','0','0','0','0','1'); -- id=284
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 12:12:32', 1, 1550, 0, 0
                    , 370, 60, 0, 0, 1, '2026-10-07 12:14:36')
                ON DUPLICATE KEY UPDATE buyprice = 370,
                        buyQuantity =buyQuantity+60, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 12:14:36' ; -- id=359
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1550', '370', '60', '0', 'buyBillController.php', '284', '', '0', '0'); -- id=242
UPDATE product SET  productBuyPrice = "370" WHERE productId = 1550 ;
UPDATE buybilldetail SET  quantitybefore = 60 WHERE buybilldetailid = 284 ;
UPDATE product SET productName = 'زنط ريفال', productDescription = '', productCatId = '112', productBuyPrice = '370.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01550',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '370',lastbuyprice_withDiscount = '370',meanbuyprice = '370',meanbuyprice_withDiscount = '370' , productbuypricereal = '370.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '16.22' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='370',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='370',meanbuyprice_withTax='370',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='370',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1550';
UPDATE buybilldetail SET  lastbuyprice = 370 , meanbuyprice = 370, lastbuyprice_withDiscount = 370, meanbuyprice_withDiscount = 370
        , lastbuyprice_withTax = 370, meanbuyprice_withTax = 370, lastbuyprice_withDiscountAndTax = 370
                where buybilldetailid = 284;
UPDATE productunit SET proUnitBuyPrice  = 370 * productnumber WHERE productid = 1550;
UPDATE storedetail SET  productquantity = '120', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1575';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1550', '1', '60', '0', '48', 'اضافة فاتورة مشتريات', 'buyBillController.php', '60', '120', '1', '2026-10-07 12:12:32','0','0'); -- id=2596
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01551', '48', '112', '1551', '80', '320', '25600.00', '0', '', '2026-10-07 12:14:36', '1551','','','0','0','0','0','0',null,'320','25600','0','0','0','0','0','0','0','0','1'); -- id=285
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 12:12:32', 1, 1551, 0, 0
                    , 320, 80, 0, 0, 1, '2026-10-07 12:14:36')
                ON DUPLICATE KEY UPDATE buyprice = 320,
                        buyQuantity =buyQuantity+80, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 12:14:36' ; -- id=361
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1551', '320', '80', '0', 'buyBillController.php', '285', '', '0', '0'); -- id=243
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1551 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 285 ;
UPDATE product SET productName = 'حوض ريفال', productDescription = '', productCatId = '112', productBuyPrice = '320.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01551',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '18.75' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1551';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 320, meanbuyprice_withDiscount = 320
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 320
                where buybilldetailid = 285;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1551;
UPDATE storedetail SET  productquantity = '80', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1576';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1551', '1', '80', '0', '48', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '80', '1', '2026-10-07 12:12:32','0','0'); -- id=2597
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01551', '48', '112', '1551', '80', '320', '25600.00', '0', '', '2026-10-07 12:14:36', '1551','','','0','0','0','0','0',null,'320','25600','0','0','0','0','0','0','0','0','1'); -- id=286
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 12:12:32', 1, 1551, 0, 0
                    , 320, 80, 0, 0, 1, '2026-10-07 12:14:36')
                ON DUPLICATE KEY UPDATE buyprice = 320,
                        buyQuantity =buyQuantity+80, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 12:14:36' ; -- id=361
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1551', '320', '80', '0', 'buyBillController.php', '286', '', '0', '0'); -- id=244
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1551 ;
UPDATE buybilldetail SET  quantitybefore = 80 WHERE buybilldetailid = 286 ;
UPDATE product SET productName = 'حوض ريفال', productDescription = '', productCatId = '112', productBuyPrice = '320.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01551',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '18.75' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1551';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 320, meanbuyprice_withDiscount = 320
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 320
                where buybilldetailid = 286;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1551;
UPDATE storedetail SET  productquantity = '160', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1576';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1551', '1', '80', '0', '48', 'اضافة فاتورة مشتريات', 'buyBillController.php', '80', '160', '1', '2026-10-07 12:12:32','0','0'); -- id=2598
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01550', '48', '112', '1550', '45', '370', '16650.00', '0', '', '2026-10-07 12:14:36', '1550','','','0','0','0','0','0',null,'370','16650','0','0','0','0','0','0','0','0','1'); -- id=287
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 12:12:32', 1, 1550, 0, 0
                    , 370, 45, 0, 0, 1, '2026-10-07 12:14:36')
                ON DUPLICATE KEY UPDATE buyprice = 370,
                        buyQuantity =buyQuantity+45, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 12:14:36' ; -- id=359
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1550', '370', '45', '0', 'buyBillController.php', '287', '', '0', '0'); -- id=245
UPDATE product SET  productBuyPrice = "370" WHERE productId = 1550 ;
UPDATE buybilldetail SET  quantitybefore = 120 WHERE buybilldetailid = 287 ;
UPDATE product SET productName = 'زنط ريفال', productDescription = '', productCatId = '112', productBuyPrice = '370.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01550',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '370',lastbuyprice_withDiscount = '370',meanbuyprice = '370',meanbuyprice_withDiscount = '370' , productbuypricereal = '370.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '16.22' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='370',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='370',meanbuyprice_withTax='370',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='370',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1550';
UPDATE buybilldetail SET  lastbuyprice = 370 , meanbuyprice = 370, lastbuyprice_withDiscount = 370, meanbuyprice_withDiscount = 370
        , lastbuyprice_withTax = 370, meanbuyprice_withTax = 370, lastbuyprice_withDiscountAndTax = 370
                where buybilldetailid = 287;
UPDATE productunit SET proUnitBuyPrice  = 370 * productnumber WHERE productid = 1550;
UPDATE storedetail SET  productquantity = '165', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1575';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1550', '1', '45', '0', '48', 'اضافة فاتورة مشتريات', 'buyBillController.php', '120', '165', '1', '2026-10-07 12:12:32','0','0'); -- id=2599
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01551', '48', '112', '1551', '80', '320', '25600.00', '0', '', '2026-10-07 12:14:36', '1551','','','0','0','0','0','0',null,'320','25600','0','0','0','0','0','0','0','0','1'); -- id=288
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 12:12:32', 1, 1551, 0, 0
                    , 320, 80, 0, 0, 1, '2026-10-07 12:14:36')
                ON DUPLICATE KEY UPDATE buyprice = 320,
                        buyQuantity =buyQuantity+80, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 12:14:36' ; -- id=361
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1551', '320', '80', '0', 'buyBillController.php', '288', '', '0', '0'); -- id=246
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1551 ;
UPDATE buybilldetail SET  quantitybefore = 160 WHERE buybilldetailid = 288 ;
UPDATE product SET productName = 'حوض ريفال', productDescription = '', productCatId = '112', productBuyPrice = '320.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01551',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '18.75' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1551';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 320, meanbuyprice_withDiscount = 320
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 320
                where buybilldetailid = 288;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1551;
UPDATE storedetail SET  productquantity = '240', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1576';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1551', '1', '80', '0', '48', 'اضافة فاتورة مشتريات', 'buyBillController.php', '160', '240', '1', '2026-10-07 12:12:32','0','0'); -- id=2600
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01551', '48', '112', '1551', '80', '320', '25600.00', '0', '', '2026-10-07 12:14:36', '1551','','','0','0','0','0','0',null,'320','25600','0','0','0','0','0','0','0','0','1'); -- id=289
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 12:12:32', 1, 1551, 0, 0
                    , 320, 80, 0, 0, 1, '2026-10-07 12:14:36')
                ON DUPLICATE KEY UPDATE buyprice = 320,
                        buyQuantity =buyQuantity+80, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 12:14:36' ; -- id=361
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1551', '320', '80', '0', 'buyBillController.php', '289', '', '0', '0'); -- id=247
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1551 ;
UPDATE buybilldetail SET  quantitybefore = 240 WHERE buybilldetailid = 289 ;
UPDATE product SET productName = 'حوض ريفال', productDescription = '', productCatId = '112', productBuyPrice = '320.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01551',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '18.75' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1551';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 320, meanbuyprice_withDiscount = 320
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 320
                where buybilldetailid = 289;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1551;
UPDATE storedetail SET  productquantity = '320', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1576';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1551', '1', '80', '0', '48', 'اضافة فاتورة مشتريات', 'buyBillController.php', '240', '320', '1', '2026-10-07 12:12:32','0','0'); -- id=2601
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01551', '48', '112', '1551', '80', '320', '25600.00', '0', '', '2026-10-07 12:14:36', '1551','','','0','0','0','0','0',null,'320','25600','0','0','0','0','0','0','0','0','1'); -- id=290
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 12:12:32', 1, 1551, 0, 0
                    , 320, 80, 0, 0, 1, '2026-10-07 12:14:36')
                ON DUPLICATE KEY UPDATE buyprice = 320,
                        buyQuantity =buyQuantity+80, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 12:14:36' ; -- id=361
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1551', '320', '80', '0', 'buyBillController.php', '290', '', '0', '0'); -- id=248
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1551 ;
UPDATE buybilldetail SET  quantitybefore = 320 WHERE buybilldetailid = 290 ;
UPDATE product SET productName = 'حوض ريفال', productDescription = '', productCatId = '112', productBuyPrice = '320.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01551',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '18.75' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1551';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 320, meanbuyprice_withDiscount = 320
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 320
                where buybilldetailid = 290;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1551;
UPDATE storedetail SET  productquantity = '400', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1576';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1551', '1', '80', '0', '48', 'اضافة فاتورة مشتريات', 'buyBillController.php', '320', '400', '1', '2026-10-07 12:12:32','0','0'); -- id=2602
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01551', '48', '112', '1551', '80', '320', '25600.00', '0', '', '2026-10-07 12:14:36', '1551','','','0','0','0','0','0',null,'320','25600','0','0','0','0','0','0','0','0','1'); -- id=291
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 12:12:32', 1, 1551, 0, 0
                    , 320, 80, 0, 0, 1, '2026-10-07 12:14:36')
                ON DUPLICATE KEY UPDATE buyprice = 320,
                        buyQuantity =buyQuantity+80, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 12:14:36' ; -- id=361
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1551', '320', '80', '0', 'buyBillController.php', '291', '', '0', '0'); -- id=249
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1551 ;
UPDATE buybilldetail SET  quantitybefore = 400 WHERE buybilldetailid = 291 ;
UPDATE product SET productName = 'حوض ريفال', productDescription = '', productCatId = '112', productBuyPrice = '320.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01551',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '18.75' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1551';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 320, meanbuyprice_withDiscount = 320
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 320
                where buybilldetailid = 291;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1551;
UPDATE storedetail SET  productquantity = '480', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1576';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1551', '1', '80', '0', '48', 'اضافة فاتورة مشتريات', 'buyBillController.php', '400', '480', '1', '2026-10-07 12:12:32','0','0'); -- id=2603
UPDATE supplier SET  suppliercurrentDebt = '214650',suppliercurrentDebtInCurrency= '214650' , userid = '1', supplierdate = '2026-10-07 12:14:36'   WHERE supplierid = '108';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('108', '0.00', '214650', '0', 'اضافة فاتورة مشتريات', '48', '214650', '2026-10-07 12:12:32', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','214650','1','0','214650','214650','0',''); -- id=192
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '214650', '214650', '2026-10-07', '1', '0', '0', '2026-10-07 12:14:36','اضافة فاتورة مشتريات رقم 48','1','0',null,'0','48','buyBillController.php?do=details&id=48'); -- id=1238
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1238', '382', '214650', '','0'); -- id=1245
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17345049.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1238', '591', '214650', '','0'); -- id=1238
UPDATE accountstree SET name = 'ريفال تريكو', customName = 'ريفال تريكو', customNameEn = 'ريفال تريكو', nameEn = 'ريفال تريكو', parent = '81', accountNature = '1', theValue = '214650', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 12:12:44' WHERE id = '591';
update buybill set dailyentryid='1238,0' where buybillid=48;
COMMIT;
UPDATE product SET overAllAveragePrice = 370 WHERE productId = 1550;UPDATE product SET overAllAveragePrice = 320 WHERE productId = 1551;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:44:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:14:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 12:14:36', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=48'); -- id=3742
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:44:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:14:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 12:14:43', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=48&type=2'); -- id=3743
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:45:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:15:51", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 12:15:51', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3744

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac609bf3ee30
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 12:15:51', '06ac609bf3ee30', '1', '0.00', '0', '5', '1', '3520.00', '3515', '3515', '0', '1', '2026-10-07 12:15:51', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '10' ,'0','','','','','-1','0','0','0','0','0','3515','0','','0','0','3515','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=118
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','اضافة فاتورة مبيعات','118', '0', '2026-10-07 12:15:51', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '3515', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 12:15:51','0','0','',''); -- id=208
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+4 where id = 355;
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 ('276','01467', '118', '104', '1467', '4', '340', '1360', '0', '', '0', '2026-10-07 12:15:51', '1467', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','355-4,','1','1','0','0','340','1360','0','','0','0.00','0','0','0','0'); -- id=478
UPDATE sellbilldetail SET  lastbuyprice = 276.00 , meanbuyprice = 276.00, lastbuyprice_withDiscount = 276.00, meanbuyprice_withDiscount = 276.00
        , lastbuyprice_withTax = 276, meanbuyprice_withTax = 276, lastbuyprice_withDiscountAndTax = 276
                where sellbilldetailid = 478;
 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 (1467, '2026-10-07', 1358.0681818182, 1104, 1104
                    , 1104, 1104, 1104, 1104
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4, 0, 1104, 1104, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1358.0681818182, sellCostBuyPrice =sellCostBuyPrice+1104
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1104, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1104
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1104, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1104
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1104
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1104
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1104
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+4
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 1358.0681818182, 1104, 1104
                    , 1104, 1104, 1104, 1104
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1104, 1104, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1358.0681818182, sellCostBuyPrice =sellCostBuyPrice+1104
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1104, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1104
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1104, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1104
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1104
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1104
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1104
                        , returnSellVal = returnSellVal+0, 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 = '611', userid = '2', storedetaildate = '2026-10-07 12:15:51' WHERE storedetailid = '1492';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1467', '1', '4', '1', '118', 'اضافة فاتورة مبيعات', 'sellbillController.php', '615', '611', '2', '2026-10-07 12:15:51','0','0'); -- id=2604
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 235;
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 ('320','01456', '118', '94', '1456', '6', '360', '2160', '0', '', '0', '2026-10-07 12:15:51', '1456', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','235-6,','1','1','0','0','360','2160','0','','0','0.00','0','0','0','0'); -- id=479
UPDATE sellbilldetail SET  lastbuyprice = 320.00 , meanbuyprice = 320.00, lastbuyprice_withDiscount = 320.00, meanbuyprice_withDiscount = 320.00
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 320
                where sellbilldetailid = 479;
 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 (1456, '2026-10-07', 2156.9318181818, 1920, 1920
                    , 1920, 1920, 1920, 1920
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 1920, 1920, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2156.9318181818, sellCostBuyPrice =sellCostBuyPrice+1920
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1920, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1920
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1920, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1920
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1920
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1920
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1920
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2156.9318181818, 1920, 1920
                    , 1920, 1920, 1920, 1920
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1920, 1920, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2156.9318181818, sellCostBuyPrice =sellCostBuyPrice+1920
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1920, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1920
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1920, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1920
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1920
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1920
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1920
                        , returnSellVal = returnSellVal+0, 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 = '276', userid = '2', storedetaildate = '2026-10-07 12:15:51' WHERE storedetailid = '1481';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1456', '1', '6', '1', '118', 'اضافة فاتورة مبيعات', 'sellbillController.php', '282', '276', '2', '2026-10-07 12:15:51','0','0'); -- id=2605
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '506395',  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 ('502880','3515', '0', '2', 'اضافة فاتورة مبيعات', '118', '506395', '2026-10-07 12:15:51', '2',  'sellbillController.php','1','','0'); -- id=147
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3520', '3520', '2026-10-07', '2', '0', '0', '2026-10-07 12:15:51','اضافة فاتورة مبيعات رقم 118','1','0',null,'0','118','sellbillController.php?do=showDetail&sellbillid=118'); -- id=1239
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1239', '419', '3515', '','0'); -- id=1246
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '506395', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1239', '398', '5', '','0'); -- id=1247
UPDATE accountstree SET name = 'خصم مسموح به', customName = 'خصم مسموح به', customNameEn = '', nameEn = '', parent = '158', accountNature = '0', theValue = '136178', theOrder = '0', layingOrder = '51', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-08-08 17:58:26' WHERE id = '398';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1239', '143', '3520', '','0'); -- id=1239
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1185940', 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 ( '3024', '3024', '2026-10-07', '2', '0', '0', '2026-10-07 12:15:51','اضافة فاتورة مبيعات رقم 118 - صرف البضاعة من المخزن','1','0',null,'0','118','sellbillController.php?do=showDetail&sellbillid=118'); -- id=1240
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1240', '402', '3024', '','0'); -- id=1248
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1148066.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1240', '382', '3024', '','0'); -- id=1240
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17342025.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1239,0,1240' where sellbillid=118;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 3515, 3024, 3024
                    , 3024, 3024, 3024, 3024
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3024, 3024, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3515, sellCostBuyPrice =sellCostBuyPrice+3024
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3024, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3024
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3024, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3024
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3024
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3024
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3024
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3515, 3024, 3024
                    , 3024, 3024, 3024, 3024
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3024, 3024, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3515, sellCostBuyPrice =sellCostBuyPrice+3024
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3024, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3024
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3024, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3024
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3024
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3024
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3024
                        , returnSellVal = returnSellVal+0, 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, 3515, 3024, 3024
                    , 3024, 3024, 3024, 3024, 3024, 3024)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+3515, netSellCostBuyPrice = netSellCostBuyPrice+3024
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+3024
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+3024
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+3024
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+3024
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+3024
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+3024
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+3024;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac609bf3ee30 and sellbillId = 118 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:45:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:15:51", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 12:15:51', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3745
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:50:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:20:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 12:20:39', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3746
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:57:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:27:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 12:27:29', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3747
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 08:57:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:27:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 12:27:43', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3748
UPDATE product SET productName = 'حوض محمد تريكو', productDescription = '', productCatId = '89', productBuyPrice = '370.00', productSellAllPrice = '410.00', productSellUnitPrice = '410.00', productSellHalfPrice = '410.00', productDate = '2026-09-30', conditions = '0', userId = '1', limitamount = '0', parcode = '01362',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '370.00',lastbuyprice_withDiscount = '370',meanbuyprice = '370.00',meanbuyprice_withDiscount = '370' , productbuypricereal = '370.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '10.81' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='370',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='370',meanbuyprice_withTax='370',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='370',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1362';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1362, 1,'2026-10-07 12:30:36',1)
                ON DUPLICATE KEY UPDATE productid = 1362, edited = 1, sysdate = '2026-10-07 12:30:36', userid = 1; -- id=2037
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:00:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:30:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 12:30:42', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3749
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:01:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:31:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 12:31:31', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3750
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:01:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:31:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 12:31:39', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3751
UPDATE product SET productName = 'نص سوسته محمد تريكو', productDescription = '', productCatId = '89', productBuyPrice = '380.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-09-30', conditions = '0', userId = '1', limitamount = '0', parcode = '01364',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380.00',lastbuyprice_withDiscount = '380',meanbuyprice = '380.00',meanbuyprice_withDiscount = '380' , productbuypricereal = '380.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '10.53' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1364';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1364, 1,'2026-10-07 12:31:44',1)
                ON DUPLICATE KEY UPDATE productid = 1364, edited = 1, sysdate = '2026-10-07 12:31:44', userid = 1; -- id=2039
UPDATE product SET productName = 'هاند ميد زراير محمد تريكو', productDescription = '', productCatId = '89', productBuyPrice = '380.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-09-30', conditions = '0', userId = '1', limitamount = '0', parcode = '01365',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380.00',lastbuyprice_withDiscount = '380',meanbuyprice = '380.00',meanbuyprice_withDiscount = '380' , productbuypricereal = '380.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '10.53' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1365';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1365, 1,'2026-10-07 12:31:49',1)
                ON DUPLICATE KEY UPDATE productid = 1365, edited = 1, sysdate = '2026-10-07 12:31:49', userid = 1; -- id=2040
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:01:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:31:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 12:31:57', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3752
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:02:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:32:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 12:32:34', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3753
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac6114255215', '2026-10-07 12:30:42', '80', '75520.00', '119000', '0', '0', '43480.00',  '43480.00', '0', '43480', '1', '2026-10-07 12:32:34', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=49
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01362', '49', '89', '1362', '60', '370', '22200.00', '0', '', '2026-10-07 12:32:34', '1362','','','0','0','0','0','0',null,'370','22200','0','0','0','0','0','0','0','0','1'); -- id=292
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 12:30:42', 1, 1362, 0, 0
                    , 370, 60, 0, 0, 1, '2026-10-07 12:32:34')
                ON DUPLICATE KEY UPDATE buyprice = 370,
                        buyQuantity =buyQuantity+60, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 12:32:34' ; -- id=368
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1362', '370', '60', '0', 'buyBillController.php', '292', '', '0', '0'); -- id=250
UPDATE product SET  productBuyPrice = "370" WHERE productId = 1362 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 292 ;
UPDATE product SET productName = 'حوض محمد تريكو', productDescription = '', productCatId = '89', productBuyPrice = '370.00', productSellAllPrice = '410.00', productSellUnitPrice = '410.00', productSellHalfPrice = '410.00', productDate = '2026-09-30', conditions = '0', userId = '1', limitamount = '0', parcode = '01362',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '370',lastbuyprice_withDiscount = '370',meanbuyprice = '370',meanbuyprice_withDiscount = '370' , productbuypricereal = '370.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '10.81' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='370',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='370',meanbuyprice_withTax='370',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='370',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1362';
UPDATE buybilldetail SET  lastbuyprice = 370 , meanbuyprice = 370, lastbuyprice_withDiscount = 370, meanbuyprice_withDiscount = 370
        , lastbuyprice_withTax = 370, meanbuyprice_withTax = 370, lastbuyprice_withDiscountAndTax = 370
                where buybilldetailid = 292;
UPDATE productunit SET proUnitBuyPrice  = 370 * productnumber WHERE productid = 1362;
UPDATE storedetail SET  productquantity = '60', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1362';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1362', '1', '60', '0', '49', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '60', '1', '2026-10-07 12:30:42','0','0'); -- id=2606
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01364', '49', '89', '1364', '56', '380', '21280.00', '0', '', '2026-10-07 12:32:34', '1364','','','0','0','0','0','0',null,'380','21280','0','0','0','0','0','0','0','0','1'); -- id=293
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 12:30:42', 1, 1364, 0, 0
                    , 380, 56, 0, 0, 1, '2026-10-07 12:32:34')
                ON DUPLICATE KEY UPDATE buyprice = 380,
                        buyQuantity =buyQuantity+56, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 12:32:34' ; -- id=369
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1364', '380', '56', '0', 'buyBillController.php', '293', '', '0', '0'); -- id=251
UPDATE product SET  productBuyPrice = "380" WHERE productId = 1364 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 293 ;
UPDATE product SET productName = 'نص سوسته محمد تريكو', productDescription = '', productCatId = '89', productBuyPrice = '380.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-09-30', conditions = '0', userId = '1', limitamount = '0', parcode = '01364',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '380',meanbuyprice = '380',meanbuyprice_withDiscount = '380' , productbuypricereal = '380.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '10.53' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1364';
UPDATE buybilldetail SET  lastbuyprice = 380 , meanbuyprice = 380, lastbuyprice_withDiscount = 380, meanbuyprice_withDiscount = 380
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 380
                where buybilldetailid = 293;
UPDATE productunit SET proUnitBuyPrice  = 380 * productnumber WHERE productid = 1364;
UPDATE storedetail SET  productquantity = '56', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1364';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1364', '1', '56', '0', '49', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '56', '1', '2026-10-07 12:30:42','0','0'); -- id=2607
UPDATE supplier SET  suppliercurrentDebt = '119000',suppliercurrentDebtInCurrency= '119000' , userid = '1', supplierdate = '2026-10-07 12:32:34'   WHERE supplierid = '80';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('80', '75520.00', '43480', '0', 'اضافة فاتورة مشتريات', '49', '119000', '2026-10-07 12:30:42', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','43480','1','75520','43480','119000','0',''); -- id=193
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '43480', '43480', '2026-10-07', '1', '0', '0', '2026-10-07 12:32:34','اضافة فاتورة مشتريات رقم 49','1','0',null,'0','49','buyBillController.php?do=details&id=49'); -- id=1241
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1241', '382', '43480', '','0'); -- id=1249
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17385505.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1241', '557', '43480', '','0'); -- id=1241
UPDATE accountstree SET name = 'محمد تريكو', customName = 'محمد تريكو', customNameEn = 'محمد تريكو', nameEn = 'محمد تريكو', parent = '81', accountNature = '1', theValue = '119000', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-02 17:22:07' WHERE id = '557';
update buybill set dailyentryid='1241,0' where buybillid=49;
COMMIT;
UPDATE product SET overAllAveragePrice = 370 WHERE productId = 1362;UPDATE product SET overAllAveragePrice = 380 WHERE productId = 1364;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:02:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:32:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 12:32:34', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=49'); -- id=3754
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:02:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:32:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 12:32:38', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=49&type=2'); -- id=3755
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:05:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:35:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 12:35:06', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3756
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:06:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:36:51", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 12:36:51', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3757

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac6019f945eb
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 12:36:52', '06ac6019f945eb', '1', '0.00', '0', '0', '1', '12375.00', '12375', '12375', '0', '1', '2026-10-07 12:36:52', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '18' ,'0','','','','','-1','0','0','0','0','0','12375','0','','0','0','12375','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=119
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','اضافة فاتورة مبيعات','119', '0', '2026-10-07 12:36:52', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '12375', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 12:36:52','0','0','',''); -- id=209
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 336;
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 ('675','i0001491', '119', '108', '1491', '9', '700', '6300', '0', '', '0', '2026-10-07 12:36:52', '1491', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','336-9,','1','1','0','0','700','6300','0','','0','0.00','0','0','0','0'); -- id=480
UPDATE sellbilldetail SET  lastbuyprice = 675.00 , meanbuyprice = 675.00, lastbuyprice_withDiscount = 675.00, meanbuyprice_withDiscount = 675.00
        , lastbuyprice_withTax = 675, meanbuyprice_withTax = 675, lastbuyprice_withDiscountAndTax = 675
                where sellbilldetailid = 480;
 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 (1491, '2026-10-07', 6300, 6075, 6075
                    , 6075, 6075, 6075, 6075
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 6075, 6075, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6300, sellCostBuyPrice =sellCostBuyPrice+6075
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6075, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6075
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6075, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6075
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6075
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6075
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6075
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+9
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 6300, 6075, 6075
                    , 6075, 6075, 6075, 6075
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6075, 6075, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6300, sellCostBuyPrice =sellCostBuyPrice+6075
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6075, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6075
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6075, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6075
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6075
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6075
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6075
                        , returnSellVal = returnSellVal+0, 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 = '6', userid = '2', storedetaildate = '2026-10-07 12:36:52' WHERE storedetailid = '1516';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1491', '1', '9', '1', '119', 'اضافة فاتورة مبيعات', 'sellbillController.php', '15', '6', '2', '2026-10-07 12:36:52','0','0'); -- id=2608
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 353;
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 ('650','01507', '119', '108', '1507', '9', '675', '6075', '0', '', '0', '2026-10-07 12:36:52', '1507', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','353-9,','1','1','0','0','675','6075','0','','0','0.00','0','0','0','0'); -- id=481
UPDATE sellbilldetail SET  lastbuyprice = 650.00 , meanbuyprice = 650.00, lastbuyprice_withDiscount = 650.00, meanbuyprice_withDiscount = 650.00
        , lastbuyprice_withTax = 650, meanbuyprice_withTax = 650, lastbuyprice_withDiscountAndTax = 650
                where sellbilldetailid = 481;
 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 (1507, '2026-10-07', 6075, 5850, 5850
                    , 5850, 5850, 5850, 5850
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 5850, 5850, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6075, sellCostBuyPrice =sellCostBuyPrice+5850
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5850, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5850
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5850, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5850
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5850
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5850
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5850
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+9
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 6075, 5850, 5850
                    , 5850, 5850, 5850, 5850
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5850, 5850, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6075, sellCostBuyPrice =sellCostBuyPrice+5850
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5850, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5850
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5850, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5850
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5850
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5850
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5850
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '9', userid = '2', storedetaildate = '2026-10-07 12:36:52' WHERE storedetailid = '1532';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1507', '1', '9', '1', '119', 'اضافة فاتورة مبيعات', 'sellbillController.php', '18', '9', '2', '2026-10-07 12:36:52','0','0'); -- id=2609
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '518770',  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 ('506395','12375', '0', '2', 'اضافة فاتورة مبيعات', '119', '518770', '2026-10-07 12:36:52', '2',  'sellbillController.php','1','','0'); -- id=148
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '12375', '12375', '2026-10-07', '2', '0', '0', '2026-10-07 12:36:52','اضافة فاتورة مبيعات رقم 119','1','0',null,'0','119','sellbillController.php?do=showDetail&sellbillid=119'); -- id=1242
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1242', '419', '12375', '','0'); -- id=1250
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '518770', 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 ('1242', '143', '12375', '','0'); -- id=1242
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1198315', 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 ( '11925', '11925', '2026-10-07', '2', '0', '0', '2026-10-07 12:36:52','اضافة فاتورة مبيعات رقم 119 - صرف البضاعة من المخزن','1','0',null,'0','119','sellbillController.php?do=showDetail&sellbillid=119'); -- id=1243
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1243', '402', '11925', '','0'); -- id=1251
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1159991.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1243', '382', '11925', '','0'); -- id=1243
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17373580.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1242,0,1243' where sellbillid=119;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 12375, 11925, 11925
                    , 11925, 11925, 11925, 11925
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,11925, 11925, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+12375, sellCostBuyPrice =sellCostBuyPrice+11925
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+11925, sellCostMeanBuyPrice = sellCostMeanBuyPrice+11925
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+11925, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+11925
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+11925
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+11925
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+11925
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 12375, 11925, 11925
                    , 11925, 11925, 11925, 11925
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,11925, 11925, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+12375, sellCostBuyPrice =sellCostBuyPrice+11925
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+11925, sellCostMeanBuyPrice = sellCostMeanBuyPrice+11925
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+11925, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+11925
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+11925
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+11925
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+11925
                        , returnSellVal = returnSellVal+0, 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, 12375, 11925, 11925
                    , 11925, 11925, 11925, 11925, 11925, 11925)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+12375, netSellCostBuyPrice = netSellCostBuyPrice+11925
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+11925
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+11925
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+11925
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+11925
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+11925
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+11925
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+11925;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac6019f945eb and sellbillId = 119 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:06:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:36:52", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 12:36:52', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3758
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:20:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:50:07", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 12:50:07', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3759
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:20:07";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 12:50:07", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 12:50:07', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3760
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:20:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 12:50:12", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 12:50:12', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3761
UPDATE user SET loginip = "" WHERE userid = 1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:40:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:10:17", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 13:10:17', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3762

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac612b50371b
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 13:10:17', '06ac612b50371b', '1', '0.00', '0', '0', '1', '1875.00', '1875', '1875', '0', '1', '2026-10-07 13:10:17', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '3' ,'0','','','','','-1','0','0','0','0','0','1875','0','','0','0','1875','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=120
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','اضافة فاتورة مبيعات','120', '0', '2026-10-07 13:10:17', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '1875', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 13:10:17','0','0','',''); -- id=210
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 338;
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 ('600','i0001493', '120', '108', '1493', '3', '625', '1875', '0', '', '0', '2026-10-07 13:10:17', '1493', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','338-3,','1','1','0','0','625','1875','0','','0','0.00','0','0','0','0'); -- id=482
UPDATE sellbilldetail SET  lastbuyprice = 600.00 , meanbuyprice = 600.00, lastbuyprice_withDiscount = 600.00, meanbuyprice_withDiscount = 600.00
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where sellbilldetailid = 482;
 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 (1493, '2026-10-07', 1875, 1800, 1800
                    , 1800, 1800, 1800, 1800
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1800, 1800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1875, 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+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 1875, 1800, 1800
                    , 1800, 1800, 1800, 1800
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1800, 1800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1875, 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 = '27', userid = '2', storedetaildate = '2026-10-07 13:10:17' WHERE storedetailid = '1518';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1493', '1', '3', '1', '120', 'اضافة فاتورة مبيعات', 'sellbillController.php', '30', '27', '2', '2026-10-07 13:10:17','0','0'); -- id=2610
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '520645',  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 ('518770','1875', '0', '2', 'اضافة فاتورة مبيعات', '120', '520645', '2026-10-07 13:10:17', '2',  'sellbillController.php','1','','0'); -- id=149
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1875', '1875', '2026-10-07', '2', '0', '0', '2026-10-07 13:10:17','اضافة فاتورة مبيعات رقم 120','1','0',null,'0','120','sellbillController.php?do=showDetail&sellbillid=120'); -- id=1244
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1244', '419', '1875', '','0'); -- id=1252
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '520645', 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 ('1244', '143', '1875', '','0'); -- id=1244
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1200190', 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-10-07', '2', '0', '0', '2026-10-07 13:10:17','اضافة فاتورة مبيعات رقم 120 - صرف البضاعة من المخزن','1','0',null,'0','120','sellbillController.php?do=showDetail&sellbillid=120'); -- id=1245
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1245', '402', '1800', '','0'); -- id=1253
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1161791.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1245', '382', '1800', '','0'); -- id=1245
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17371780.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1244,0,1245' where sellbillid=120;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 1875, 1800, 1800
                    , 1800, 1800, 1800, 1800
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1800, 1800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1875, 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-10-07', 1875, 1800, 1800
                    , 1800, 1800, 1800, 1800
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1800, 1800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1875, 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, 1875, 1800, 1800
                    , 1800, 1800, 1800, 1800, 1800, 1800)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+1875, 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 06ac612b50371b and sellbillId = 120 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:40:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:10:17", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 13:10:17', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3763
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:02:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:32:00", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 13:32:00', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3764

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac61a89aafa7
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 13:32:00', '06ac61a89aafa7', '1', '0.00', '0', '0', '1', '7740.00', '7740', '7740', '0', '1', '2026-10-07 13:32:00', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '18' ,'0','','','','','-1','0','0','0','0','0','7740','0','','0','0','7740','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=121
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','اضافة فاتورة مبيعات','121', '0', '2026-10-07 13:32:00', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '7740', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 13:32:00','0','0','',''); -- id=211
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+18 where id = 332;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('410','01462', '121', '103', '1462', '18', '430', '7740', '0', '', '0', '2026-10-07 13:32:00', '1462', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','332-18,','1','1','0','0','430','7740','0','','0','0.00','0','0','0','0'); -- id=483
UPDATE sellbilldetail SET  lastbuyprice = 410.00 , meanbuyprice = 410.00, lastbuyprice_withDiscount = 410.00, meanbuyprice_withDiscount = 410.00
        , lastbuyprice_withTax = 410, meanbuyprice_withTax = 410, lastbuyprice_withDiscountAndTax = 410
                where sellbilldetailid = 483;
 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 (1462, '2026-10-07', 7740, 7380, 7380
                    , 7380, 7380, 7380, 7380
                    , 0, 0, 0, 0
                    , 0, 0, 0, 18, 0, 7380, 7380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7740, sellCostBuyPrice =sellCostBuyPrice+7380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7380, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7380
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+18
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 7740, 7380, 7380
                    , 7380, 7380, 7380, 7380
                    , 0, 0, 0, 0
                    , 0, 0, 0, 7380, 7380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7740, sellCostBuyPrice =sellCostBuyPrice+7380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7380, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7380
                        , returnSellVal = returnSellVal+0, 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 = '288', userid = '2', storedetaildate = '2026-10-07 13:32:00' WHERE storedetailid = '1487';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1462', '1', '18', '1', '121', 'اضافة فاتورة مبيعات', 'sellbillController.php', '306', '288', '2', '2026-10-07 13:32:00','0','0'); -- id=2611
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '528385',  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 ('520645','7740', '0', '2', 'اضافة فاتورة مبيعات', '121', '528385', '2026-10-07 13:32:00', '2',  'sellbillController.php','1','','0'); -- id=150
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '7740', '7740', '2026-10-07', '2', '0', '0', '2026-10-07 13:32:00','اضافة فاتورة مبيعات رقم 121','1','0',null,'0','121','sellbillController.php?do=showDetail&sellbillid=121'); -- id=1246
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1246', '419', '7740', '','0'); -- id=1254
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '528385', 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 ('1246', '143', '7740', '','0'); -- id=1246
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1207930', 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 ( '7380', '7380', '2026-10-07', '2', '0', '0', '2026-10-07 13:32:00','اضافة فاتورة مبيعات رقم 121 - صرف البضاعة من المخزن','1','0',null,'0','121','sellbillController.php?do=showDetail&sellbillid=121'); -- id=1247
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1247', '402', '7380', '','0'); -- id=1255
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1169171.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1247', '382', '7380', '','0'); -- id=1247
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17364400.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1246,0,1247' where sellbillid=121;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 7740, 7380, 7380
                    , 7380, 7380, 7380, 7380
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,7380, 7380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7740, sellCostBuyPrice =sellCostBuyPrice+7380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7380, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7380
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 7740, 7380, 7380
                    , 7380, 7380, 7380, 7380
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,7380, 7380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7740, sellCostBuyPrice =sellCostBuyPrice+7380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7380, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7380
                        , returnSellVal = returnSellVal+0, 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, 7740, 7380, 7380
                    , 7380, 7380, 7380, 7380, 7380, 7380)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+7740, netSellCostBuyPrice = netSellCostBuyPrice+7380
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+7380
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+7380
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+7380
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+7380
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+7380
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+7380
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+7380;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac61a89aafa7 and sellbillId = 121 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:02:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:32:01", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 13:32:01', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3765
UPDATE user SET loginip = "" WHERE userid = 1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:07:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:37:39", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 13:37:39', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3766

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac61fa135874
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 13:37:39', '06ac61fa135874', '1', '0.00', '0', '0', '1', '3740.00', '3740', '3740', '0', '1', '2026-10-07 13:37:39', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '17' ,'0','','','','','-1','0','0','0','0','0','3740','0','','0','0','3740','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=122
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','اضافة فاتورة مبيعات','122', '0', '2026-10-07 13:37:39', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '3740', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 13:37:39','0','0','',''); -- id=212
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('200','08595', '122', '84', '1315', '17', '220', '3740', '0', '', '0', '2026-10-07 13:37:39', '1315', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','220','3740','0','','0','0.00','0','0','0','0'); -- id=484
UPDATE sellbilldetail SET  lastbuyprice = 200.00 , meanbuyprice = 200.00, lastbuyprice_withDiscount = 200.00, meanbuyprice_withDiscount = 200.00
        , lastbuyprice_withTax = 200, meanbuyprice_withTax = 200, lastbuyprice_withDiscountAndTax = 200
                where sellbilldetailid = 484;
 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 (1315, '2026-10-07', 3740, 3400, 3400
                    , 3400, 3400, 3400, 3400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 17, 0, 3400, 3400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3740, sellCostBuyPrice =sellCostBuyPrice+3400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3400
                        , returnSellVal = returnSellVal+0, 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+17
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3740, 3400, 3400
                    , 3400, 3400, 3400, 3400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3400, 3400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3740, sellCostBuyPrice =sellCostBuyPrice+3400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3400
                        , returnSellVal = returnSellVal+0, 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 = '38', userid = '2', storedetaildate = '2026-10-07 13:37:39' WHERE storedetailid = '1315';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1315', '1', '17', '1', '122', 'اضافة فاتورة مبيعات', 'sellbillController.php', '55', '38', '2', '2026-10-07 13:37:39','0','0'); -- id=2612
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '532125',  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 ('528385','3740', '0', '2', 'اضافة فاتورة مبيعات', '122', '532125', '2026-10-07 13:37:39', '2',  'sellbillController.php','1','','0'); -- id=151
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3740', '3740', '2026-10-07', '2', '0', '0', '2026-10-07 13:37:39','اضافة فاتورة مبيعات رقم 122','1','0',null,'0','122','sellbillController.php?do=showDetail&sellbillid=122'); -- id=1248
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1248', '419', '3740', '','0'); -- id=1256
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '532125', 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 ('1248', '143', '3740', '','0'); -- id=1248
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1211670', 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 ( '3400', '3400', '2026-10-07', '2', '0', '0', '2026-10-07 13:37:39','اضافة فاتورة مبيعات رقم 122 - صرف البضاعة من المخزن','1','0',null,'0','122','sellbillController.php?do=showDetail&sellbillid=122'); -- id=1249
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1249', '402', '3400', '','0'); -- id=1257
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1172571.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1249', '382', '3400', '','0'); -- id=1249
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17361000.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1248,0,1249' where sellbillid=122;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 3740, 3400, 3400
                    , 3400, 3400, 3400, 3400
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3400, 3400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3740, sellCostBuyPrice =sellCostBuyPrice+3400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3740, 3400, 3400
                    , 3400, 3400, 3400, 3400
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3400, 3400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3740, sellCostBuyPrice =sellCostBuyPrice+3400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3400
                        , returnSellVal = returnSellVal+0, 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, 3740, 3400, 3400
                    , 3400, 3400, 3400, 3400, 3400, 3400)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+3740, netSellCostBuyPrice = netSellCostBuyPrice+3400
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+3400
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+3400
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+3400
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+3400
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+3400
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+3400
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+3400;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac61fa135874 and sellbillId = 122 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:07:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:37:39", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 13:37:39', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3767
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:22:58";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:23:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:53:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 13:53:00', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3768
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:23:00";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 13:53:00', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3769
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:23:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:53:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 13:53:15', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3770
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:23:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:53:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 13:53:22', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3771
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:24:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:54:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 13:54:15', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3772
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:27:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:57:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 13:57:07', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3773
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 573','','8','637','665','665','665','2026-10-07','0','1','0','','0','0','0','0','0','637','637','637','637','637','0','4.4','0','0','.','0','0','0','637','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','637','637','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','637','0','0','0','0','0','0','','','0','0','0','0'); -- id=1552
UPDATE product SET productName = 'الدولي جينز 573', productDescription = '', productCatId = '8', productBuyPrice = '637', productSellAllPrice = '665', productSellUnitPrice = '665', productSellHalfPrice = '665', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01552',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '637',lastbuyprice_withDiscount = '637',meanbuyprice = '637',meanbuyprice_withDiscount = '637' , productbuypricereal = '637' , buypricereal_precentage = '0' , buytotal_precentage = '4.4' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='637',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='637',meanbuyprice_withTax='637',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='637',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1552';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1552', '1', '2026-10-07', '1', '0','0155201','665','665','665','637','','0','0','0','0','0','0','0','0','0','0'); -- id=1552
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1552', '1', '0', '1', '2026-10-07'); -- id=1577
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1552', '1', '0', '0', '1552', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2613
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1552, 1,'2026-10-07 13:57:07',1)
                ON DUPLICATE KEY UPDATE productid = 1552, edited = 1, sysdate = '2026-10-07 13:57:07', userid = 1; -- id=2367
UPDATE product SET productName = 'الدولي جينز 573', productDescription = '', productCatId = '8', productBuyPrice = '637.00', productSellAllPrice = '665.00', productSellUnitPrice = '665.00', productSellHalfPrice = '665.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01552',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '637',lastbuyprice_withDiscount = '637',meanbuyprice = '637',meanbuyprice_withDiscount = '637' , productbuypricereal = '637' , buypricereal_precentage = '0' , buytotal_precentage = '4.4' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='637',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='637',meanbuyprice_withTax='637',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='637',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1552';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 614','','8','572','600','600','600','2026-10-07','0','1','0','','0','0','0','0','0','572','572','572','572','572','0','4.9','0','0','.','0','0','0','572','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','572','572','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','572','0','0','0','0','0','0','','','0','0','0','0'); -- id=1553
UPDATE product SET productName = 'الدولي جينز 614', productDescription = '', productCatId = '8', productBuyPrice = '572', productSellAllPrice = '600', productSellUnitPrice = '600', productSellHalfPrice = '600', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01553',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '572',lastbuyprice_withDiscount = '572',meanbuyprice = '572',meanbuyprice_withDiscount = '572' , productbuypricereal = '572' , buypricereal_precentage = '0' , buytotal_precentage = '4.9' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='572',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='572',meanbuyprice_withTax='572',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='572',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1553';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1553', '1', '2026-10-07', '1', '0','0155301','600','600','600','572','','0','0','0','0','0','0','0','0','0','0'); -- id=1553
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1553', '1', '0', '1', '2026-10-07'); -- id=1578
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1553', '1', '0', '0', '1553', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2614
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1553, 1,'2026-10-07 13:57:07',1)
                ON DUPLICATE KEY UPDATE productid = 1553, edited = 1, sysdate = '2026-10-07 13:57:07', userid = 1; -- id=2368
UPDATE product SET productName = 'الدولي جينز 614', productDescription = '', productCatId = '8', productBuyPrice = '572.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01553',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '572',lastbuyprice_withDiscount = '572',meanbuyprice = '572',meanbuyprice_withDiscount = '572' , productbuypricereal = '572' , buypricereal_precentage = '0' , buytotal_precentage = '4.9' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='572',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='572',meanbuyprice_withTax='572',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='572',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1553';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 612','','8','532','560','560','560','2026-10-07','0','1','0','','0','0','0','0','0','532','532','532','532','532','0','5.26','0','0','.','0','0','0','532','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','532','532','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','532','0','0','0','0','0','0','','','0','0','0','0'); -- id=1554
UPDATE product SET productName = 'الدولي جينز 612', productDescription = '', productCatId = '8', productBuyPrice = '532', productSellAllPrice = '560', productSellUnitPrice = '560', productSellHalfPrice = '560', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01554',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '532',lastbuyprice_withDiscount = '532',meanbuyprice = '532',meanbuyprice_withDiscount = '532' , productbuypricereal = '532' , buypricereal_precentage = '0' , buytotal_precentage = '5.26' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='532',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='532',meanbuyprice_withTax='532',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='532',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1554';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1554', '1', '2026-10-07', '1', '0','0155401','560','560','560','532','','0','0','0','0','0','0','0','0','0','0'); -- id=1554
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1554', '1', '0', '1', '2026-10-07'); -- id=1579
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1554', '1', '0', '0', '1554', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2615
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1554, 1,'2026-10-07 13:57:07',1)
                ON DUPLICATE KEY UPDATE productid = 1554, edited = 1, sysdate = '2026-10-07 13:57:07', userid = 1; -- id=2369
UPDATE product SET productName = 'الدولي جينز 612', productDescription = '', productCatId = '8', productBuyPrice = '532.00', productSellAllPrice = '560.00', productSellUnitPrice = '560.00', productSellHalfPrice = '560.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01554',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '532',lastbuyprice_withDiscount = '532',meanbuyprice = '532',meanbuyprice_withDiscount = '532' , productbuypricereal = '532' , buypricereal_precentage = '0' , buytotal_precentage = '5.26' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='532',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='532',meanbuyprice_withTax='532',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='532',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1554';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 615','','8','457','485','485','485','2026-10-07','0','1','0','','0','0','0','0','0','457','457','457','457','457','0','6.13','0','0','.','0','0','0','457','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','457','457','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','457','0','0','0','0','0','0','','','0','0','0','0'); -- id=1555
UPDATE product SET productName = 'الدولي جينز 615', productDescription = '', productCatId = '8', productBuyPrice = '457', productSellAllPrice = '485', productSellUnitPrice = '485', productSellHalfPrice = '485', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01555',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '457',lastbuyprice_withDiscount = '457',meanbuyprice = '457',meanbuyprice_withDiscount = '457' , productbuypricereal = '457' , buypricereal_precentage = '0' , buytotal_precentage = '6.13' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='457',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='457',meanbuyprice_withTax='457',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='457',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1555';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1555', '1', '2026-10-07', '1', '0','0155501','485','485','485','457','','0','0','0','0','0','0','0','0','0','0'); -- id=1555
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1555', '1', '0', '1', '2026-10-07'); -- id=1580
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1555', '1', '0', '0', '1555', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2616
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1555, 1,'2026-10-07 13:57:07',1)
                ON DUPLICATE KEY UPDATE productid = 1555, edited = 1, sysdate = '2026-10-07 13:57:07', userid = 1; -- id=2370
UPDATE product SET productName = 'الدولي جينز 615', productDescription = '', productCatId = '8', productBuyPrice = '457.00', productSellAllPrice = '485.00', productSellUnitPrice = '485.00', productSellHalfPrice = '485.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01555',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '457',lastbuyprice_withDiscount = '457',meanbuyprice = '457',meanbuyprice_withDiscount = '457' , productbuypricereal = '457' , buypricereal_precentage = '0' , buytotal_precentage = '6.13' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='457',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='457',meanbuyprice_withTax='457',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='457',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1555';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 611','','8','637','665','665','665','2026-10-07','0','1','0','','0','0','0','0','0','637','637','637','637','637','0','4.4','0','0','.','0','0','0','637','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','637','637','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','637','0','0','0','0','0','0','','','0','0','0','0'); -- id=1556
UPDATE product SET productName = 'الدولي جينز 611', productDescription = '', productCatId = '8', productBuyPrice = '637', productSellAllPrice = '665', productSellUnitPrice = '665', productSellHalfPrice = '665', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01556',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '637',lastbuyprice_withDiscount = '637',meanbuyprice = '637',meanbuyprice_withDiscount = '637' , productbuypricereal = '637' , buypricereal_precentage = '0' , buytotal_precentage = '4.4' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='637',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='637',meanbuyprice_withTax='637',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='637',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1556';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1556', '1', '2026-10-07', '1', '0','0155601','665','665','665','637','','0','0','0','0','0','0','0','0','0','0'); -- id=1556
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1556', '1', '0', '1', '2026-10-07'); -- id=1581
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1556', '1', '0', '0', '1556', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2617
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1556, 1,'2026-10-07 13:57:07',1)
                ON DUPLICATE KEY UPDATE productid = 1556, edited = 1, sysdate = '2026-10-07 13:57:07', userid = 1; -- id=2371
UPDATE product SET productName = 'الدولي جينز 611', productDescription = '', productCatId = '8', productBuyPrice = '637.00', productSellAllPrice = '665.00', productSellUnitPrice = '665.00', productSellHalfPrice = '665.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01556',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '637',lastbuyprice_withDiscount = '637',meanbuyprice = '637',meanbuyprice_withDiscount = '637' , productbuypricereal = '637' , buypricereal_precentage = '0' , buytotal_precentage = '4.4' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='637',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='637',meanbuyprice_withTax='637',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='637',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1556';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 616','','8','617','645','645','645','2026-10-07','0','1','0','','0','0','0','0','0','617','617','617','617','617','0','4.54','0','0','.','0','0','0','617','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','617','617','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','617','0','0','0','0','0','0','','','0','0','0','0'); -- id=1557
UPDATE product SET productName = 'الدولي جينز 616', productDescription = '', productCatId = '8', productBuyPrice = '617', productSellAllPrice = '645', productSellUnitPrice = '645', productSellHalfPrice = '645', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01557',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '617',lastbuyprice_withDiscount = '617',meanbuyprice = '617',meanbuyprice_withDiscount = '617' , productbuypricereal = '617' , buypricereal_precentage = '0' , buytotal_precentage = '4.54' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='617',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='617',meanbuyprice_withTax='617',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='617',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1557';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1557', '1', '2026-10-07', '1', '0','0155701','645','645','645','617','','0','0','0','0','0','0','0','0','0','0'); -- id=1557
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1557', '1', '0', '1', '2026-10-07'); -- id=1582
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1557', '1', '0', '0', '1557', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2618
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1557, 1,'2026-10-07 13:57:08',1)
                ON DUPLICATE KEY UPDATE productid = 1557, edited = 1, sysdate = '2026-10-07 13:57:08', userid = 1; -- id=2372
UPDATE product SET productName = 'الدولي جينز 616', productDescription = '', productCatId = '8', productBuyPrice = '617.00', productSellAllPrice = '645.00', productSellUnitPrice = '645.00', productSellHalfPrice = '645.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01557',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '617',lastbuyprice_withDiscount = '617',meanbuyprice = '617',meanbuyprice_withDiscount = '617' , productbuypricereal = '617' , buypricereal_precentage = '0' , buytotal_precentage = '4.54' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='617',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='617',meanbuyprice_withTax='617',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='617',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1557';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 617','','8','657','685','685','685','2026-10-07','0','1','0','','0','0','0','0','0','657','657','657','657','657','0','4.26','0','0','.','0','0','0','657','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','657','657','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','657','0','0','0','0','0','0','','','0','0','0','0'); -- id=1558
UPDATE product SET productName = 'الدولي جينز 617', productDescription = '', productCatId = '8', productBuyPrice = '657', productSellAllPrice = '685', productSellUnitPrice = '685', productSellHalfPrice = '685', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01558',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '657',lastbuyprice_withDiscount = '657',meanbuyprice = '657',meanbuyprice_withDiscount = '657' , productbuypricereal = '657' , buypricereal_precentage = '0' , buytotal_precentage = '4.26' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='657',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='657',meanbuyprice_withTax='657',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='657',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1558';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1558', '1', '2026-10-07', '1', '0','0155801','685','685','685','657','','0','0','0','0','0','0','0','0','0','0'); -- id=1558
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1558', '1', '0', '1', '2026-10-07'); -- id=1583
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1558', '1', '0', '0', '1558', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2619
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1558, 1,'2026-10-07 13:57:08',1)
                ON DUPLICATE KEY UPDATE productid = 1558, edited = 1, sysdate = '2026-10-07 13:57:08', userid = 1; -- id=2373
UPDATE product SET productName = 'الدولي جينز 617', productDescription = '', productCatId = '8', productBuyPrice = '657.00', productSellAllPrice = '685.00', productSellUnitPrice = '685.00', productSellHalfPrice = '685.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01558',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '657',lastbuyprice_withDiscount = '657',meanbuyprice = '657',meanbuyprice_withDiscount = '657' , productbuypricereal = '657' , buypricereal_precentage = '0' , buytotal_precentage = '4.26' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='657',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='657',meanbuyprice_withTax='657',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='657',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1558';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 618','','8','577','605','605','605','2026-10-07','0','1','0','','0','0','0','0','0','577','577','577','577','577','0','4.85','0','0','.','0','0','0','577','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','577','577','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','577','0','0','0','0','0','0','','','0','0','0','0'); -- id=1559
UPDATE product SET productName = 'الدولي جينز 618', productDescription = '', productCatId = '8', productBuyPrice = '577', productSellAllPrice = '605', productSellUnitPrice = '605', productSellHalfPrice = '605', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01559',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '577',lastbuyprice_withDiscount = '577',meanbuyprice = '577',meanbuyprice_withDiscount = '577' , productbuypricereal = '577' , buypricereal_precentage = '0' , buytotal_precentage = '4.85' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='577',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='577',meanbuyprice_withTax='577',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='577',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1559';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1559', '1', '2026-10-07', '1', '0','0155901','605','605','605','577','','0','0','0','0','0','0','0','0','0','0'); -- id=1559
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1559', '1', '0', '1', '2026-10-07'); -- id=1584
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1559', '1', '0', '0', '1559', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2620
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1559, 1,'2026-10-07 13:57:08',1)
                ON DUPLICATE KEY UPDATE productid = 1559, edited = 1, sysdate = '2026-10-07 13:57:08', userid = 1; -- id=2374
UPDATE product SET productName = 'الدولي جينز 618', productDescription = '', productCatId = '8', productBuyPrice = '577.00', productSellAllPrice = '605.00', productSellUnitPrice = '605.00', productSellHalfPrice = '605.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01559',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '577',lastbuyprice_withDiscount = '577',meanbuyprice = '577',meanbuyprice_withDiscount = '577' , productbuypricereal = '577' , buypricereal_precentage = '0' , buytotal_precentage = '4.85' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='577',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='577',meanbuyprice_withTax='577',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='577',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1559';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:27:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:57:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 13:57:09', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3774
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:27:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:57:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 13:57:12', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3775
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:28:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:58:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 13:58:39', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3776
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac62588241f0', '2026-10-07 13:57:12', '26', '784805.00', '884045', '0', '0', '99240.00',  '99240.00', '0', '99240', '1', '2026-10-07 13:58:39', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=50
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01552', '50', '8', '1552', '15', '637', '9555.00', '0', '', '2026-10-07 13:58:39', '1552','','','0','0','0','0','0',null,'637','9555','0','0','0','0','0','0','0','0','1'); -- id=294
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:57:12', 1, 1552, 0, 0
                    , 637, 15, 0, 0, 1, '2026-10-07 13:58:39')
                ON DUPLICATE KEY UPDATE buyprice = 637,
                        buyQuantity =buyQuantity+15, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 13:58:39' ; -- id=370
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1552', '637', '15', '0', 'buyBillController.php', '294', '', '0', '0'); -- id=252
UPDATE product SET  productBuyPrice = "637" WHERE productId = 1552 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 294 ;
UPDATE product SET productName = 'الدولي جينز 573', productDescription = '', productCatId = '8', productBuyPrice = '637.00', productSellAllPrice = '665.00', productSellUnitPrice = '665.00', productSellHalfPrice = '665.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01552',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '637',lastbuyprice_withDiscount = '637',meanbuyprice = '637',meanbuyprice_withDiscount = '637' , productbuypricereal = '637.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.40' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='637',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='637',meanbuyprice_withTax='637',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='637',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1552';
UPDATE buybilldetail SET  lastbuyprice = 637 , meanbuyprice = 637, lastbuyprice_withDiscount = 637, meanbuyprice_withDiscount = 637
        , lastbuyprice_withTax = 637, meanbuyprice_withTax = 637, lastbuyprice_withDiscountAndTax = 637
                where buybilldetailid = 294;
UPDATE productunit SET proUnitBuyPrice  = 637 * productnumber WHERE productid = 1552;
UPDATE storedetail SET  productquantity = '15', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1577';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1552', '1', '15', '0', '50', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '15', '1', '2026-10-07 13:57:12','0','0'); -- id=2621
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01553', '50', '8', '1553', '25', '572', '14300.00', '0', '', '2026-10-07 13:58:39', '1553','','','0','0','0','0','0',null,'572','14300','0','0','0','0','0','0','0','0','1'); -- id=295
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:57:12', 1, 1553, 0, 0
                    , 572, 25, 0, 0, 1, '2026-10-07 13:58:39')
                ON DUPLICATE KEY UPDATE buyprice = 572,
                        buyQuantity =buyQuantity+25, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 13:58:39' ; -- id=371
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1553', '572', '25', '0', 'buyBillController.php', '295', '', '0', '0'); -- id=253
UPDATE product SET  productBuyPrice = "572" WHERE productId = 1553 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 295 ;
UPDATE product SET productName = 'الدولي جينز 614', productDescription = '', productCatId = '8', productBuyPrice = '572.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01553',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '572',lastbuyprice_withDiscount = '572',meanbuyprice = '572',meanbuyprice_withDiscount = '572' , productbuypricereal = '572.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.90' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='572',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='572',meanbuyprice_withTax='572',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='572',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1553';
UPDATE buybilldetail SET  lastbuyprice = 572 , meanbuyprice = 572, lastbuyprice_withDiscount = 572, meanbuyprice_withDiscount = 572
        , lastbuyprice_withTax = 572, meanbuyprice_withTax = 572, lastbuyprice_withDiscountAndTax = 572
                where buybilldetailid = 295;
UPDATE productunit SET proUnitBuyPrice  = 572 * productnumber WHERE productid = 1553;
UPDATE storedetail SET  productquantity = '25', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1578';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1553', '1', '25', '0', '50', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '25', '1', '2026-10-07 13:57:12','0','0'); -- id=2622
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01554', '50', '8', '1554', '25', '532', '13300.00', '0', '', '2026-10-07 13:58:39', '1554','','','0','0','0','0','0',null,'532','13300','0','0','0','0','0','0','0','0','1'); -- id=296
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:57:12', 1, 1554, 0, 0
                    , 532, 25, 0, 0, 1, '2026-10-07 13:58:39')
                ON DUPLICATE KEY UPDATE buyprice = 532,
                        buyQuantity =buyQuantity+25, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 13:58:39' ; -- id=372
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1554', '532', '25', '0', 'buyBillController.php', '296', '', '0', '0'); -- id=254
UPDATE product SET  productBuyPrice = "532" WHERE productId = 1554 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 296 ;
UPDATE product SET productName = 'الدولي جينز 612', productDescription = '', productCatId = '8', productBuyPrice = '532.00', productSellAllPrice = '560.00', productSellUnitPrice = '560.00', productSellHalfPrice = '560.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01554',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '532',lastbuyprice_withDiscount = '532',meanbuyprice = '532',meanbuyprice_withDiscount = '532' , productbuypricereal = '532.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '5.26' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='532',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='532',meanbuyprice_withTax='532',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='532',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1554';
UPDATE buybilldetail SET  lastbuyprice = 532 , meanbuyprice = 532, lastbuyprice_withDiscount = 532, meanbuyprice_withDiscount = 532
        , lastbuyprice_withTax = 532, meanbuyprice_withTax = 532, lastbuyprice_withDiscountAndTax = 532
                where buybilldetailid = 296;
UPDATE productunit SET proUnitBuyPrice  = 532 * productnumber WHERE productid = 1554;
UPDATE storedetail SET  productquantity = '25', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1579';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1554', '1', '25', '0', '50', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '25', '1', '2026-10-07 13:57:12','0','0'); -- id=2623
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01555', '50', '8', '1555', '20', '457', '9140.00', '0', '', '2026-10-07 13:58:39', '1555','','','0','0','0','0','0',null,'457','9140','0','0','0','0','0','0','0','0','1'); -- id=297
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:57:12', 1, 1555, 0, 0
                    , 457, 20, 0, 0, 1, '2026-10-07 13:58:39')
                ON DUPLICATE KEY UPDATE buyprice = 457,
                        buyQuantity =buyQuantity+20, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 13:58:39' ; -- id=373
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1555', '457', '20', '0', 'buyBillController.php', '297', '', '0', '0'); -- id=255
UPDATE product SET  productBuyPrice = "457" WHERE productId = 1555 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 297 ;
UPDATE product SET productName = 'الدولي جينز 615', productDescription = '', productCatId = '8', productBuyPrice = '457.00', productSellAllPrice = '485.00', productSellUnitPrice = '485.00', productSellHalfPrice = '485.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01555',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '457',lastbuyprice_withDiscount = '457',meanbuyprice = '457',meanbuyprice_withDiscount = '457' , productbuypricereal = '457.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.13' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='457',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='457',meanbuyprice_withTax='457',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='457',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1555';
UPDATE buybilldetail SET  lastbuyprice = 457 , meanbuyprice = 457, lastbuyprice_withDiscount = 457, meanbuyprice_withDiscount = 457
        , lastbuyprice_withTax = 457, meanbuyprice_withTax = 457, lastbuyprice_withDiscountAndTax = 457
                where buybilldetailid = 297;
UPDATE productunit SET proUnitBuyPrice  = 457 * productnumber WHERE productid = 1555;
UPDATE storedetail SET  productquantity = '20', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1580';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1555', '1', '20', '0', '50', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '20', '1', '2026-10-07 13:57:12','0','0'); -- id=2624
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01556', '50', '8', '1556', '25', '637', '15925.00', '0', '', '2026-10-07 13:58:39', '1556','','','0','0','0','0','0',null,'637','15925','0','0','0','0','0','0','0','0','1'); -- id=298
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:57:12', 1, 1556, 0, 0
                    , 637, 25, 0, 0, 1, '2026-10-07 13:58:39')
                ON DUPLICATE KEY UPDATE buyprice = 637,
                        buyQuantity =buyQuantity+25, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 13:58:39' ; -- id=374
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1556', '637', '25', '0', 'buyBillController.php', '298', '', '0', '0'); -- id=256
UPDATE product SET  productBuyPrice = "637" WHERE productId = 1556 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 298 ;
UPDATE product SET productName = 'الدولي جينز 611', productDescription = '', productCatId = '8', productBuyPrice = '637.00', productSellAllPrice = '665.00', productSellUnitPrice = '665.00', productSellHalfPrice = '665.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01556',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '637',lastbuyprice_withDiscount = '637',meanbuyprice = '637',meanbuyprice_withDiscount = '637' , productbuypricereal = '637.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.40' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='637',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='637',meanbuyprice_withTax='637',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='637',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1556';
UPDATE buybilldetail SET  lastbuyprice = 637 , meanbuyprice = 637, lastbuyprice_withDiscount = 637, meanbuyprice_withDiscount = 637
        , lastbuyprice_withTax = 637, meanbuyprice_withTax = 637, lastbuyprice_withDiscountAndTax = 637
                where buybilldetailid = 298;
UPDATE productunit SET proUnitBuyPrice  = 637 * productnumber WHERE productid = 1556;
UPDATE storedetail SET  productquantity = '25', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1581';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1556', '1', '25', '0', '50', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '25', '1', '2026-10-07 13:57:12','0','0'); -- id=2625
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01557', '50', '8', '1557', '20', '617', '12340.00', '0', '', '2026-10-07 13:58:39', '1557','','','0','0','0','0','0',null,'617','12340','0','0','0','0','0','0','0','0','1'); -- id=299
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:57:12', 1, 1557, 0, 0
                    , 617, 20, 0, 0, 1, '2026-10-07 13:58:39')
                ON DUPLICATE KEY UPDATE buyprice = 617,
                        buyQuantity =buyQuantity+20, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 13:58:39' ; -- id=375
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1557', '617', '20', '0', 'buyBillController.php', '299', '', '0', '0'); -- id=257
UPDATE product SET  productBuyPrice = "617" WHERE productId = 1557 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 299 ;
UPDATE product SET productName = 'الدولي جينز 616', productDescription = '', productCatId = '8', productBuyPrice = '617.00', productSellAllPrice = '645.00', productSellUnitPrice = '645.00', productSellHalfPrice = '645.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01557',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '617',lastbuyprice_withDiscount = '617',meanbuyprice = '617',meanbuyprice_withDiscount = '617' , productbuypricereal = '617.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.54' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='617',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='617',meanbuyprice_withTax='617',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='617',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1557';
UPDATE buybilldetail SET  lastbuyprice = 617 , meanbuyprice = 617, lastbuyprice_withDiscount = 617, meanbuyprice_withDiscount = 617
        , lastbuyprice_withTax = 617, meanbuyprice_withTax = 617, lastbuyprice_withDiscountAndTax = 617
                where buybilldetailid = 299;
UPDATE productunit SET proUnitBuyPrice  = 617 * productnumber WHERE productid = 1557;
UPDATE storedetail SET  productquantity = '20', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1582';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1557', '1', '20', '0', '50', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '20', '1', '2026-10-07 13:57:12','0','0'); -- id=2626
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01558', '50', '8', '1558', '20', '657', '13140.00', '0', '', '2026-10-07 13:58:39', '1558','','','0','0','0','0','0',null,'657','13140','0','0','0','0','0','0','0','0','1'); -- id=300
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:57:12', 1, 1558, 0, 0
                    , 657, 20, 0, 0, 1, '2026-10-07 13:58:39')
                ON DUPLICATE KEY UPDATE buyprice = 657,
                        buyQuantity =buyQuantity+20, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 13:58:39' ; -- id=376
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1558', '657', '20', '0', 'buyBillController.php', '300', '', '0', '0'); -- id=258
UPDATE product SET  productBuyPrice = "657" WHERE productId = 1558 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 300 ;
UPDATE product SET productName = 'الدولي جينز 617', productDescription = '', productCatId = '8', productBuyPrice = '657.00', productSellAllPrice = '685.00', productSellUnitPrice = '685.00', productSellHalfPrice = '685.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01558',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '657',lastbuyprice_withDiscount = '657',meanbuyprice = '657',meanbuyprice_withDiscount = '657' , productbuypricereal = '657.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.26' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='657',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='657',meanbuyprice_withTax='657',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='657',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1558';
UPDATE buybilldetail SET  lastbuyprice = 657 , meanbuyprice = 657, lastbuyprice_withDiscount = 657, meanbuyprice_withDiscount = 657
        , lastbuyprice_withTax = 657, meanbuyprice_withTax = 657, lastbuyprice_withDiscountAndTax = 657
                where buybilldetailid = 300;
UPDATE productunit SET proUnitBuyPrice  = 657 * productnumber WHERE productid = 1558;
UPDATE storedetail SET  productquantity = '20', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1583';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1558', '1', '20', '0', '50', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '20', '1', '2026-10-07 13:57:12','0','0'); -- id=2627
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01559', '50', '8', '1559', '20', '577', '11540.00', '0', '', '2026-10-07 13:58:39', '1559','','','0','0','0','0','0',null,'577','11540','0','0','0','0','0','0','0','0','1'); -- id=301
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:57:12', 1, 1559, 0, 0
                    , 577, 20, 0, 0, 1, '2026-10-07 13:58:39')
                ON DUPLICATE KEY UPDATE buyprice = 577,
                        buyQuantity =buyQuantity+20, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 13:58:39' ; -- id=377
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1559', '577', '20', '0', 'buyBillController.php', '301', '', '0', '0'); -- id=259
UPDATE product SET  productBuyPrice = "577" WHERE productId = 1559 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 301 ;
UPDATE product SET productName = 'الدولي جينز 618', productDescription = '', productCatId = '8', productBuyPrice = '577.00', productSellAllPrice = '605.00', productSellUnitPrice = '605.00', productSellHalfPrice = '605.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01559',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '577',lastbuyprice_withDiscount = '577',meanbuyprice = '577',meanbuyprice_withDiscount = '577' , productbuypricereal = '577.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.85' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='577',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='577',meanbuyprice_withTax='577',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='577',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1559';
UPDATE buybilldetail SET  lastbuyprice = 577 , meanbuyprice = 577, lastbuyprice_withDiscount = 577, meanbuyprice_withDiscount = 577
        , lastbuyprice_withTax = 577, meanbuyprice_withTax = 577, lastbuyprice_withDiscountAndTax = 577
                where buybilldetailid = 301;
UPDATE productunit SET proUnitBuyPrice  = 577 * productnumber WHERE productid = 1559;
UPDATE storedetail SET  productquantity = '20', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1584';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1559', '1', '20', '0', '50', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '20', '1', '2026-10-07 13:57:12','0','0'); -- id=2628
UPDATE supplier SET  suppliercurrentDebt = '884045',suppliercurrentDebtInCurrency= '884045' , userid = '1', supplierdate = '2026-10-07 13:58:39'   WHERE supplierid = '26';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('26', '784805.00', '99240', '0', 'اضافة فاتورة مشتريات', '50', '884045', '2026-10-07 13:57:12', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','99240','1','784805','99240','884045','0',''); -- id=194
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '99240', '99240', '2026-10-07', '1', '0', '0', '2026-10-07 13:58:39','اضافة فاتورة مشتريات رقم 50','1','0',null,'0','50','buyBillController.php?do=details&id=50'); -- id=1250
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1250', '382', '99240', '','0'); -- id=1258
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17460240.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1250', '445', '99240', '','0'); -- id=1250
UPDATE accountstree SET name = 'الدولي - مورد', customName = 'الدولي - مورد', customNameEn = 'الدولي - مورد', nameEn = 'الدولي - مورد', parent = '81', accountNature = '1', theValue = '75250', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '445';
update buybill set dailyentryid='1250,0' where buybillid=50;
COMMIT;
UPDATE product SET overAllAveragePrice = 637 WHERE productId = 1552;UPDATE product SET overAllAveragePrice = 572 WHERE productId = 1553;UPDATE product SET overAllAveragePrice = 532 WHERE productId = 1554;UPDATE product SET overAllAveragePrice = 457 WHERE productId = 1555;UPDATE product SET overAllAveragePrice = 637 WHERE productId = 1556;UPDATE product SET overAllAveragePrice = 617 WHERE productId = 1557;UPDATE product SET overAllAveragePrice = 657 WHERE productId = 1558;UPDATE product SET overAllAveragePrice = 577 WHERE productId = 1559;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:28:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:58:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 13:58:40', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=50'); -- id=3777
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:28:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 13:58:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 13:58:42', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=50&type=2'); -- id=3778
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:32:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:02:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:02:21', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3779
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:32:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:02:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:02:32', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3780
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:32:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:02:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:02:38', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3781
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:35:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:05:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:05:42', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3782
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فولكانو جينز 703','','28','610','630','630','630','2026-10-07','0','1','0','','0','0','0','0','0','610','610','610','610','610','0','3.28','3.28','0','.','0','0','0','610','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','610','610','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','610','0','0','0','0','0','0','','','0','0','0','0'); -- id=1560
UPDATE product SET productName = 'فولكانو جينز 703', productDescription = '', productCatId = '28', productBuyPrice = '610', productSellAllPrice = '630', productSellUnitPrice = '630', productSellHalfPrice = '630', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01560',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '610',lastbuyprice_withDiscount = '610',meanbuyprice = '610',meanbuyprice_withDiscount = '610' , productbuypricereal = '610' , buypricereal_precentage = '0' , buytotal_precentage = '3.28' , buyhalf_precentage = '3.28' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='610',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='610',meanbuyprice_withTax='610',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='610',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1560';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1560', '1', '2026-10-07', '1', '0','0156001','630','630','630','610','','0','0','0','0','0','0','0','0','0','0'); -- id=1560
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1560', '1', '0', '1', '2026-10-07'); -- id=1585
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1560', '1', '0', '0', '1560', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2629
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1560, 1,'2026-10-07 14:05:42',1)
                ON DUPLICATE KEY UPDATE productid = 1560, edited = 1, sysdate = '2026-10-07 14:05:42', userid = 1; -- id=2375
UPDATE product SET productName = 'فولكانو جينز 703', productDescription = '', productCatId = '28', productBuyPrice = '610.00', productSellAllPrice = '630.00', productSellUnitPrice = '630.00', productSellHalfPrice = '630.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01560',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '610',lastbuyprice_withDiscount = '610',meanbuyprice = '610',meanbuyprice_withDiscount = '610' , productbuypricereal = '610' , buypricereal_precentage = '0' , buytotal_precentage = '3.28' , buyhalf_precentage = '3.28' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='610',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='610',meanbuyprice_withTax='610',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='610',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1560';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فولكانو جينز 724','','28','680','700','700','700','2026-10-07','0','1','0','','0','0','0','0','0','680','680','680','680','680','0','2.94','0','0','.','0','0','0','680','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','680','680','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','680','0','0','0','0','0','0','','','0','0','0','0'); -- id=1561
UPDATE product SET productName = 'فولكانو جينز 724', productDescription = '', productCatId = '28', productBuyPrice = '680', productSellAllPrice = '700', productSellUnitPrice = '700', productSellHalfPrice = '700', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '32389',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '680',lastbuyprice_withDiscount = '680',meanbuyprice = '680',meanbuyprice_withDiscount = '680' , productbuypricereal = '680' , buypricereal_precentage = '0' , buytotal_precentage = '2.94' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='680',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='680',meanbuyprice_withTax='680',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='680',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1561';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1561', '1', '2026-10-07', '1', '0','0156101','700','700','700','680','','0','0','0','0','0','0','0','0','0','0'); -- id=1561
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1561', '1', '0', '1', '2026-10-07'); -- id=1586
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1561', '1', '0', '0', '1561', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2630
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1561, 1,'2026-10-07 14:05:42',1)
                ON DUPLICATE KEY UPDATE productid = 1561, edited = 1, sysdate = '2026-10-07 14:05:42', userid = 1; -- id=2376
UPDATE product SET productName = 'فولكانو جينز 724', productDescription = '', productCatId = '28', productBuyPrice = '680.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '32389',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '680',lastbuyprice_withDiscount = '680',meanbuyprice = '680',meanbuyprice_withDiscount = '680' , productbuypricereal = '680' , buypricereal_precentage = '0' , buytotal_precentage = '2.94' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='680',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='680',meanbuyprice_withTax='680',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='680',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1561';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فولكانو جينز 728','','28','680','700','700','700','2026-10-07','0','1','0','','0','0','0','0','0','680','680','680','680','680','0','2.94','0','0','.','0','0','0','680','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','680','680','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','680','0','0','0','0','0','0','','','0','0','0','0'); -- id=1562
UPDATE product SET productName = 'فولكانو جينز 728', productDescription = '', productCatId = '28', productBuyPrice = '680', productSellAllPrice = '700', productSellUnitPrice = '700', productSellHalfPrice = '700', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '87559',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '680',lastbuyprice_withDiscount = '680',meanbuyprice = '680',meanbuyprice_withDiscount = '680' , productbuypricereal = '680' , buypricereal_precentage = '0' , buytotal_precentage = '2.94' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='680',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='680',meanbuyprice_withTax='680',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='680',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1562';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1562', '1', '2026-10-07', '1', '0','0156201','700','700','700','680','','0','0','0','0','0','0','0','0','0','0'); -- id=1562
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1562', '1', '0', '1', '2026-10-07'); -- id=1587
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1562', '1', '0', '0', '1562', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2631
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1562, 1,'2026-10-07 14:05:42',1)
                ON DUPLICATE KEY UPDATE productid = 1562, edited = 1, sysdate = '2026-10-07 14:05:42', userid = 1; -- id=2377
UPDATE product SET productName = 'فولكانو جينز 728', productDescription = '', productCatId = '28', productBuyPrice = '680.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '87559',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '680',lastbuyprice_withDiscount = '680',meanbuyprice = '680',meanbuyprice_withDiscount = '680' , productbuypricereal = '680' , buypricereal_precentage = '0' , buytotal_precentage = '2.94' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='680',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='680',meanbuyprice_withTax='680',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='680',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1562';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فولكانو جينز 726','','28','650','670','670','670','2026-10-07','0','1','0','','0','0','0','0','0','650','650','650','650','650','0','3.08','0','0','.','0','0','0','650','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','650','650','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','650','0','0','0','0','0','0','','','0','0','0','0'); -- id=1563
UPDATE product SET productName = 'فولكانو جينز 726', productDescription = '', productCatId = '28', productBuyPrice = '650', productSellAllPrice = '670', productSellUnitPrice = '670', productSellHalfPrice = '670', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01563',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650',lastbuyprice_withDiscount = '650',meanbuyprice = '650',meanbuyprice_withDiscount = '650' , productbuypricereal = '650' , buypricereal_precentage = '0' , buytotal_precentage = '3.08' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1563';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1563', '1', '2026-10-07', '1', '0','0156301','670','670','670','650','','0','0','0','0','0','0','0','0','0','0'); -- id=1563
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1563', '1', '0', '1', '2026-10-07'); -- id=1588
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1563', '1', '0', '0', '1563', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2632
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1563, 1,'2026-10-07 14:05:42',1)
                ON DUPLICATE KEY UPDATE productid = 1563, edited = 1, sysdate = '2026-10-07 14:05:42', userid = 1; -- id=2378
UPDATE product SET productName = 'فولكانو جينز 726', productDescription = '', productCatId = '28', productBuyPrice = '650.00', productSellAllPrice = '670.00', productSellUnitPrice = '670.00', productSellHalfPrice = '670.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01563',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650',lastbuyprice_withDiscount = '650',meanbuyprice = '650',meanbuyprice_withDiscount = '650' , productbuypricereal = '650' , buypricereal_precentage = '0' , buytotal_precentage = '3.08' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1563';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فولكانو جينز 727','','28','730','750','750','750','2026-10-07','0','1','0','','0','0','0','0','0','730','730','730','730','730','0','2.74','0','0','.','0','0','0','730','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','730','730','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','730','0','0','0','0','0','0','','','0','0','0','0'); -- id=1564
UPDATE product SET productName = 'فولكانو جينز 727', productDescription = '', productCatId = '28', productBuyPrice = '730', productSellAllPrice = '750', productSellUnitPrice = '750', productSellHalfPrice = '750', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01564',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '730',lastbuyprice_withDiscount = '730',meanbuyprice = '730',meanbuyprice_withDiscount = '730' , productbuypricereal = '730' , buypricereal_precentage = '0' , buytotal_precentage = '2.74' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='730',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='730',meanbuyprice_withTax='730',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='730',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1564';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1564', '1', '2026-10-07', '1', '0','0156401','750','750','750','730','','0','0','0','0','0','0','0','0','0','0'); -- id=1564
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1564', '1', '0', '1', '2026-10-07'); -- id=1589
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1564', '1', '0', '0', '1564', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2633
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1564, 1,'2026-10-07 14:05:42',1)
                ON DUPLICATE KEY UPDATE productid = 1564, edited = 1, sysdate = '2026-10-07 14:05:42', userid = 1; -- id=2379
UPDATE product SET productName = 'فولكانو جينز 727', productDescription = '', productCatId = '28', productBuyPrice = '730.00', productSellAllPrice = '750.00', productSellUnitPrice = '750.00', productSellHalfPrice = '750.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01564',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '730',lastbuyprice_withDiscount = '730',meanbuyprice = '730',meanbuyprice_withDiscount = '730' , productbuypricereal = '730' , buypricereal_precentage = '0' , buytotal_precentage = '2.74' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='730',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='730',meanbuyprice_withTax='730',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='730',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1564';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فولكانو جينز 1549','','28','580','600','600','600','2026-10-07','0','1','0','','0','0','0','0','0','580','580','580','580','580','0','3.45','0','0','.','0','0','0','580','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','580','580','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','580','0','0','0','0','0','0','','','0','0','0','0'); -- id=1565
UPDATE product SET productName = 'فولكانو جينز 1549', productDescription = '', productCatId = '28', productBuyPrice = '580', productSellAllPrice = '600', productSellUnitPrice = '600', productSellHalfPrice = '600', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01565',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '3.45' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1565';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1565', '1', '2026-10-07', '1', '0','0156501','600','600','600','580','','0','0','0','0','0','0','0','0','0','0'); -- id=1565
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1565', '1', '0', '1', '2026-10-07'); -- id=1590
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1565', '1', '0', '0', '1565', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2634
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1565, 1,'2026-10-07 14:05:42',1)
                ON DUPLICATE KEY UPDATE productid = 1565, edited = 1, sysdate = '2026-10-07 14:05:42', userid = 1; -- id=2380
UPDATE product SET productName = 'فولكانو جينز 1549', productDescription = '', productCatId = '28', productBuyPrice = '580.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01565',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '3.45' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1565';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فولكانو جينز 1553','','28','600','620','620','620','2026-10-07','0','1','0','','0','0','0','0','0','600','600','600','600','600','0','3.33','0','0','.','0','0','0','600','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','600','600','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','600','0','0','0','0','0','0','','','0','0','0','0'); -- id=1566
UPDATE product SET productName = 'فولكانو جينز 1553', productDescription = '', productCatId = '28', productBuyPrice = '600', productSellAllPrice = '620', productSellUnitPrice = '620', productSellHalfPrice = '620', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01566',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '3.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1566';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1566', '1', '2026-10-07', '1', '0','0156601','620','620','620','600','','0','0','0','0','0','0','0','0','0','0'); -- id=1566
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1566', '1', '0', '1', '2026-10-07'); -- id=1591
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1566', '1', '0', '0', '1566', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2635
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1566, 1,'2026-10-07 14:05:42',1)
                ON DUPLICATE KEY UPDATE productid = 1566, edited = 1, sysdate = '2026-10-07 14:05:42', userid = 1; -- id=2381
UPDATE product SET productName = 'فولكانو جينز 1553', productDescription = '', productCatId = '28', productBuyPrice = '600.00', productSellAllPrice = '620.00', productSellUnitPrice = '620.00', productSellHalfPrice = '620.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01566',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '3.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1566';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فولكانو جينز 1319','','28','540','560','560','560','2026-10-07','0','1','0','','0','0','0','0','0','540','540','540','540','540','0','3.7','0','0','.','0','0','0','540','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','540','540','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','540','0','0','0','0','0','0','','','0','0','0','0'); -- id=1567
UPDATE product SET productName = 'فولكانو جينز 1319', productDescription = '', productCatId = '28', productBuyPrice = '540', productSellAllPrice = '560', productSellUnitPrice = '560', productSellHalfPrice = '560', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01567',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '540',lastbuyprice_withDiscount = '540',meanbuyprice = '540',meanbuyprice_withDiscount = '540' , productbuypricereal = '540' , buypricereal_precentage = '0' , buytotal_precentage = '3.7' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='540',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='540',meanbuyprice_withTax='540',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='540',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1567';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1567', '1', '2026-10-07', '1', '0','0156701','560','560','560','540','','0','0','0','0','0','0','0','0','0','0'); -- id=1567
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1567', '1', '0', '1', '2026-10-07'); -- id=1592
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1567', '1', '0', '0', '1567', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2636
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1567, 1,'2026-10-07 14:05:42',1)
                ON DUPLICATE KEY UPDATE productid = 1567, edited = 1, sysdate = '2026-10-07 14:05:42', userid = 1; -- id=2382
UPDATE product SET productName = 'فولكانو جينز 1319', productDescription = '', productCatId = '28', productBuyPrice = '540.00', productSellAllPrice = '560.00', productSellUnitPrice = '560.00', productSellHalfPrice = '560.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01567',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '540',lastbuyprice_withDiscount = '540',meanbuyprice = '540',meanbuyprice_withDiscount = '540' , productbuypricereal = '540' , buypricereal_precentage = '0' , buytotal_precentage = '3.7' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='540',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='540',meanbuyprice_withTax='540',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='540',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1567';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:35:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:05:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:05:44', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3783
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:35:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:05:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:05:47', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3784
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:37:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:07:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:07:34', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3785
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac6278b3d38a', '2026-10-07 14:05:47', '20', '370530.00', '440530', '0', '0', '70000.00',  '70000.00', '0', '70000', '1', '2026-10-07 14:07:34', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=51
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01560', '51', '28', '1560', '10', '610', '6100.00', '0', '', '2026-10-07 14:07:34', '1560','','','0','0','0','0','0',null,'610','6100','0','0','0','0','0','0','0','0','1'); -- id=302
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:05:47', 1, 1560, 0, 0
                    , 610, 10, 0, 0, 1, '2026-10-07 14:07:34')
                ON DUPLICATE KEY UPDATE buyprice = 610,
                        buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:07:34' ; -- id=378
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1560', '610', '10', '0', 'buyBillController.php', '302', '', '0', '0'); -- id=260
UPDATE product SET  productBuyPrice = "610" WHERE productId = 1560 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 302 ;
UPDATE product SET productName = 'فولكانو جينز 703', productDescription = '', productCatId = '28', productBuyPrice = '610.00', productSellAllPrice = '630.00', productSellUnitPrice = '630.00', productSellHalfPrice = '630.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01560',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '610',lastbuyprice_withDiscount = '610',meanbuyprice = '610',meanbuyprice_withDiscount = '610' , productbuypricereal = '610.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.28' , buyhalf_precentage = '3.28' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='610',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='610',meanbuyprice_withTax='610',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='610',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1560';
UPDATE buybilldetail SET  lastbuyprice = 610 , meanbuyprice = 610, lastbuyprice_withDiscount = 610, meanbuyprice_withDiscount = 610
        , lastbuyprice_withTax = 610, meanbuyprice_withTax = 610, lastbuyprice_withDiscountAndTax = 610
                where buybilldetailid = 302;
UPDATE productunit SET proUnitBuyPrice  = 610 * productnumber WHERE productid = 1560;
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1585';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1560', '1', '10', '0', '51', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '10', '1', '2026-10-07 14:05:47','0','0'); -- id=2637
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('32389', '51', '28', '1561', '10', '680', '6800.00', '0', '', '2026-10-07 14:07:34', '1561','','','0','0','0','0','0',null,'680','6800','0','0','0','0','0','0','0','0','1'); -- id=303
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:05:47', 1, 1561, 0, 0
                    , 680, 10, 0, 0, 1, '2026-10-07 14:07:34')
                ON DUPLICATE KEY UPDATE buyprice = 680,
                        buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:07:34' ; -- id=379
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1561', '680', '10', '0', 'buyBillController.php', '303', '', '0', '0'); -- id=261
UPDATE product SET  productBuyPrice = "680" WHERE productId = 1561 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 303 ;
UPDATE product SET productName = 'فولكانو جينز 724', productDescription = '', productCatId = '28', productBuyPrice = '680.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '32389',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '680',lastbuyprice_withDiscount = '680',meanbuyprice = '680',meanbuyprice_withDiscount = '680' , productbuypricereal = '680.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '2.94' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='680',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='680',meanbuyprice_withTax='680',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='680',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1561';
UPDATE buybilldetail SET  lastbuyprice = 680 , meanbuyprice = 680, lastbuyprice_withDiscount = 680, meanbuyprice_withDiscount = 680
        , lastbuyprice_withTax = 680, meanbuyprice_withTax = 680, lastbuyprice_withDiscountAndTax = 680
                where buybilldetailid = 303;
UPDATE productunit SET proUnitBuyPrice  = 680 * productnumber WHERE productid = 1561;
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1586';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1561', '1', '10', '0', '51', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '10', '1', '2026-10-07 14:05:47','0','0'); -- id=2638
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('87559', '51', '28', '1562', '20', '680', '13600.00', '0', '', '2026-10-07 14:07:34', '1562','','','0','0','0','0','0',null,'680','13600','0','0','0','0','0','0','0','0','1'); -- id=304
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:05:47', 1, 1562, 0, 0
                    , 680, 20, 0, 0, 1, '2026-10-07 14:07:34')
                ON DUPLICATE KEY UPDATE buyprice = 680,
                        buyQuantity =buyQuantity+20, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:07:34' ; -- id=380
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1562', '680', '20', '0', 'buyBillController.php', '304', '', '0', '0'); -- id=262
UPDATE product SET  productBuyPrice = "680" WHERE productId = 1562 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 304 ;
UPDATE product SET productName = 'فولكانو جينز 728', productDescription = '', productCatId = '28', productBuyPrice = '680.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '87559',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '680',lastbuyprice_withDiscount = '680',meanbuyprice = '680',meanbuyprice_withDiscount = '680' , productbuypricereal = '680.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '2.94' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='680',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='680',meanbuyprice_withTax='680',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='680',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1562';
UPDATE buybilldetail SET  lastbuyprice = 680 , meanbuyprice = 680, lastbuyprice_withDiscount = 680, meanbuyprice_withDiscount = 680
        , lastbuyprice_withTax = 680, meanbuyprice_withTax = 680, lastbuyprice_withDiscountAndTax = 680
                where buybilldetailid = 304;
UPDATE productunit SET proUnitBuyPrice  = 680 * productnumber WHERE productid = 1562;
UPDATE storedetail SET  productquantity = '20', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1587';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1562', '1', '20', '0', '51', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '20', '1', '2026-10-07 14:05:47','0','0'); -- id=2639
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01563', '51', '28', '1563', '20', '650', '13000.00', '0', '', '2026-10-07 14:07:34', '1563','','','0','0','0','0','0',null,'650','13000','0','0','0','0','0','0','0','0','1'); -- id=305
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:05:47', 1, 1563, 0, 0
                    , 650, 20, 0, 0, 1, '2026-10-07 14:07:34')
                ON DUPLICATE KEY UPDATE buyprice = 650,
                        buyQuantity =buyQuantity+20, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:07:34' ; -- id=381
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1563', '650', '20', '0', 'buyBillController.php', '305', '', '0', '0'); -- id=263
UPDATE product SET  productBuyPrice = "650" WHERE productId = 1563 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 305 ;
UPDATE product SET productName = 'فولكانو جينز 726', productDescription = '', productCatId = '28', productBuyPrice = '650.00', productSellAllPrice = '670.00', productSellUnitPrice = '670.00', productSellHalfPrice = '670.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01563',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650',lastbuyprice_withDiscount = '650',meanbuyprice = '650',meanbuyprice_withDiscount = '650' , productbuypricereal = '650.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.08' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1563';
UPDATE buybilldetail SET  lastbuyprice = 650 , meanbuyprice = 650, lastbuyprice_withDiscount = 650, meanbuyprice_withDiscount = 650
        , lastbuyprice_withTax = 650, meanbuyprice_withTax = 650, lastbuyprice_withDiscountAndTax = 650
                where buybilldetailid = 305;
UPDATE productunit SET proUnitBuyPrice  = 650 * productnumber WHERE productid = 1563;
UPDATE storedetail SET  productquantity = '20', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1588';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1563', '1', '20', '0', '51', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '20', '1', '2026-10-07 14:05:47','0','0'); -- id=2640
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01564', '51', '28', '1564', '10', '730', '7300.00', '0', '', '2026-10-07 14:07:34', '1564','','','0','0','0','0','0',null,'730','7300','0','0','0','0','0','0','0','0','1'); -- id=306
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:05:47', 1, 1564, 0, 0
                    , 730, 10, 0, 0, 1, '2026-10-07 14:07:34')
                ON DUPLICATE KEY UPDATE buyprice = 730,
                        buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:07:34' ; -- id=382
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1564', '730', '10', '0', 'buyBillController.php', '306', '', '0', '0'); -- id=264
UPDATE product SET  productBuyPrice = "730" WHERE productId = 1564 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 306 ;
UPDATE product SET productName = 'فولكانو جينز 727', productDescription = '', productCatId = '28', productBuyPrice = '730.00', productSellAllPrice = '750.00', productSellUnitPrice = '750.00', productSellHalfPrice = '750.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01564',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '730',lastbuyprice_withDiscount = '730',meanbuyprice = '730',meanbuyprice_withDiscount = '730' , productbuypricereal = '730.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '2.74' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='730',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='730',meanbuyprice_withTax='730',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='730',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1564';
UPDATE buybilldetail SET  lastbuyprice = 730 , meanbuyprice = 730, lastbuyprice_withDiscount = 730, meanbuyprice_withDiscount = 730
        , lastbuyprice_withTax = 730, meanbuyprice_withTax = 730, lastbuyprice_withDiscountAndTax = 730
                where buybilldetailid = 306;
UPDATE productunit SET proUnitBuyPrice  = 730 * productnumber WHERE productid = 1564;
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1589';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1564', '1', '10', '0', '51', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '10', '1', '2026-10-07 14:05:47','0','0'); -- id=2641
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01565', '51', '28', '1565', '10', '580', '5800.00', '0', '', '2026-10-07 14:07:34', '1565','','','0','0','0','0','0',null,'580','5800','0','0','0','0','0','0','0','0','1'); -- id=307
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:05:47', 1, 1565, 0, 0
                    , 580, 10, 0, 0, 1, '2026-10-07 14:07:34')
                ON DUPLICATE KEY UPDATE buyprice = 580,
                        buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:07:34' ; -- id=383
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1565', '580', '10', '0', 'buyBillController.php', '307', '', '0', '0'); -- id=265
UPDATE product SET  productBuyPrice = "580" WHERE productId = 1565 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 307 ;
UPDATE product SET productName = 'فولكانو جينز 1549', productDescription = '', productCatId = '28', productBuyPrice = '580.00', productSellAllPrice = '600.00', productSellUnitPrice = '600.00', productSellHalfPrice = '600.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01565',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.45' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1565';
UPDATE buybilldetail SET  lastbuyprice = 580 , meanbuyprice = 580, lastbuyprice_withDiscount = 580, meanbuyprice_withDiscount = 580
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 580
                where buybilldetailid = 307;
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1565;
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1590';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1565', '1', '10', '0', '51', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '10', '1', '2026-10-07 14:05:47','0','0'); -- id=2642
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01566', '51', '28', '1566', '20', '600', '12000.00', '0', '', '2026-10-07 14:07:34', '1566','','','0','0','0','0','0',null,'600','12000','0','0','0','0','0','0','0','0','1'); -- id=308
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:05:47', 1, 1566, 0, 0
                    , 600, 20, 0, 0, 1, '2026-10-07 14:07:34')
                ON DUPLICATE KEY UPDATE buyprice = 600,
                        buyQuantity =buyQuantity+20, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:07:34' ; -- id=384
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1566', '600', '20', '0', 'buyBillController.php', '308', '', '0', '0'); -- id=266
UPDATE product SET  productBuyPrice = "600" WHERE productId = 1566 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 308 ;
UPDATE product SET productName = 'فولكانو جينز 1553', productDescription = '', productCatId = '28', productBuyPrice = '600.00', productSellAllPrice = '620.00', productSellUnitPrice = '620.00', productSellHalfPrice = '620.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01566',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.33' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1566';
UPDATE buybilldetail SET  lastbuyprice = 600 , meanbuyprice = 600, lastbuyprice_withDiscount = 600, meanbuyprice_withDiscount = 600
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where buybilldetailid = 308;
UPDATE productunit SET proUnitBuyPrice  = 600 * productnumber WHERE productid = 1566;
UPDATE storedetail SET  productquantity = '20', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1591';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1566', '1', '20', '0', '51', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '20', '1', '2026-10-07 14:05:47','0','0'); -- id=2643
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01567', '51', '28', '1567', '10', '540', '5400.00', '0', '', '2026-10-07 14:07:34', '1567','','','0','0','0','0','0',null,'540','5400','0','0','0','0','0','0','0','0','1'); -- id=309
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:05:47', 1, 1567, 0, 0
                    , 540, 10, 0, 0, 1, '2026-10-07 14:07:34')
                ON DUPLICATE KEY UPDATE buyprice = 540,
                        buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:07:34' ; -- id=385
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1567', '540', '10', '0', 'buyBillController.php', '309', '', '0', '0'); -- id=267
UPDATE product SET  productBuyPrice = "540" WHERE productId = 1567 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 309 ;
UPDATE product SET productName = 'فولكانو جينز 1319', productDescription = '', productCatId = '28', productBuyPrice = '540.00', productSellAllPrice = '560.00', productSellUnitPrice = '560.00', productSellHalfPrice = '560.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01567',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '540',lastbuyprice_withDiscount = '540',meanbuyprice = '540',meanbuyprice_withDiscount = '540' , productbuypricereal = '540.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.70' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='540',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='540',meanbuyprice_withTax='540',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='540',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1567';
UPDATE buybilldetail SET  lastbuyprice = 540 , meanbuyprice = 540, lastbuyprice_withDiscount = 540, meanbuyprice_withDiscount = 540
        , lastbuyprice_withTax = 540, meanbuyprice_withTax = 540, lastbuyprice_withDiscountAndTax = 540
                where buybilldetailid = 309;
UPDATE productunit SET proUnitBuyPrice  = 540 * productnumber WHERE productid = 1567;
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1592';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1567', '1', '10', '0', '51', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '10', '1', '2026-10-07 14:05:47','0','0'); -- id=2644
UPDATE supplier SET  suppliercurrentDebt = '440530',suppliercurrentDebtInCurrency= '440530' , userid = '1', supplierdate = '2026-10-07 14:07:34'   WHERE supplierid = '20';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('20', '370530.00', '70000', '0', 'اضافة فاتورة مشتريات', '51', '440530', '2026-10-07 14:05:47', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','70000','1','370530','70000','440530','0',''); -- id=195
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '70000', '70000', '2026-10-07', '1', '0', '0', '2026-10-07 14:07:34','اضافة فاتورة مشتريات رقم 51','1','0',null,'0','51','buyBillController.php?do=details&id=51'); -- id=1251
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1251', '382', '70000', '','0'); -- id=1259
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17530240.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1251', '439', '70000', '','0'); -- id=1251
UPDATE accountstree SET name = 'فولكانو جينز - مورد', customName = 'فولكانو جينز - مورد', customNameEn = 'فولكانو جينز - مورد', nameEn = 'فولكانو جينز - مورد', parent = '81', accountNature = '1', theValue = '102175', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '439';
update buybill set dailyentryid='1251,0' where buybillid=51;
COMMIT;
UPDATE product SET overAllAveragePrice = 610 WHERE productId = 1560;UPDATE product SET overAllAveragePrice = 680 WHERE productId = 1561;UPDATE product SET overAllAveragePrice = 680 WHERE productId = 1562;UPDATE product SET overAllAveragePrice = 650 WHERE productId = 1563;UPDATE product SET overAllAveragePrice = 730 WHERE productId = 1564;UPDATE product SET overAllAveragePrice = 580 WHERE productId = 1565;UPDATE product SET overAllAveragePrice = 600 WHERE productId = 1566;UPDATE product SET overAllAveragePrice = 540 WHERE productId = 1567;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:37:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:07:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:07:35', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=51'); -- id=3786
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:37:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:07:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:07:38', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=51&type=2'); -- id=3787
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:44:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:14:25", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 14:14:25', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3788

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac620f351739
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 14:14:25', '06ac620f351739', '1', '0.00', '0', '0', '1', '12585.00', '12585', '12585', '0', '1', '2026-10-07 14:14:25', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '30' ,'0','','','','','-1','0','0','0','0','0','12585','0','','0','0','12585','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=123
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','اضافة فاتورة مبيعات','123', '0', '2026-10-07 14:14:25', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '12585', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 14:14:25','0','0','',''); -- id=213
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 217;
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 ('415','01436', '123', '100', '1436', '9', '445', '4005', '0', '', '0', '2026-10-07 14:14:25', '1436', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','217-9,','1','1','0','0','445','4005','0','','0','0.00','0','0','0','0'); -- id=485
UPDATE sellbilldetail SET  lastbuyprice = 415.00 , meanbuyprice = 415.00, lastbuyprice_withDiscount = 415.00, meanbuyprice_withDiscount = 415.00
        , lastbuyprice_withTax = 415, meanbuyprice_withTax = 415, lastbuyprice_withDiscountAndTax = 415
                where sellbilldetailid = 485;
 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 (1436, '2026-10-07', 4005, 3735, 3735
                    , 3735, 3735, 3735, 3735
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 3735, 3735, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4005, sellCostBuyPrice =sellCostBuyPrice+3735
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3735, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3735
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3735, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3735
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3735
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3735
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3735
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+9
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 4005, 3735, 3735
                    , 3735, 3735, 3735, 3735
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3735, 3735, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4005, sellCostBuyPrice =sellCostBuyPrice+3735
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3735, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3735
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3735, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3735
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3735
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3735
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3735
                        , returnSellVal = returnSellVal+0, 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 = '12', userid = '2', storedetaildate = '2026-10-07 14:14:25' WHERE storedetailid = '1449';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1436', '1', '9', '1', '123', 'اضافة فاتورة مبيعات', 'sellbillController.php', '21', '12', '2', '2026-10-07 14:14:25','0','0'); -- id=2645
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 215;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('310','01434', '123', '100', '1434', '9', '340', '3060', '0', '', '0', '2026-10-07 14:14:25', '1434', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','215-9,','1','1','0','0','340','3060','0','','0','0.00','0','0','0','0'); -- id=486
UPDATE sellbilldetail SET  lastbuyprice = 310.00 , meanbuyprice = 310.00, lastbuyprice_withDiscount = 310.00, meanbuyprice_withDiscount = 310.00
        , lastbuyprice_withTax = 310, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 310
                where sellbilldetailid = 486;
 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 (1434, '2026-10-07', 3060, 2790, 2790
                    , 2790, 2790, 2790, 2790
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 2790, 2790, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3060, sellCostBuyPrice =sellCostBuyPrice+2790
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2790, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2790
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2790, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2790
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2790
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2790
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2790
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+9
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3060, 2790, 2790
                    , 2790, 2790, 2790, 2790
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2790, 2790, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3060, sellCostBuyPrice =sellCostBuyPrice+2790
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2790, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2790
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2790, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2790
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2790
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2790
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2790
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '30', userid = '2', storedetaildate = '2026-10-07 14:14:25' WHERE storedetailid = '1447';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1434', '1', '9', '1', '123', 'اضافة فاتورة مبيعات', 'sellbillController.php', '39', '30', '2', '2026-10-07 14:14:25','0','0'); -- id=2646
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 206;
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 ('265','01425', '123', '100', '1425', '6', '295', '1770', '0', '', '0', '2026-10-07 14:14:25', '1425', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','206-6,','1','1','0','0','295','1770','0','','0','0.00','0','0','0','0'); -- id=487
UPDATE sellbilldetail SET  lastbuyprice = 265.00 , meanbuyprice = 265.00, lastbuyprice_withDiscount = 265.00, meanbuyprice_withDiscount = 265.00
        , lastbuyprice_withTax = 265, meanbuyprice_withTax = 265, lastbuyprice_withDiscountAndTax = 265
                where sellbilldetailid = 487;
 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 (1425, '2026-10-07', 1770, 1590, 1590
                    , 1590, 1590, 1590, 1590
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 1590, 1590, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1770, sellCostBuyPrice =sellCostBuyPrice+1590
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1590, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1590
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1590, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1590
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1590
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1590
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1590
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 1770, 1590, 1590
                    , 1590, 1590, 1590, 1590
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1590, 1590, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1770, sellCostBuyPrice =sellCostBuyPrice+1590
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1590, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1590
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1590, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1590
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1590
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1590
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1590
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-07 14:14:25' WHERE storedetailid = '1438';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1425', '1', '6', '1', '123', 'اضافة فاتورة مبيعات', 'sellbillController.php', '21', '15', '2', '2026-10-07 14:14:25','0','0'); -- id=2647
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 338;
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 ('600','i0001493', '123', '108', '1493', '6', '625', '3750', '0', '', '0', '2026-10-07 14:14:25', '1493', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','338-6,','1','1','0','0','625','3750','0','','0','0.00','0','0','0','0'); -- id=488
UPDATE sellbilldetail SET  lastbuyprice = 600.00 , meanbuyprice = 600.00, lastbuyprice_withDiscount = 600.00, meanbuyprice_withDiscount = 600.00
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where sellbilldetailid = 488;
 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 (1493, '2026-10-07', 3750, 3600, 3600
                    , 3600, 3600, 3600, 3600
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 3600, 3600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3750, sellCostBuyPrice =sellCostBuyPrice+3600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3600, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3600
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3600
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3600
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3750, 3600, 3600
                    , 3600, 3600, 3600, 3600
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3600, 3600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3750, sellCostBuyPrice =sellCostBuyPrice+3600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3600, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3600
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3600
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3600
                        , returnSellVal = returnSellVal+0, 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 = '21', userid = '2', storedetaildate = '2026-10-07 14:14:25' WHERE storedetailid = '1518';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1493', '1', '6', '1', '123', 'اضافة فاتورة مبيعات', 'sellbillController.php', '27', '21', '2', '2026-10-07 14:14:25','0','0'); -- id=2648
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '544710',  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 ('532125','12585', '0', '2', 'اضافة فاتورة مبيعات', '123', '544710', '2026-10-07 14:14:25', '2',  'sellbillController.php','1','','0'); -- id=152
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '12585', '12585', '2026-10-07', '2', '0', '0', '2026-10-07 14:14:25','اضافة فاتورة مبيعات رقم 123','1','0',null,'0','123','sellbillController.php?do=showDetail&sellbillid=123'); -- id=1252
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1252', '419', '12585', '','0'); -- id=1260
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '544710', 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 ('1252', '143', '12585', '','0'); -- id=1252
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1224255', 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 ( '11715', '11715', '2026-10-07', '2', '0', '0', '2026-10-07 14:14:25','اضافة فاتورة مبيعات رقم 123 - صرف البضاعة من المخزن','1','0',null,'0','123','sellbillController.php?do=showDetail&sellbillid=123'); -- id=1253
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1253', '402', '11715', '','0'); -- id=1261
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1184286.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1253', '382', '11715', '','0'); -- id=1253
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17518525.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1252,0,1253' where sellbillid=123;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 12585, 11715, 11715
                    , 11715, 11715, 11715, 11715
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,11715, 11715, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+12585, sellCostBuyPrice =sellCostBuyPrice+11715
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+11715, sellCostMeanBuyPrice = sellCostMeanBuyPrice+11715
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+11715, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+11715
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+11715
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+11715
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+11715
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 12585, 11715, 11715
                    , 11715, 11715, 11715, 11715
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,11715, 11715, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+12585, sellCostBuyPrice =sellCostBuyPrice+11715
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+11715, sellCostMeanBuyPrice = sellCostMeanBuyPrice+11715
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+11715, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+11715
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+11715
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+11715
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+11715
                        , returnSellVal = returnSellVal+0, 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, 12585, 11715, 11715
                    , 11715, 11715, 11715, 11715, 11715, 11715)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+12585, netSellCostBuyPrice = netSellCostBuyPrice+11715
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+11715
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+11715
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+11715
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+11715
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+11715
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+11715
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+11715;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac620f351739 and sellbillId = 123 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:44:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:14:25", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 14:14:25', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3789
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:47:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:17:00", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 14:17:00', '2', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=123'); -- id=3790
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:47:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:17:05", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 14:17:05', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3791
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:47:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:17:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:17:23', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=51&type=2'); -- id=3792
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:47:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:17:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-07 14:17:27', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3793
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:47:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:17:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:17:29', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3794
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:47:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:17:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:17:45', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3795
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:48:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:18:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:18:35', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3796
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:50:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:20:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:20:17', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3797
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فيلو جينز 6160','','31','500','520','520','520','2026-10-07','0','1','0','','0','0','0','0','0','500','500','500','500','500','0','4','0','0','.','0','0','0','500','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','500','500','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','500','0','0','0','0','0','0','','','0','0','0','0'); -- id=1568
UPDATE product SET productName = 'فيلو جينز 6160', productDescription = '', productCatId = '31', productBuyPrice = '500', productSellAllPrice = '520', productSellUnitPrice = '520', productSellHalfPrice = '520', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01568',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500' , buypricereal_precentage = '0' , buytotal_precentage = '4' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1568';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1568', '1', '2026-10-07', '1', '0','0156801','520','520','520','500','','0','0','0','0','0','0','0','0','0','0'); -- id=1568
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1568', '1', '0', '1', '2026-10-07'); -- id=1593
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1568', '1', '0', '0', '1568', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2649
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1568, 1,'2026-10-07 14:20:17',1)
                ON DUPLICATE KEY UPDATE productid = 1568, edited = 1, sysdate = '2026-10-07 14:20:17', userid = 1; -- id=2383
UPDATE product SET productName = 'فيلو جينز 6160', productDescription = '', productCatId = '31', productBuyPrice = '500.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01568',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500' , buypricereal_precentage = '0' , buytotal_precentage = '4' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1568';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فيلو جينز 6155','','31','465','485','485','485','2026-10-07','0','1','0','','0','0','0','0','0','465','465','465','465','465','0','4.3','0','0','.','0','0','0','465','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','465','465','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','465','0','0','0','0','0','0','','','0','0','0','0'); -- id=1569
UPDATE product SET productName = 'فيلو جينز 6155', productDescription = '', productCatId = '31', productBuyPrice = '465', productSellAllPrice = '485', productSellUnitPrice = '485', productSellHalfPrice = '485', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01569',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '465',lastbuyprice_withDiscount = '465',meanbuyprice = '465',meanbuyprice_withDiscount = '465' , productbuypricereal = '465' , buypricereal_precentage = '0' , buytotal_precentage = '4.3' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='465',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='465',meanbuyprice_withTax='465',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='465',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1569';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1569', '1', '2026-10-07', '1', '0','0156901','485','485','485','465','','0','0','0','0','0','0','0','0','0','0'); -- id=1569
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1569', '1', '0', '1', '2026-10-07'); -- id=1594
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1569', '1', '0', '0', '1569', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2650
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1569, 1,'2026-10-07 14:20:18',1)
                ON DUPLICATE KEY UPDATE productid = 1569, edited = 1, sysdate = '2026-10-07 14:20:18', userid = 1; -- id=2384
UPDATE product SET productName = 'فيلو جينز 6155', productDescription = '', productCatId = '31', productBuyPrice = '465.00', productSellAllPrice = '485.00', productSellUnitPrice = '485.00', productSellHalfPrice = '485.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01569',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '465',lastbuyprice_withDiscount = '465',meanbuyprice = '465',meanbuyprice_withDiscount = '465' , productbuypricereal = '465' , buypricereal_precentage = '0' , buytotal_precentage = '4.3' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='465',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='465',meanbuyprice_withTax='465',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='465',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1569';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فيلو جينز 6167','','31','430','450','450','450','2026-10-07','0','1','0','','0','0','0','0','0','430','430','430','430','430','0','4.65','4.65','0','.','0','0','0','430','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','430','430','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','430','0','0','0','0','0','0','','','0','0','0','0'); -- id=1570
UPDATE product SET productName = 'فيلو جينز 6167', productDescription = '', productCatId = '31', productBuyPrice = '430', productSellAllPrice = '450', productSellUnitPrice = '450', productSellHalfPrice = '450', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01570',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430' , buypricereal_precentage = '0' , buytotal_precentage = '4.65' , buyhalf_precentage = '4.65' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1570';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1570', '1', '2026-10-07', '1', '0','0157001','450','450','450','430','','0','0','0','0','0','0','0','0','0','0'); -- id=1570
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1570', '1', '0', '1', '2026-10-07'); -- id=1595
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1570', '1', '0', '0', '1570', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2651
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1570, 1,'2026-10-07 14:20:18',1)
                ON DUPLICATE KEY UPDATE productid = 1570, edited = 1, sysdate = '2026-10-07 14:20:18', userid = 1; -- id=2385
UPDATE product SET productName = 'فيلو جينز 6167', productDescription = '', productCatId = '31', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01570',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430' , buypricereal_precentage = '0' , buytotal_precentage = '4.65' , buyhalf_precentage = '4.65' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1570';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فيلو جينز 6504','','31','480','500','500','500','2026-10-07','0','1','0','','0','0','0','0','0','480','480','480','480','480','0','4.17','0','0','.','0','0','0','480','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','480','480','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','480','0','0','0','0','0','0','','','0','0','0','0'); -- id=1571
UPDATE product SET productName = 'فيلو جينز 6504', productDescription = '', productCatId = '31', productBuyPrice = '480', productSellAllPrice = '500', productSellUnitPrice = '500', productSellHalfPrice = '500', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01571',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1571';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1571', '1', '2026-10-07', '1', '0','0157101','500','500','500','480','','0','0','0','0','0','0','0','0','0','0'); -- id=1571
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1571', '1', '0', '1', '2026-10-07'); -- id=1596
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1571', '1', '0', '0', '1571', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2652
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1571, 1,'2026-10-07 14:20:18',1)
                ON DUPLICATE KEY UPDATE productid = 1571, edited = 1, sysdate = '2026-10-07 14:20:18', userid = 1; -- id=2386
UPDATE product SET productName = 'فيلو جينز 6504', productDescription = '', productCatId = '31', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01571',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480' , buypricereal_precentage = '0' , buytotal_precentage = '4.17' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1571';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكيت فيلو جينز 6177','','31','490','520','520','520','2026-10-07','0','1','0','','0','0','0','0','0','490','490','490','490','490','0','6.12','0','0','.','0','0','0','490','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','490','490','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','490','0','0','0','0','0','0','','','0','0','0','0'); -- id=1572
UPDATE product SET productName = 'جاكيت فيلو جينز 6177', productDescription = '', productCatId = '31', productBuyPrice = '490', productSellAllPrice = '520', productSellUnitPrice = '520', productSellHalfPrice = '520', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01572',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '490',lastbuyprice_withDiscount = '490',meanbuyprice = '490',meanbuyprice_withDiscount = '490' , productbuypricereal = '490' , buypricereal_precentage = '0' , buytotal_precentage = '6.12' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='490',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='490',meanbuyprice_withTax='490',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='490',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1572';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1572', '1', '2026-10-07', '1', '0','0157201','520','520','520','490','','0','0','0','0','0','0','0','0','0','0'); -- id=1572
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1572', '1', '0', '1', '2026-10-07'); -- id=1597
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1572', '1', '0', '0', '1572', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2653
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1572, 1,'2026-10-07 14:20:18',1)
                ON DUPLICATE KEY UPDATE productid = 1572, edited = 1, sysdate = '2026-10-07 14:20:18', userid = 1; -- id=2387
UPDATE product SET productName = 'جاكيت فيلو جينز 6177', productDescription = '', productCatId = '31', productBuyPrice = '490.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01572',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '490',lastbuyprice_withDiscount = '490',meanbuyprice = '490',meanbuyprice_withDiscount = '490' , productbuypricereal = '490' , buypricereal_precentage = '0' , buytotal_precentage = '6.12' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='490',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='490',meanbuyprice_withTax='490',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='490',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1572';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:50:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:20:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:20:19', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3798
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:50:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:20:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:20:21', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3799
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:51:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:21:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:21:33', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3800
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac62af59e492', '2026-10-07 14:20:21', '6', '731775.00', '829145', '0', '0', '97370.00',  '97370.00', '0', '97370', '1', '2026-10-07 14:21:33', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=52
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01568', '52', '31', '1568', '36', '500', '18000.00', '0', '', '2026-10-07 14:21:33', '1568','','','0','0','0','0','0',null,'500','18000','0','0','0','0','0','0','0','0','1'); -- id=310
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1568, 0, 0
                    , 500, 36, 0, 0, 1, '2026-10-07 14:21:33')
                ON DUPLICATE KEY UPDATE buyprice = 500,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:21:33' ; -- id=386
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1568', '500', '36', '0', 'buyBillController.php', '310', '', '0', '0'); -- id=268
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1568 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 310 ;
UPDATE product SET productName = 'فيلو جينز 6160', productDescription = '', productCatId = '31', productBuyPrice = '500.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01568',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1568';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 500, meanbuyprice_withDiscount = 500
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where buybilldetailid = 310;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1568;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1593';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1568', '1', '36', '0', '52', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 14:20:21','0','0'); -- id=2654
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01350', '52', '31', '1350', '40', '555', '22200.00', '0', '', '2026-10-07 14:21:33', '1350','','','0','0','0','0','0',null,'555','22200','0','0','0','0','0','0','0','0','1'); -- id=311
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1350, 0, 0
                    , 555, 40, 0, 0, 1, '2026-10-07 14:21:33')
                ON DUPLICATE KEY UPDATE buyprice = 555,
                        buyQuantity =buyQuantity+40, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:21:33' ; -- id=387
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1350', '555', '40', '0', 'buyBillController.php', '311', '', '0', '0'); -- id=269
UPDATE product SET  productBuyPrice = "555" WHERE productId = 1350 ;
UPDATE buybilldetail SET  quantitybefore = 40 WHERE buybilldetailid = 311 ;
UPDATE product SET productName = 'اميري تطريز 6161 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '555.00', productSellAllPrice = '575.00', productSellUnitPrice = '575.00', productSellHalfPrice = '575.00', productDate = '2026-09-30', conditions = '0', userId = '1', limitamount = '0', parcode = '01350',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '555',lastbuyprice_withDiscount = '555',meanbuyprice = '555',meanbuyprice_withDiscount = '555' , productbuypricereal = '555.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.60' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='555',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='555',meanbuyprice_withTax='555',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='555',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1350';
UPDATE buybilldetail SET  lastbuyprice = 555 , meanbuyprice = 555, lastbuyprice_withDiscount = 555, meanbuyprice_withDiscount = 555
        , lastbuyprice_withTax = 555, meanbuyprice_withTax = 555, lastbuyprice_withDiscountAndTax = 555
                where buybilldetailid = 311;
UPDATE productunit SET proUnitBuyPrice  = 555 * productnumber WHERE productid = 1350;
UPDATE storedetail SET  productquantity = '80', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1350';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1350', '1', '40', '0', '52', 'اضافة فاتورة مشتريات', 'buyBillController.php', '40', '80', '1', '2026-10-07 14:20:21','0','0'); -- id=2655
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01569', '52', '31', '1569', '30', '465', '13950.00', '0', '', '2026-10-07 14:21:33', '1569','','','0','0','0','0','0',null,'465','13950','0','0','0','0','0','0','0','0','1'); -- id=312
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1569, 0, 0
                    , 465, 30, 0, 0, 1, '2026-10-07 14:21:33')
                ON DUPLICATE KEY UPDATE buyprice = 465,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:21:33' ; -- id=388
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1569', '465', '30', '0', 'buyBillController.php', '312', '', '0', '0'); -- id=270
UPDATE product SET  productBuyPrice = "465" WHERE productId = 1569 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 312 ;
UPDATE product SET productName = 'فيلو جينز 6155', productDescription = '', productCatId = '31', productBuyPrice = '465.00', productSellAllPrice = '485.00', productSellUnitPrice = '485.00', productSellHalfPrice = '485.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01569',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '465',lastbuyprice_withDiscount = '465',meanbuyprice = '465',meanbuyprice_withDiscount = '465' , productbuypricereal = '465.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.30' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='465',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='465',meanbuyprice_withTax='465',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='465',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1569';
UPDATE buybilldetail SET  lastbuyprice = 465 , meanbuyprice = 465, lastbuyprice_withDiscount = 465, meanbuyprice_withDiscount = 465
        , lastbuyprice_withTax = 465, meanbuyprice_withTax = 465, lastbuyprice_withDiscountAndTax = 465
                where buybilldetailid = 312;
UPDATE productunit SET proUnitBuyPrice  = 465 * productnumber WHERE productid = 1569;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1594';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1569', '1', '30', '0', '52', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 14:20:21','0','0'); -- id=2656
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01570', '52', '31', '1570', '35', '430', '15050.00', '0', '', '2026-10-07 14:21:33', '1570','','','0','0','0','0','0',null,'430','15050','0','0','0','0','0','0','0','0','1'); -- id=313
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1570, 0, 0
                    , 430, 35, 0, 0, 1, '2026-10-07 14:21:33')
                ON DUPLICATE KEY UPDATE buyprice = 430,
                        buyQuantity =buyQuantity+35, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:21:33' ; -- id=389
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1570', '430', '35', '0', 'buyBillController.php', '313', '', '0', '0'); -- id=271
UPDATE product SET  productBuyPrice = "430" WHERE productId = 1570 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 313 ;
UPDATE product SET productName = 'فيلو جينز 6167', productDescription = '', productCatId = '31', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01570',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.65' , buyhalf_precentage = '4.65' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1570';
UPDATE buybilldetail SET  lastbuyprice = 430 , meanbuyprice = 430, lastbuyprice_withDiscount = 430, meanbuyprice_withDiscount = 430
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 430, lastbuyprice_withDiscountAndTax = 430
                where buybilldetailid = 313;
UPDATE productunit SET proUnitBuyPrice  = 430 * productnumber WHERE productid = 1570;
UPDATE storedetail SET  productquantity = '35', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1595';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1570', '1', '35', '0', '52', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '35', '1', '2026-10-07 14:20:21','0','0'); -- id=2657
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01571', '52', '31', '1571', '25', '480', '12000.00', '0', '', '2026-10-07 14:21:33', '1571','','','0','0','0','0','0',null,'480','12000','0','0','0','0','0','0','0','0','1'); -- id=314
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1571, 0, 0
                    , 480, 25, 0, 0, 1, '2026-10-07 14:21:33')
                ON DUPLICATE KEY UPDATE buyprice = 480,
                        buyQuantity =buyQuantity+25, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:21:33' ; -- id=390
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1571', '480', '25', '0', 'buyBillController.php', '314', '', '0', '0'); -- id=272
UPDATE product SET  productBuyPrice = "480" WHERE productId = 1571 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 314 ;
UPDATE product SET productName = 'فيلو جينز 6504', productDescription = '', productCatId = '31', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01571',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='480',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1571';
UPDATE buybilldetail SET  lastbuyprice = 480 , meanbuyprice = 480, lastbuyprice_withDiscount = 480, meanbuyprice_withDiscount = 480
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 480, lastbuyprice_withDiscountAndTax = 480
                where buybilldetailid = 314;
UPDATE productunit SET proUnitBuyPrice  = 480 * productnumber WHERE productid = 1571;
UPDATE storedetail SET  productquantity = '25', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1596';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1571', '1', '25', '0', '52', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '25', '1', '2026-10-07 14:20:21','0','0'); -- id=2658
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01572', '52', '31', '1572', '33', '490', '16170.00', '0', '', '2026-10-07 14:21:33', '1572','','','0','0','0','0','0',null,'490','16170','0','0','0','0','0','0','0','0','1'); -- id=315
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1572, 0, 0
                    , 490, 33, 0, 0, 1, '2026-10-07 14:21:33')
                ON DUPLICATE KEY UPDATE buyprice = 490,
                        buyQuantity =buyQuantity+33, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:21:33' ; -- id=391
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1572', '490', '33', '0', 'buyBillController.php', '315', '', '0', '0'); -- id=273
UPDATE product SET  productBuyPrice = "490" WHERE productId = 1572 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 315 ;
UPDATE product SET productName = 'جاكيت فيلو جينز 6177', productDescription = '', productCatId = '31', productBuyPrice = '490.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01572',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '490',lastbuyprice_withDiscount = '490',meanbuyprice = '490',meanbuyprice_withDiscount = '490' , productbuypricereal = '490.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.12' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='490',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='490',meanbuyprice_withTax='490',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='490',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1572';
UPDATE buybilldetail SET  lastbuyprice = 490 , meanbuyprice = 490, lastbuyprice_withDiscount = 490, meanbuyprice_withDiscount = 490
        , lastbuyprice_withTax = 490, meanbuyprice_withTax = 490, lastbuyprice_withDiscountAndTax = 490
                where buybilldetailid = 315;
UPDATE productunit SET proUnitBuyPrice  = 490 * productnumber WHERE productid = 1572;
UPDATE storedetail SET  productquantity = '33', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1597';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1572', '1', '33', '0', '52', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '33', '1', '2026-10-07 14:20:21','0','0'); -- id=2659
UPDATE supplier SET  suppliercurrentDebt = '1118652',suppliercurrentDebtInCurrency= '829145' , userid = '1', supplierdate = '2026-10-07 14:21:33'   WHERE supplierid = '6';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('6', '1021282.00', '97370', '0', 'اضافة فاتورة مشتريات', '52', '1118652', '2026-10-07 14:20:21', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','97370','1','731775','97370','829145','0',''); -- id=196
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '97370', '97370', '2026-10-07', '1', '0', '0', '2026-10-07 14:21:33','اضافة فاتورة مشتريات رقم 52','1','0',null,'0','52','buyBillController.php?do=details&id=52'); -- id=1254
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1254', '382', '97370', '','0'); -- id=1262
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17615895.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1254', '425', '97370', '','0'); -- id=1254
UPDATE accountstree SET name = 'فيلو - مورد', customName = 'فيلو - مورد', customNameEn = 'فيلو - مورد', nameEn = 'فيلو - مورد', parent = '81', accountNature = '1', theValue = '283115', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '425';
update buybill set dailyentryid='1254,0' where buybillid=52;
COMMIT;
UPDATE product SET overAllAveragePrice = 555 WHERE productId = 1350;UPDATE product SET overAllAveragePrice = 500 WHERE productId = 1568;UPDATE product SET overAllAveragePrice = 465 WHERE productId = 1569;UPDATE product SET overAllAveragePrice = 430 WHERE productId = 1570;UPDATE product SET overAllAveragePrice = 480 WHERE productId = 1571;UPDATE product SET overAllAveragePrice = 490 WHERE productId = 1572;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:51:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:21:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:21:33', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=52'); -- id=3801
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:51:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:21:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:21:36', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=52&type=2'); -- id=3802
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:54:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:24:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:24:37', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=52&type=2'); -- id=3803
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:54:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:24:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 14:24:43', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3804
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:55:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:25:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 14:25:11', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3805
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('ريد لاين','2026-10-07','','93', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=113
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (113, 1,'2026-10-07 14:25:11',1)
                ON DUPLICATE KEY UPDATE catid = 113, edited = 1, sysdate = '2026-10-07 14:25:11', userid = 1; -- id=115
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '113', '1', '2026-10-07', '1', '0'); -- id=27
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:55:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:25:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 14:25:12', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3806
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:55:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:25:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 14:25:13', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3807
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:55:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:25:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:25:15', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3808
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:55:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:25:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:25:57', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3809
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('1401 ريد لاين','','113','380','380','380','380','2026-10-07','0','1','0','','0','0','0','0','0','380','380','380','380','380','0','0','0','0','.','0','0','0','380','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','380','380','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','380','0','0','0','0','0','0','','','0','0','0','0'); -- id=1573
UPDATE product SET productName = '1401 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '380', productSellAllPrice = '380', productSellUnitPrice = '380', productSellHalfPrice = '380', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01573',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '380',meanbuyprice = '380',meanbuyprice_withDiscount = '380' , productbuypricereal = '380' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1573';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1573', '1.00', '2026-10-07', '1', '0','0157301','380','380','380','380','','0','0','0','0','0','0','0','0','0','0'); -- id=1573
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1573', '1', '0', '1', '2026-10-07'); -- id=1598
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1573', '1', '0', '0', '1573', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2660
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1573, 1,'2026-10-07 14:25:57',1)
                ON DUPLICATE KEY UPDATE productid = 1573, edited = 1, sysdate = '2026-10-07 14:25:57', userid = 1; -- id=2388
UPDATE product SET productName = '1401 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '380.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01573',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '380',meanbuyprice = '380',meanbuyprice_withDiscount = '380' , productbuypricereal = '380' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1573';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:55:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:25:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:25:58', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3810
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:56:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:26:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:26:00', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3811
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:58:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:28:57", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 14:28:57', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3812

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac62a3186523
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 14:28:57', '06ac62a3186523', '1', '0.00', '0', '20', '1', '43395.00', '43375', '43375', '0', '1', '2026-10-07 14:28:57', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '76' ,'0','','','','','-1','0','0','0','0','0','43375','0','','0','0','43375','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=124
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','اضافة فاتورة مبيعات','124', '0', '2026-10-07 14:28:57', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '43375', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 14:28:57','0','0','',''); -- id=214
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 384;
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 ('600','01566', '124', '28', '1566', '5', '620', '3100', '0', '', '0', '2026-10-07 14:28:57', '1566', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','384-5,','1','1','0','0','620','3100','0','','0','0.00','0','0','0','0'); -- id=489
UPDATE sellbilldetail SET  lastbuyprice = 600.00 , meanbuyprice = 600.00, lastbuyprice_withDiscount = 600.00, meanbuyprice_withDiscount = 600.00
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where sellbilldetailid = 489;
 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 (1566, '2026-10-07', 3098.5712639705, 3000, 3000
                    , 3000, 3000, 3000, 3000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 3000, 3000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3098.5712639705, sellCostBuyPrice =sellCostBuyPrice+3000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3098.5712639705, 3000, 3000
                    , 3000, 3000, 3000, 3000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3000, 3000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3098.5712639705, sellCostBuyPrice =sellCostBuyPrice+3000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-07 14:28:57' WHERE storedetailid = '1591';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1566', '1', '5', '1', '124', 'اضافة فاتورة مبيعات', 'sellbillController.php', '20', '15', '2', '2026-10-07 14:28:57','0','0'); -- id=2661
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 376;
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 ('657','01558', '124', '8', '1558', '5', '685', '3425', '0', '', '0', '2026-10-07 14:28:57', '1558', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','376-5,','1','1','0','0','685','3425','0','','0','0.00','0','0','0','0'); -- id=490
UPDATE sellbilldetail SET  lastbuyprice = 657.00 , meanbuyprice = 657.00, lastbuyprice_withDiscount = 657.00, meanbuyprice_withDiscount = 657.00
        , lastbuyprice_withTax = 657, meanbuyprice_withTax = 657, lastbuyprice_withDiscountAndTax = 657
                where sellbilldetailid = 490;
 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 (1558, '2026-10-07', 3423.4214771287, 3285, 3285
                    , 3285, 3285, 3285, 3285
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 3285, 3285, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3423.4214771287, sellCostBuyPrice =sellCostBuyPrice+3285
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3285, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3285
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3285, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3285
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3285
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3285
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3285
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3423.4214771287, 3285, 3285
                    , 3285, 3285, 3285, 3285
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3285, 3285, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3423.4214771287, sellCostBuyPrice =sellCostBuyPrice+3285
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3285, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3285
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3285, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3285
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3285
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3285
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3285
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-07 14:28:57' WHERE storedetailid = '1583';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1558', '1', '5', '1', '124', 'اضافة فاتورة مبيعات', 'sellbillController.php', '20', '15', '2', '2026-10-07 14:28:57','0','0'); -- id=2662
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 375;
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 ('617','01557', '124', '8', '1557', '5', '645', '3225', '0', '', '0', '2026-10-07 14:28:57', '1557', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','375-5,','1','1','0','0','645','3225','0','','0','0.00','0','0','0','0'); -- id=491
UPDATE sellbilldetail SET  lastbuyprice = 617.00 , meanbuyprice = 617.00, lastbuyprice_withDiscount = 617.00, meanbuyprice_withDiscount = 617.00
        , lastbuyprice_withTax = 617, meanbuyprice_withTax = 617, lastbuyprice_withDiscountAndTax = 617
                where sellbilldetailid = 491;
 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 (1557, '2026-10-07', 3223.5136536467, 3085, 3085
                    , 3085, 3085, 3085, 3085
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 3085, 3085, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3223.5136536467, sellCostBuyPrice =sellCostBuyPrice+3085
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3085, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3085
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3085, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3085
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3085
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3085
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3085
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3223.5136536467, 3085, 3085
                    , 3085, 3085, 3085, 3085
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3085, 3085, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3223.5136536467, sellCostBuyPrice =sellCostBuyPrice+3085
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3085, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3085
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3085, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3085
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3085
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3085
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3085
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-07 14:28:57' WHERE storedetailid = '1582';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1557', '1', '5', '1', '124', 'اضافة فاتورة مبيعات', 'sellbillController.php', '20', '15', '2', '2026-10-07 14:28:57','0','0'); -- id=2663
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+8 where id = 383;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('580','01565', '124', '28', '1565', '8', '600', '4800', '0', '', '0', '2026-10-07 14:28:57', '1565', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','383-8,','1','1','0','0','600','4800','0','','0','0.00','0','0','0','0'); -- id=492
UPDATE sellbilldetail SET  lastbuyprice = 580.00 , meanbuyprice = 580.00, lastbuyprice_withDiscount = 580.00, meanbuyprice_withDiscount = 580.00
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 580
                where sellbilldetailid = 492;
 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 (1565, '2026-10-07', 4797.7877635672, 4640, 4640
                    , 4640, 4640, 4640, 4640
                    , 0, 0, 0, 0
                    , 0, 0, 0, 8, 0, 4640, 4640, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4797.7877635672, sellCostBuyPrice =sellCostBuyPrice+4640
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4640, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4640
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4640, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4640
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4640
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4640
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4640
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+8
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 4797.7877635672, 4640, 4640
                    , 4640, 4640, 4640, 4640
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4640, 4640, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4797.7877635672, sellCostBuyPrice =sellCostBuyPrice+4640
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4640, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4640
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4640, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4640
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4640
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4640
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4640
                        , returnSellVal = returnSellVal+0, 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 = '2', userid = '2', storedetaildate = '2026-10-07 14:28:57' WHERE storedetailid = '1590';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1565', '1', '8', '1', '124', 'اضافة فاتورة مبيعات', 'sellbillController.php', '10', '2', '2', '2026-10-07 14:28:57','0','0'); -- id=2664
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 353;
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 ('650','01507', '124', '108', '1507', '3', '675', '2025', '0', '', '0', '2026-10-07 14:28:57', '1507', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','353-3,','1','1','0','0','675','2025','0','','0','0.00','0','0','0','0'); -- id=493
UPDATE sellbilldetail SET  lastbuyprice = 650.00 , meanbuyprice = 650.00, lastbuyprice_withDiscount = 650.00, meanbuyprice_withDiscount = 650.00
        , lastbuyprice_withTax = 650, meanbuyprice_withTax = 650, lastbuyprice_withDiscountAndTax = 650
                where sellbilldetailid = 493;
 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 (1507, '2026-10-07', 2024.0667127549, 1950, 1950
                    , 1950, 1950, 1950, 1950
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1950, 1950, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2024.0667127549, sellCostBuyPrice =sellCostBuyPrice+1950
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1950, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1950
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1950, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1950
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1950
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1950
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1950
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2024.0667127549, 1950, 1950
                    , 1950, 1950, 1950, 1950
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1950, 1950, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2024.0667127549, sellCostBuyPrice =sellCostBuyPrice+1950
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1950, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1950
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1950, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1950
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1950
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1950
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1950
                        , returnSellVal = returnSellVal+0, 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 = '6', userid = '2', storedetaildate = '2026-10-07 14:28:57' WHERE storedetailid = '1532';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1507', '1', '3', '1', '124', 'اضافة فاتورة مبيعات', 'sellbillController.php', '9', '6', '2', '2026-10-07 14:28:57','0','0'); -- id=2665
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 347;
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 ('675','01502', '124', '108', '1502', '6', '700', '4200', '0', '', '0', '2026-10-07 14:28:57', '1502', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','347-6,','1','1','0','0','700','4200','0','','0','0.00','0','0','0','0'); -- id=494
UPDATE sellbilldetail SET  lastbuyprice = 675.00 , meanbuyprice = 675.00, lastbuyprice_withDiscount = 675.00, meanbuyprice_withDiscount = 675.00
        , lastbuyprice_withTax = 675, meanbuyprice_withTax = 675, lastbuyprice_withDiscountAndTax = 675
                where sellbilldetailid = 494;
 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 (1502, '2026-10-07', 4198.0642931213, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4198.0642931213, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 4198.0642931213, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4198.0642931213, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '2', storedetaildate = '2026-10-07 14:28:57' WHERE storedetailid = '1527';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1502', '1', '6', '1', '124', 'اضافة فاتورة مبيعات', 'sellbillController.php', '6', '0', '2', '2026-10-07 14:28:57','0','0'); -- id=2666
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 338;
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 ('600','i0001493', '124', '108', '1493', '6', '625', '3750', '0', '', '0', '2026-10-07 14:28:57', '1493', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','338-6,','1','1','0','0','625','3750','0','','0','0.00','0','0','0','0'); -- id=495
UPDATE sellbilldetail SET  lastbuyprice = 600.00 , meanbuyprice = 600.00, lastbuyprice_withDiscount = 600.00, meanbuyprice_withDiscount = 600.00
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where sellbilldetailid = 495;
 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 (1493, '2026-10-07', 3748.2716902869, 3600, 3600
                    , 3600, 3600, 3600, 3600
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 3600, 3600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3748.2716902869, sellCostBuyPrice =sellCostBuyPrice+3600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3600, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3600
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3600
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3600
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3748.2716902869, 3600, 3600
                    , 3600, 3600, 3600, 3600
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3600, 3600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3748.2716902869, sellCostBuyPrice =sellCostBuyPrice+3600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3600, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3600
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3600
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3600
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-07 14:28:57' WHERE storedetailid = '1518';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1493', '1', '6', '1', '124', 'اضافة فاتورة مبيعات', 'sellbillController.php', '21', '15', '2', '2026-10-07 14:28:57','0','0'); -- id=2667
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 338;
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 ('600','i0001493', '124', '108', '1493', '6', '625', '3750', '0', '', '0', '2026-10-07 14:28:57', '1493', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','338-6,','1','1','0','0','625','3750','0','','0','0.00','0','0','0','0'); -- id=496
UPDATE sellbilldetail SET  lastbuyprice = 600.00 , meanbuyprice = 600.00, lastbuyprice_withDiscount = 600.00, meanbuyprice_withDiscount = 600.00
        , lastbuyprice_withTax = 600, meanbuyprice_withTax = 600, lastbuyprice_withDiscountAndTax = 600
                where sellbilldetailid = 496;
 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 (1493, '2026-10-07', 3748.2716902869, 3600, 3600
                    , 3600, 3600, 3600, 3600
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 3600, 3600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3748.2716902869, sellCostBuyPrice =sellCostBuyPrice+3600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3600, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3600
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3600
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3600
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3748.2716902869, 3600, 3600
                    , 3600, 3600, 3600, 3600
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3600, 3600, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3748.2716902869, sellCostBuyPrice =sellCostBuyPrice+3600
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3600, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3600
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3600, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3600
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3600
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3600
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3600
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '9', userid = '2', storedetaildate = '2026-10-07 14:28:57' WHERE storedetailid = '1518';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1493', '1', '6', '1', '124', 'اضافة فاتورة مبيعات', 'sellbillController.php', '15', '9', '2', '2026-10-07 14:28:57','0','0'); -- id=2668
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 79;
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 ('477','01387', '124', '95', '1387', '6', '530', '3180', '0', '', '0', '2026-10-07 14:28:57', '1387', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','79-6,','1','1','0','0','530','3180','0','','0','0.00','0','0','0','0'); -- id=497
UPDATE sellbilldetail SET  lastbuyprice = 530.00 , meanbuyprice = 530.00, lastbuyprice_withDiscount = 477.00, meanbuyprice_withDiscount = 504.76
        , lastbuyprice_withTax = 530, meanbuyprice_withTax = 252.38, lastbuyprice_withDiscountAndTax = 477
                where sellbilldetailid = 497;
 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 (1387, '2026-10-07', 3178.5343933633, 3180, 3180
                    , 3180, 2862, 3028.56, 2862
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 3180, 1514.28, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3178.5343933633, sellCostBuyPrice =sellCostBuyPrice+3180
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3180, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3180
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2862, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3028.56
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2862
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3180
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1514.28
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3178.5343933633, 3180, 3180
                    , 3180, 2862, 3028.56, 2862
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3180, 1514.28, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3178.5343933633, sellCostBuyPrice =sellCostBuyPrice+3180
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3180, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3180
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2862, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3028.56
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2862
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3180
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1514.28
                        , returnSellVal = returnSellVal+0, 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 = '24', userid = '2', storedetaildate = '2026-10-07 14:28:57' WHERE storedetailid = '1387';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1387', '1', '6', '1', '124', 'اضافة فاتورة مبيعات', 'sellbillController.php', '30', '24', '2', '2026-10-07 14:28:57','0','0'); -- id=2669
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+15 where id = 76;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('441','01384', '124', '95', '1384', '15', '490', '7350', '0', '', '0', '2026-10-07 14:28:57', '1384', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','76-15,','1','1','0','0','490','7350','0','','0','0.00','0','0','0','0'); -- id=498
UPDATE sellbilldetail SET  lastbuyprice = 490.00 , meanbuyprice = 490.00, lastbuyprice_withDiscount = 441.00, meanbuyprice_withDiscount = 465.50
        , lastbuyprice_withTax = 490, meanbuyprice_withTax = 245, lastbuyprice_withDiscountAndTax = 441
                where sellbilldetailid = 498;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1384, '2026-10-07', 7346.6125129623, 7350, 7350
                    , 7350, 6615, 6982.5, 6615
                    , 0, 0, 0, 0
                    , 0, 0, 0, 15, 0, 7350, 3675, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7346.6125129623, sellCostBuyPrice =sellCostBuyPrice+7350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7350, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6615, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6982.5
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6615
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3675
                        , returnSellVal = returnSellVal+0, 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+15
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 7346.6125129623, 7350, 7350
                    , 7350, 6615, 6982.5, 6615
                    , 0, 0, 0, 0
                    , 0, 0, 0, 7350, 3675, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7346.6125129623, sellCostBuyPrice =sellCostBuyPrice+7350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7350, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6615, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6982.5
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6615
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3675
                        , returnSellVal = returnSellVal+0, 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 = '357', userid = '2', storedetaildate = '2026-10-07 14:28:57' WHERE storedetailid = '1384';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1384', '1', '15', '1', '124', 'اضافة فاتورة مبيعات', 'sellbillController.php', '372', '357', '2', '2026-10-07 14:28:57','0','0'); -- id=2670
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 77;
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 ('351','01386', '124', '95', '1386', '6', '390', '2340', '0', '', '0', '2026-10-07 14:28:57', '1386', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','77-6,','1','1','0','0','390','2340','0','','0','0.00','0','0','0','0'); -- id=499
UPDATE sellbilldetail SET  lastbuyprice = 390.00 , meanbuyprice = 390.00, lastbuyprice_withDiscount = 351.00, meanbuyprice_withDiscount = 370.97
        , lastbuyprice_withTax = 390, meanbuyprice_withTax = 190.32, lastbuyprice_withDiscountAndTax = 351
                where sellbilldetailid = 499;
 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 (1386, '2026-10-07', 2338.921534739, 2340, 2340
                    , 2340, 2106, 2225.82, 2106
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 2340, 1141.92, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2338.921534739, sellCostBuyPrice =sellCostBuyPrice+2340
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2340, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2340
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2106, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2225.82
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2106
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2340
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1141.92
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2338.921534739, 2340, 2340
                    , 2340, 2106, 2225.82, 2106
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2340, 1141.92, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2338.921534739, sellCostBuyPrice =sellCostBuyPrice+2340
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2340, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2340
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2106, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2225.82
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2106
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2340
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1141.92
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '174', userid = '2', storedetaildate = '2026-10-07 14:28:57' WHERE storedetailid = '1386';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1386', '1', '6', '1', '124', 'اضافة فاتورة مبيعات', 'sellbillController.php', '180', '174', '2', '2026-10-07 14:28:57','0','0'); -- id=2671
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','98761', '124', '29', '962', '5', '450', '2250', '0', '', '0', '2026-10-07 14:28:57', '962', '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=500
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 = 500;
 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 (962, '2026-10-07', 2248.9630141721, 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+2248.9630141721, 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-10-07', 2248.9630141721, 2150, 2150
                    , 2150, 2150, 2150, 2150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2150, 2150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2248.9630141721, 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 = '19', userid = '2', storedetaildate = '2026-10-07 14:28:57' WHERE storedetailid = '962';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('962', '1', '5', '1', '124', 'اضافة فاتورة مبيعات', 'sellbillController.php', '24', '19', '2', '2026-10-07 14:28:57','0','0'); -- id=2672
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '588085',  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 ('544710','43375', '0', '2', 'اضافة فاتورة مبيعات', '124', '588085', '2026-10-07 14:28:57', '2',  'sellbillController.php','1','','0'); -- id=153
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '43395', '43395', '2026-10-07', '2', '0', '0', '2026-10-07 14:28:57','اضافة فاتورة مبيعات رقم 124','1','0',null,'0','124','sellbillController.php?do=showDetail&sellbillid=124'); -- id=1255
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1255', '419', '43375', '','0'); -- id=1263
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '588085', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1255', '398', '20', '','0'); -- id=1264
UPDATE accountstree SET name = 'خصم مسموح به', customName = 'خصم مسموح به', customNameEn = '', nameEn = '', parent = '158', accountNature = '0', theValue = '136198', theOrder = '0', layingOrder = '51', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-08-08 17:58:26' WHERE id = '398';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1255', '143', '43395', '','0'); -- id=1255
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1267650', 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 ( '40943', '40943', '2026-10-07', '2', '0', '0', '2026-10-07 14:28:57','اضافة فاتورة مبيعات رقم 124 - صرف البضاعة من المخزن','1','0',null,'0','124','sellbillController.php?do=showDetail&sellbillid=124'); -- id=1256
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1256', '402', '40943', '','0'); -- id=1265
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1225229.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1256', '382', '40943', '','0'); -- id=1256
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17574952.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1255,0,1256' where sellbillid=124;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 43375, 42230, 42230
                    , 42230, 40943, 41596.88, 40943
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,42230, 35691.2, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+43375, sellCostBuyPrice =sellCostBuyPrice+42230
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+42230, sellCostMeanBuyPrice = sellCostMeanBuyPrice+42230
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+40943, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+41596.88
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+40943
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+42230
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+35691.2
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 43375, 42230, 42230
                    , 42230, 40943, 41596.88, 40943
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,42230, 35691.2, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+43375, sellCostBuyPrice =sellCostBuyPrice+42230
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+42230, sellCostMeanBuyPrice = sellCostMeanBuyPrice+42230
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+40943, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+41596.88
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+40943
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+42230
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+35691.2
                        , returnSellVal = returnSellVal+0, 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, 43375, 42230, 42230
                    , 42230, 40943, 41596.88, 40943, 42230, 35691.2)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+43375, netSellCostBuyPrice = netSellCostBuyPrice+42230
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+42230
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+42230
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+40943
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+41596.88
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+40943
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+42230
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+35691.2;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac62a3186523 and sellbillId = 124 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:58:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:28:57", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 14:28:57', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3813
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:59:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:29:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:29:24', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3814
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('1415 ريد لاين','','113','330','330','330','330','2026-10-07','0','1','0','','0','0','0','0','0','330','330','330','330','330','0','0','0','0','.','0','0','0','330','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','330','330','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','330','0','0','0','0','0','0','','','0','0','0','0'); -- id=1574
UPDATE product SET productName = '1415 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '330', productSellAllPrice = '330', productSellUnitPrice = '330', productSellHalfPrice = '330', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01574',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1574';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1574', '1.00', '2026-10-07', '1', '0','0157401','330','330','330','330','','0','0','0','0','0','0','0','0','0','0'); -- id=1574
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1574', '1', '0', '1', '2026-10-07'); -- id=1599
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1574', '1', '0', '0', '1574', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2673
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1574, 1,'2026-10-07 14:29:24',1)
                ON DUPLICATE KEY UPDATE productid = 1574, edited = 1, sysdate = '2026-10-07 14:29:24', userid = 1; -- id=2389
UPDATE product SET productName = '1415 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '330.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01574',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1574';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('1414 ريد لاين','','113','525','525','525','525','2026-10-07','0','1','0','','0','0','0','0','0','525','525','525','525','525','0','0','0','0','.','0','0','0','525','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','525','525','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','525','0','0','0','0','0','0','','','0','0','0','0'); -- id=1575
UPDATE product SET productName = '1414 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '525', productSellAllPrice = '525', productSellUnitPrice = '525', productSellHalfPrice = '525', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01575',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '525',lastbuyprice_withDiscount = '525',meanbuyprice = '525',meanbuyprice_withDiscount = '525' , productbuypricereal = '525' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='525',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='525',meanbuyprice_withTax='525',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='525',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1575';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1575', '1.00', '2026-10-07', '1', '0','0157501','525','525','525','525','','0','0','0','0','0','0','0','0','0','0'); -- id=1575
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1575', '1', '0', '1', '2026-10-07'); -- id=1600
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1575', '1', '0', '0', '1575', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2674
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1575, 1,'2026-10-07 14:29:24',1)
                ON DUPLICATE KEY UPDATE productid = 1575, edited = 1, sysdate = '2026-10-07 14:29:24', userid = 1; -- id=2390
UPDATE product SET productName = '1414 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '525.00', productSellAllPrice = '525.00', productSellUnitPrice = '525.00', productSellHalfPrice = '525.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01575',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '525',lastbuyprice_withDiscount = '525',meanbuyprice = '525',meanbuyprice_withDiscount = '525' , productbuypricereal = '525' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='525',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='525',meanbuyprice_withTax='525',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='525',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1575';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديلات ريد لاين 500','','113','500','500','500','500','2026-10-07','0','1','0','','0','0','0','0','0','500','500','500','500','500','0','0','0','0','.','0','0','0','500','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','500','500','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','500','0','0','0','0','0','0','','','0','0','0','0'); -- id=1576
UPDATE product SET productName = 'موديلات ريد لاين 500', productDescription = '', productCatId = '113', productBuyPrice = '500', productSellAllPrice = '500', productSellUnitPrice = '500', productSellHalfPrice = '500', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01576',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1576';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1576', '1.00', '2026-10-07', '1', '0','0157601','500','500','500','500','','0','0','0','0','0','0','0','0','0','0'); -- id=1576
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1576', '1', '0', '1', '2026-10-07'); -- id=1601
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1576', '1', '0', '0', '1576', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2675
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1576, 1,'2026-10-07 14:29:24',1)
                ON DUPLICATE KEY UPDATE productid = 1576, edited = 1, sysdate = '2026-10-07 14:29:24', userid = 1; -- id=2391
UPDATE product SET productName = 'موديلات ريد لاين 500', productDescription = '', productCatId = '113', productBuyPrice = '500.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01576',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1576';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('1417 ريد لاين','','113','520','520','520','520','2026-10-07','0','1','0','','0','0','0','0','0','520','520','520','520','520','0','0','0','0','.','0','0','0','520','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','520','520','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','520','0','0','0','0','0','0','','','0','0','0','0'); -- id=1577
UPDATE product SET productName = '1417 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '520', productSellAllPrice = '520', productSellUnitPrice = '520', productSellHalfPrice = '520', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01577',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '520',lastbuyprice_withDiscount = '520',meanbuyprice = '520',meanbuyprice_withDiscount = '520' , productbuypricereal = '520' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='520',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='520',meanbuyprice_withTax='520',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='520',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1577';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1577', '1.00', '2026-10-07', '1', '0','0157701','520','520','520','520','','0','0','0','0','0','0','0','0','0','0'); -- id=1577
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1577', '1', '0', '1', '2026-10-07'); -- id=1602
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1577', '1', '0', '0', '1577', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2676
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1577, 1,'2026-10-07 14:29:24',1)
                ON DUPLICATE KEY UPDATE productid = 1577, edited = 1, sysdate = '2026-10-07 14:29:24', userid = 1; -- id=2392
UPDATE product SET productName = '1417 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '520.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01577',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '520',lastbuyprice_withDiscount = '520',meanbuyprice = '520',meanbuyprice_withDiscount = '520' , productbuypricereal = '520' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='520',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='520',meanbuyprice_withTax='520',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='520',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1577';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديلات ريد لاين 400','','113','400','400','400','400','2026-10-07','0','1','0','','0','0','0','0','0','400','400','400','400','400','0','0','0','0','.','0','0','0','400','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','400','400','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','400','0','0','0','0','0','0','','','0','0','0','0'); -- id=1578
UPDATE product SET productName = 'موديلات ريد لاين 400', productDescription = '', productCatId = '113', productBuyPrice = '400', productSellAllPrice = '400', productSellUnitPrice = '400', productSellHalfPrice = '400', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01578',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '400',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1578';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1578', '1.00', '2026-10-07', '1', '0','0157801','400','400','400','400','','0','0','0','0','0','0','0','0','0','0'); -- id=1578
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1578', '1', '0', '1', '2026-10-07'); -- id=1603
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1578', '1', '0', '0', '1578', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2677
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1578, 1,'2026-10-07 14:29:24',1)
                ON DUPLICATE KEY UPDATE productid = 1578, edited = 1, sysdate = '2026-10-07 14:29:24', userid = 1; -- id=2393
UPDATE product SET productName = 'موديلات ريد لاين 400', productDescription = '', productCatId = '113', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01578',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '400',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1578';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('1406 ريد لاين','','113','470','470','470','470','2026-10-07','0','1','0','','0','0','0','0','0','470','470','470','470','470','0','0','0','0','.','0','0','0','470','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','470','470','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','470','0','0','0','0','0','0','','','0','0','0','0'); -- id=1579
UPDATE product SET productName = '1406 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '470', productSellAllPrice = '470', productSellUnitPrice = '470', productSellHalfPrice = '470', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01579',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '470',lastbuyprice_withDiscount = '470',meanbuyprice = '470',meanbuyprice_withDiscount = '470' , productbuypricereal = '470' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='470',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='470',meanbuyprice_withTax='470',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='470',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1579';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1579', '1.00', '2026-10-07', '1', '0','0157901','470','470','470','470','','0','0','0','0','0','0','0','0','0','0'); -- id=1579
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1579', '1', '0', '1', '2026-10-07'); -- id=1604
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1579', '1', '0', '0', '1579', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2678
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1579, 1,'2026-10-07 14:29:24',1)
                ON DUPLICATE KEY UPDATE productid = 1579, edited = 1, sysdate = '2026-10-07 14:29:24', userid = 1; -- id=2394
UPDATE product SET productName = '1406 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '470.00', productSellAllPrice = '470.00', productSellUnitPrice = '470.00', productSellHalfPrice = '470.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01579',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '470',lastbuyprice_withDiscount = '470',meanbuyprice = '470',meanbuyprice_withDiscount = '470' , productbuypricereal = '470' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='470',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='470',meanbuyprice_withTax='470',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='470',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1579';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('1418 ريد لاين','','113','530','530','530','530','2026-10-07','0','1','0','','0','0','0','0','0','530','530','530','530','530','0','0','0','0','.','0','0','0','530','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','530','530','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','530','0','0','0','0','0','0','','','0','0','0','0'); -- id=1580
UPDATE product SET productName = '1418 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '530', productSellAllPrice = '530', productSellUnitPrice = '530', productSellHalfPrice = '530', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01580',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '530',meanbuyprice = '530',meanbuyprice_withDiscount = '530' , productbuypricereal = '530' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='530',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1580';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1580', '1.00', '2026-10-07', '1', '0','0158001','530','530','530','530','','0','0','0','0','0','0','0','0','0','0'); -- id=1580
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1580', '1', '0', '1', '2026-10-07'); -- id=1605
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1580', '1', '0', '0', '1580', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2679
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1580, 1,'2026-10-07 14:29:24',1)
                ON DUPLICATE KEY UPDATE productid = 1580, edited = 1, sysdate = '2026-10-07 14:29:24', userid = 1; -- id=2395
UPDATE product SET productName = '1418 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '530.00', productSellAllPrice = '530.00', productSellUnitPrice = '530.00', productSellHalfPrice = '530.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01580',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '530',meanbuyprice = '530',meanbuyprice_withDiscount = '530' , productbuypricereal = '530' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='530',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1580';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:59:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:29:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:29:25', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3815
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:59:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:29:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:29:27', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3816
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('ريد لاين', '', '', '', '', '0', '1', '2026-10-07 14:32:03', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=109
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('109', '0', '', '0', 'إضافة مورد جديد', '109', '', '2026-10-07 14:32:03', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=197
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('ريد لاين', 'ريد لاين', 'ريد لاين', 'ريد لاين', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-07 14:32:03'); -- id=592
UPDATE supplier SET suppliername = 'ريد لاين', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-07', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='592',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '109';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:02:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:32:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:32:13', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3817
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac62d17d29ce', '2026-10-07 14:29:27', '109', '0.00', '105150', '0', '0', '105150.00',  '105150.00', '0', '105150', '1', '2026-10-07 14:32:13', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=53
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01573', '53', '113', '1573', '30', '380', '11400.00', '0', '', '2026-10-07 14:32:13', '1573','','','0','0','0','0','0',null,'380','11400','0','0','0','0','0','0','0','0','1'); -- id=316
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1573, 0, 0
                    , 380, 30, 0, 0, 1, '2026-10-07 14:32:13')
                ON DUPLICATE KEY UPDATE buyprice = 380,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:32:13' ; -- id=392
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1573', '380', '30', '0', 'buyBillController.php', '316', '', '0', '0'); -- id=274
UPDATE product SET  productBuyPrice = "380" WHERE productId = 1573 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 316 ;
UPDATE product SET productName = '1401 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '380.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01573',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '380',meanbuyprice = '380',meanbuyprice_withDiscount = '380' , productbuypricereal = '380.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1573';
UPDATE buybilldetail SET  lastbuyprice = 380 , meanbuyprice = 380, lastbuyprice_withDiscount = 380, meanbuyprice_withDiscount = 380
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 380
                where buybilldetailid = 316;
UPDATE productunit SET proUnitBuyPrice  = 380 * productnumber WHERE productid = 1573;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1598';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1573', '1', '30', '0', '53', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 14:29:27','0','0'); -- id=2680
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01574', '53', '113', '1574', '21', '330', '6930.00', '0', '', '2026-10-07 14:32:13', '1574','','','0','0','0','0','0',null,'330','6930','0','0','0','0','0','0','0','0','1'); -- id=317
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1574, 0, 0
                    , 330, 21, 0, 0, 1, '2026-10-07 14:32:13')
                ON DUPLICATE KEY UPDATE buyprice = 330,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:32:13' ; -- id=393
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1574', '330', '21', '0', 'buyBillController.php', '317', '', '0', '0'); -- id=275
UPDATE product SET  productBuyPrice = "330" WHERE productId = 1574 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 317 ;
UPDATE product SET productName = '1415 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '330.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01574',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1574';
UPDATE buybilldetail SET  lastbuyprice = 330 , meanbuyprice = 330, lastbuyprice_withDiscount = 330, meanbuyprice_withDiscount = 330
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where buybilldetailid = 317;
UPDATE productunit SET proUnitBuyPrice  = 330 * productnumber WHERE productid = 1574;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1599';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1574', '1', '21', '0', '53', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-07 14:29:27','0','0'); -- id=2681
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01575', '53', '113', '1575', '24', '525', '12600.00', '0', '', '2026-10-07 14:32:13', '1575','','','0','0','0','0','0',null,'525','12600','0','0','0','0','0','0','0','0','1'); -- id=318
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1575, 0, 0
                    , 525, 24, 0, 0, 1, '2026-10-07 14:32:13')
                ON DUPLICATE KEY UPDATE buyprice = 525,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:32:13' ; -- id=394
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1575', '525', '24', '0', 'buyBillController.php', '318', '', '0', '0'); -- id=276
UPDATE product SET  productBuyPrice = "525" WHERE productId = 1575 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 318 ;
UPDATE product SET productName = '1414 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '525.00', productSellAllPrice = '525.00', productSellUnitPrice = '525.00', productSellHalfPrice = '525.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01575',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '525',lastbuyprice_withDiscount = '525',meanbuyprice = '525',meanbuyprice_withDiscount = '525' , productbuypricereal = '525.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='525',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='525',meanbuyprice_withTax='525',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='525',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1575';
UPDATE buybilldetail SET  lastbuyprice = 525 , meanbuyprice = 525, lastbuyprice_withDiscount = 525, meanbuyprice_withDiscount = 525
        , lastbuyprice_withTax = 525, meanbuyprice_withTax = 525, lastbuyprice_withDiscountAndTax = 525
                where buybilldetailid = 318;
UPDATE productunit SET proUnitBuyPrice  = 525 * productnumber WHERE productid = 1575;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1600';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1575', '1', '24', '0', '53', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-07 14:29:27','0','0'); -- id=2682
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01576', '53', '113', '1576', '24', '500', '12000.00', '0', '', '2026-10-07 14:32:13', '1576','','','0','0','0','0','0',null,'500','12000','0','0','0','0','0','0','0','0','1'); -- id=319
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1576, 0, 0
                    , 500, 24, 0, 0, 1, '2026-10-07 14:32:13')
                ON DUPLICATE KEY UPDATE buyprice = 500,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:32:13' ; -- id=395
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1576', '500', '24', '0', 'buyBillController.php', '319', '', '0', '0'); -- id=277
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1576 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 319 ;
UPDATE product SET productName = 'موديلات ريد لاين 500', productDescription = '', productCatId = '113', productBuyPrice = '500.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01576',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1576';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 500, meanbuyprice_withDiscount = 500
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where buybilldetailid = 319;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1576;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1601';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1576', '1', '24', '0', '53', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-07 14:29:27','0','0'); -- id=2683
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01577', '53', '113', '1577', '21', '520', '10920.00', '0', '', '2026-10-07 14:32:13', '1577','','','0','0','0','0','0',null,'520','10920','0','0','0','0','0','0','0','0','1'); -- id=320
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1577, 0, 0
                    , 520, 21, 0, 0, 1, '2026-10-07 14:32:13')
                ON DUPLICATE KEY UPDATE buyprice = 520,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:32:13' ; -- id=396
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1577', '520', '21', '0', 'buyBillController.php', '320', '', '0', '0'); -- id=278
UPDATE product SET  productBuyPrice = "520" WHERE productId = 1577 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 320 ;
UPDATE product SET productName = '1417 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '520.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01577',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '520',lastbuyprice_withDiscount = '520',meanbuyprice = '520',meanbuyprice_withDiscount = '520' , productbuypricereal = '520.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='520',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='520',meanbuyprice_withTax='520',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='520',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1577';
UPDATE buybilldetail SET  lastbuyprice = 520 , meanbuyprice = 520, lastbuyprice_withDiscount = 520, meanbuyprice_withDiscount = 520
        , lastbuyprice_withTax = 520, meanbuyprice_withTax = 520, lastbuyprice_withDiscountAndTax = 520
                where buybilldetailid = 320;
UPDATE productunit SET proUnitBuyPrice  = 520 * productnumber WHERE productid = 1577;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1602';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1577', '1', '21', '0', '53', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-07 14:29:27','0','0'); -- id=2684
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01576', '53', '113', '1576', '21', '500', '10500.00', '0', '', '2026-10-07 14:32:13', '1576','','','0','0','0','0','0',null,'500','10500','0','0','0','0','0','0','0','0','1'); -- id=321
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1576, 0, 0
                    , 500, 21, 0, 0, 1, '2026-10-07 14:32:13')
                ON DUPLICATE KEY UPDATE buyprice = 500,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:32:13' ; -- id=395
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1576', '500', '21', '0', 'buyBillController.php', '321', '', '0', '0'); -- id=279
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1576 ;
UPDATE buybilldetail SET  quantitybefore = 24 WHERE buybilldetailid = 321 ;
UPDATE product SET productName = 'موديلات ريد لاين 500', productDescription = '', productCatId = '113', productBuyPrice = '500.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01576',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1576';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 500, meanbuyprice_withDiscount = 500
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where buybilldetailid = 321;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1576;
UPDATE storedetail SET  productquantity = '45', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1601';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1576', '1', '21', '0', '53', 'اضافة فاتورة مشتريات', 'buyBillController.php', '24', '45', '1', '2026-10-07 14:29:27','0','0'); -- id=2685
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01578', '53', '113', '1578', '21', '400', '8400.00', '0', '', '2026-10-07 14:32:13', '1578','','','0','0','0','0','0',null,'400','8400','0','0','0','0','0','0','0','0','1'); -- id=322
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1578, 0, 0
                    , 400, 21, 0, 0, 1, '2026-10-07 14:32:13')
                ON DUPLICATE KEY UPDATE buyprice = 400,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:32:13' ; -- id=398
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1578', '400', '21', '0', 'buyBillController.php', '322', '', '0', '0'); -- id=280
UPDATE product SET  productBuyPrice = "400" WHERE productId = 1578 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 322 ;
UPDATE product SET productName = 'موديلات ريد لاين 400', productDescription = '', productCatId = '113', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01578',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '400',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1578';
UPDATE buybilldetail SET  lastbuyprice = 400 , meanbuyprice = 400, lastbuyprice_withDiscount = 400, meanbuyprice_withDiscount = 400
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where buybilldetailid = 322;
UPDATE productunit SET proUnitBuyPrice  = 400 * productnumber WHERE productid = 1578;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1603';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1578', '1', '21', '0', '53', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-07 14:29:27','0','0'); -- id=2686
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01579', '53', '113', '1579', '24', '470', '11280.00', '0', '', '2026-10-07 14:32:13', '1579','','','0','0','0','0','0',null,'470','11280','0','0','0','0','0','0','0','0','1'); -- id=323
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1579, 0, 0
                    , 470, 24, 0, 0, 1, '2026-10-07 14:32:13')
                ON DUPLICATE KEY UPDATE buyprice = 470,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:32:13' ; -- id=399
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1579', '470', '24', '0', 'buyBillController.php', '323', '', '0', '0'); -- id=281
UPDATE product SET  productBuyPrice = "470" WHERE productId = 1579 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 323 ;
UPDATE product SET productName = '1406 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '470.00', productSellAllPrice = '470.00', productSellUnitPrice = '470.00', productSellHalfPrice = '470.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01579',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '470',lastbuyprice_withDiscount = '470',meanbuyprice = '470',meanbuyprice_withDiscount = '470' , productbuypricereal = '470.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='470',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='470',meanbuyprice_withTax='470',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='470',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1579';
UPDATE buybilldetail SET  lastbuyprice = 470 , meanbuyprice = 470, lastbuyprice_withDiscount = 470, meanbuyprice_withDiscount = 470
        , lastbuyprice_withTax = 470, meanbuyprice_withTax = 470, lastbuyprice_withDiscountAndTax = 470
                where buybilldetailid = 323;
UPDATE productunit SET proUnitBuyPrice  = 470 * productnumber WHERE productid = 1579;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1604';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1579', '1', '24', '0', '53', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-07 14:29:27','0','0'); -- id=2687
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01578', '53', '113', '1578', '21', '400', '8400.00', '0', '', '2026-10-07 14:32:13', '1578','','','0','0','0','0','0',null,'400','8400','0','0','0','0','0','0','0','0','1'); -- id=324
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1578, 0, 0
                    , 400, 21, 0, 0, 1, '2026-10-07 14:32:13')
                ON DUPLICATE KEY UPDATE buyprice = 400,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:32:13' ; -- id=398
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1578', '400', '21', '0', 'buyBillController.php', '324', '', '0', '0'); -- id=282
UPDATE product SET  productBuyPrice = "400" WHERE productId = 1578 ;
UPDATE buybilldetail SET  quantitybefore = 21 WHERE buybilldetailid = 324 ;
UPDATE product SET productName = 'موديلات ريد لاين 400', productDescription = '', productCatId = '113', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01578',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '400',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1578';
UPDATE buybilldetail SET  lastbuyprice = 400 , meanbuyprice = 400, lastbuyprice_withDiscount = 400, meanbuyprice_withDiscount = 400
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where buybilldetailid = 324;
UPDATE productunit SET proUnitBuyPrice  = 400 * productnumber WHERE productid = 1578;
UPDATE storedetail SET  productquantity = '42', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1603';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1578', '1', '21', '0', '53', 'اضافة فاتورة مشتريات', 'buyBillController.php', '21', '42', '1', '2026-10-07 14:29:27','0','0'); -- id=2688
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01580', '53', '113', '1580', '24', '530', '12720.00', '0', '', '2026-10-07 14:32:13', '1580','','','0','0','0','0','0',null,'530','12720','0','0','0','0','0','0','0','0','1'); -- id=325
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1580, 0, 0
                    , 530, 24, 0, 0, 1, '2026-10-07 14:32:13')
                ON DUPLICATE KEY UPDATE buyprice = 530,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:32:13' ; -- id=401
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1580', '530', '24', '0', 'buyBillController.php', '325', '', '0', '0'); -- id=283
UPDATE product SET  productBuyPrice = "530" WHERE productId = 1580 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 325 ;
UPDATE product SET productName = '1418 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '530.00', productSellAllPrice = '530.00', productSellUnitPrice = '530.00', productSellHalfPrice = '530.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01580',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '530',meanbuyprice = '530',meanbuyprice_withDiscount = '530' , productbuypricereal = '530.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='530',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='530',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1580';
UPDATE buybilldetail SET  lastbuyprice = 530 , meanbuyprice = 530, lastbuyprice_withDiscount = 530, meanbuyprice_withDiscount = 530
        , lastbuyprice_withTax = 530, meanbuyprice_withTax = 530, lastbuyprice_withDiscountAndTax = 530
                where buybilldetailid = 325;
UPDATE productunit SET proUnitBuyPrice  = 530 * productnumber WHERE productid = 1580;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1605';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1580', '1', '24', '0', '53', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-07 14:29:27','0','0'); -- id=2689
UPDATE supplier SET  suppliercurrentDebt = '105150',suppliercurrentDebtInCurrency= '105150' , userid = '1', supplierdate = '2026-10-07 14:32:13'   WHERE supplierid = '109';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('109', '0.00', '105150', '0', 'اضافة فاتورة مشتريات', '53', '105150', '2026-10-07 14:29:27', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','105150','1','0','105150','105150','0',''); -- id=198
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '105150', '105150', '2026-10-07', '1', '0', '0', '2026-10-07 14:32:13','اضافة فاتورة مشتريات رقم 53','1','0',null,'0','53','buyBillController.php?do=details&id=53'); -- id=1257
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1257', '382', '105150', '','0'); -- id=1266
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17680102.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1257', '592', '105150', '','0'); -- id=1257
UPDATE accountstree SET name = 'ريد لاين', customName = 'ريد لاين', customNameEn = 'ريد لاين', nameEn = 'ريد لاين', parent = '81', accountNature = '1', theValue = '105150', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 14:32:03' WHERE id = '592';
update buybill set dailyentryid='1257,0' where buybillid=53;
COMMIT;
UPDATE product SET overAllAveragePrice = 380 WHERE productId = 1573;UPDATE product SET overAllAveragePrice = 330 WHERE productId = 1574;UPDATE product SET overAllAveragePrice = 525 WHERE productId = 1575;UPDATE product SET overAllAveragePrice = 500 WHERE productId = 1576;UPDATE product SET overAllAveragePrice = 520 WHERE productId = 1577;UPDATE product SET overAllAveragePrice = 400 WHERE productId = 1578;UPDATE product SET overAllAveragePrice = 470 WHERE productId = 1579;UPDATE product SET overAllAveragePrice = 530 WHERE productId = 1580;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:02:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:32:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:32:14', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=53'); -- id=3818
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:02:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:32:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:32:17', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=53&type=2'); -- id=3819
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:05:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:35:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:35:16', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=53&type=2'); -- id=3820
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:07:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:37:26", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 14:37:26', '4', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3821

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac615d4a5a5f
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 14:37:26', '06ac615d4a5a5f', '1', '0.00', '0', '0', '1', '14170.00', '14170', '14170', '0', '2', '2026-10-07 14:37:26', '', '4', '0', 'نقدي', '3', '0', '3', '0', 'نقدي', '35' ,'0','','','','','-1','0','0','0','0','0','14170','0','','0','0','14170','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=125
UPDATE client SET  clientdebt = '0', userid = '4' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','125', '0', '2026-10-07 14:37:26', '4', 'sellbillController.php', 'اضافة فاتورة مبيعات', '14170', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 14:37:26','0','0','',''); -- id=215
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 133;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('350','01325', '125', '87', '1325', '9', '390', '3510', '0', '', '0', '2026-10-07 14:37:26', '1325', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','133-9,','1','1','0','0','390','3510','0','','0','0.00','0','0','0','0'); -- id=501
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 = 501;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1325, '2026-10-07', 3510, 3150, 3150
                    , 3150, 3150, 3150, 3150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 3150, 3150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3510, sellCostBuyPrice =sellCostBuyPrice+3150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3150
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+9
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-07', 3510, 3150, 3150
                    , 3150, 3150, 3150, 3150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3150, 3150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3510, sellCostBuyPrice =sellCostBuyPrice+3150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3150
                        , returnSellVal = returnSellVal+0, 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 = '273', userid = '4', storedetaildate = '2026-10-07 14:37:26' WHERE storedetailid = '1406';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1325', '2', '9', '1', '125', 'اضافة فاتورة مبيعات', 'sellbillController.php', '282', '273', '4', '2026-10-07 14:37:26','0','0'); -- id=2690
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 133;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('350','01325', '125', '87', '1325', '6', '390', '2340', '0', '', '0', '2026-10-07 14:37:26', '1325', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','133-6,','1','1','0','0','390','2340','0','','0','0.00','0','0','0','0'); -- id=502
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 = 502;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1325, '2026-10-07', 2340, 2100, 2100
                    , 2100, 2100, 2100, 2100
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 2100, 2100, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2340, sellCostBuyPrice =sellCostBuyPrice+2100
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2100, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2100
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2100, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2100
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2100
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2100
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2100
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-07', 2340, 2100, 2100
                    , 2100, 2100, 2100, 2100
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2100, 2100, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2340, sellCostBuyPrice =sellCostBuyPrice+2100
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2100, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2100
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2100, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2100
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2100
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2100
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2100
                        , returnSellVal = returnSellVal+0, 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 = '267', userid = '4', storedetaildate = '2026-10-07 14:37:26' WHERE storedetailid = '1406';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1325', '2', '6', '1', '125', 'اضافة فاتورة مبيعات', 'sellbillController.php', '273', '267', '4', '2026-10-07 14:37:26','0','0'); -- id=2691
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+8 where id = 139;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('370','01362', '125', '89', '1362', '8', '410', '3280', '0', '', '0', '2026-10-07 14:37:26', '1362', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','139-8,','1','1','0','0','410','3280','0','','0','0.00','0','0','0','0'); -- id=503
UPDATE sellbilldetail SET  lastbuyprice = 370.00 , meanbuyprice = 370.00, lastbuyprice_withDiscount = 370.00, meanbuyprice_withDiscount = 370.00
        , lastbuyprice_withTax = 370, meanbuyprice_withTax = 370, lastbuyprice_withDiscountAndTax = 370
                where sellbilldetailid = 503;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1362, '2026-10-07', 3280, 2960, 2960
                    , 2960, 2960, 2960, 2960
                    , 0, 0, 0, 0
                    , 0, 0, 0, 8, 0, 2960, 2960, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3280, sellCostBuyPrice =sellCostBuyPrice+2960
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2960, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2960
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2960, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2960
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2960
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2960
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2960
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+8
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-07', 3280, 2960, 2960
                    , 2960, 2960, 2960, 2960
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2960, 2960, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3280, sellCostBuyPrice =sellCostBuyPrice+2960
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2960, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2960
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2960, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2960
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2960
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2960
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2960
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '4', storedetaildate = '2026-10-07 14:37:26' WHERE storedetailid = '1409';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1362', '2', '8', '1', '125', 'اضافة فاتورة مبيعات', 'sellbillController.php', '8', '0', '4', '2026-10-07 14:37:26','0','0'); -- id=2692
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+12 where id = 147;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('400','01356', '125', '88', '1356', '12', '420', '5040', '0', '', '0', '2026-10-07 14:37:26', '1356', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','147-12,','1','1','0','0','420','5040','0','','0','0.00','0','0','0','0'); -- id=504
UPDATE sellbilldetail SET  lastbuyprice = 400.00 , meanbuyprice = 400.00, lastbuyprice_withDiscount = 400.00, meanbuyprice_withDiscount = 400.00
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where sellbilldetailid = 504;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1356, '2026-10-07', 5040, 4800, 4800
                    , 4800, 4800, 4800, 4800
                    , 0, 0, 0, 0
                    , 0, 0, 0, 12, 0, 4800, 4800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5040, sellCostBuyPrice =sellCostBuyPrice+4800
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4800, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4800
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4800, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4800
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4800
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4800
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4800
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+12
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-07', 5040, 4800, 4800
                    , 4800, 4800, 4800, 4800
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4800, 4800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5040, sellCostBuyPrice =sellCostBuyPrice+4800
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4800, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4800
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4800, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4800
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4800
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4800
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4800
                        , returnSellVal = returnSellVal+0, 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 = '76', userid = '4', storedetaildate = '2026-10-07 14:37:26' WHERE storedetailid = '1413';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1356', '2', '12', '1', '125', 'اضافة فاتورة مبيعات', 'sellbillController.php', '88', '76', '4', '2026-10-07 14:37:26','0','0'); -- id=2693
CALL saveInUse(3,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '245600',  userid = '4' WHERE saveid = '3';
UPDATE save SET  inUse = 0 where saveid = 3;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('231430','14170', '0', '3', 'اضافة فاتورة مبيعات', '125', '245600', '2026-10-07 14:37:26', '4',  'sellbillController.php','1','','0'); -- id=154
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '14170', '14170', '2026-10-07', '4', '0', '0', '2026-10-07 14:37:26','اضافة فاتورة مبيعات رقم 125','1','0',null,'0','125','sellbillController.php?do=showDetail&sellbillid=125'); -- id=1258
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1258', '501', '14170', '','0'); -- id=1267
UPDATE accountstree SET name = 'خزينه المحل الارضي', customName = 'خزينه المحل الارضي', customNameEn = 'خزينه المحل الارضي', nameEn = 'خزينه المحل الارضي', parent = '40', accountNature = '0', theValue = '245600', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-30 21:35:47' WHERE id = '501';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1258', '143', '14170', '','0'); -- id=1258
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1281820', 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 ( '13010', '13010', '2026-10-07', '4', '0', '0', '2026-10-07 14:37:26','اضافة فاتورة مبيعات رقم 125 - صرف البضاعة من المخزن','1','0',null,'0','125','sellbillController.php?do=showDetail&sellbillid=125'); -- id=1259
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1259', '402', '13010', '','0'); -- id=1268
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1238239.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1259', '492', '13010', '','0'); -- id=1259
UPDATE accountstree SET name = 'مخزن المحل', customName = 'مخزن المحل', customNameEn = 'مخزن المحل', nameEn = 'مخزن المحل', parent = '49', accountNature = '0', theValue = '836050', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 19:38:59' WHERE id = '492';
update sellbill set dailyentryid='1258,0,1259' where sellbillid=125;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 14170, 13010, 13010
                    , 13010, 13010, 13010, 13010
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,13010, 13010, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+14170, sellCostBuyPrice =sellCostBuyPrice+13010
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+13010, sellCostMeanBuyPrice = sellCostMeanBuyPrice+13010
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+13010, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+13010
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+13010
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+13010
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+13010
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 14170, 13010, 13010
                    , 13010, 13010, 13010, 13010
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,13010, 13010, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+14170, sellCostBuyPrice =sellCostBuyPrice+13010
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+13010, sellCostMeanBuyPrice = sellCostMeanBuyPrice+13010
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+13010, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+13010
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+13010
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+13010
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+13010
                        , returnSellVal = returnSellVal+0, 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, 14170, 13010, 13010
                    , 13010, 13010, 13010, 13010, 13010, 13010)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+14170, netSellCostBuyPrice = netSellCostBuyPrice+13010
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+13010
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+13010
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+13010
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+13010
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+13010
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+13010
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+13010;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac615d4a5a5f and sellbillId = 125 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:07:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:37:26", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 14:37:26', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3822
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:07:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:37:59", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 14:37:59', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3823
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:08:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:38:16", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 14:38:16', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3824
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:10:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:40:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-07 14:40:04', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3825
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:10:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:40:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-07 14:40:14', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3826
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:11:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:41:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:41:43', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3827
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:11:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:41:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:41:53', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3828
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:12:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:42:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 14:42:08', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3829
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:12:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:42:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 14:42:14', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3830
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:12:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:42:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreport.php', '2026-10-07 14:42:36', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreport.php'); -- id=3831
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:12:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:42:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('profitreportController.php', '2026-10-07 14:42:48', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/profitreportController.php'); -- id=3832
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:13:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:43:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('clientReportsController.php', '2026-10-07 14:43:07', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/clientReportsController.php'); -- id=3833
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:13:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:43:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 14:43:18', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3834
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:13:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:43:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 14:43:24', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3835
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:13:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:43:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:43:34', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=3836
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:13:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:43:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:43:42', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php?do=show'); -- id=3837
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:21:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:51:12", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 14:51:12', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3838

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac62cfa063bc
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 14:51:12', '06ac62cfa063bc', '1', '0.00', '0', '235', '1', '29735.00', '29500', '29500', '0', '1', '2026-10-07 14:51:12', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '54' ,'0','','','','','-1','0','0','0','0','0','29500','0','','0','0','29500','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=126
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','اضافة فاتورة مبيعات','126', '0', '2026-10-07 14:51:12', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '29500', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 14:51:12','0','0','',''); -- id=216
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('530','09460', '126', '37', '1092', '10', '550', '5500', '0', '', '0', '2026-10-07 14:51:12', '1092', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','550','5500','0','','0','0.00','0','0','0','0'); -- id=505
UPDATE sellbilldetail SET  lastbuyprice = 530.00 , meanbuyprice = 530.00, lastbuyprice_withDiscount = 530.00, meanbuyprice_withDiscount = 530.00
        , lastbuyprice_withTax = 530, meanbuyprice_withTax = 530, lastbuyprice_withDiscountAndTax = 530
                where sellbilldetailid = 505;
 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 (1092, '2026-10-07', 5456.5327055658, 5300, 5300
                    , 5300, 5300, 5300, 5300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 5300, 5300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5456.5327055658, sellCostBuyPrice =sellCostBuyPrice+5300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5300, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5300
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 5456.5327055658, 5300, 5300
                    , 5300, 5300, 5300, 5300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5300, 5300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5456.5327055658, sellCostBuyPrice =sellCostBuyPrice+5300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5300, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5300
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-07 14:51:12' WHERE storedetailid = '1092';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1092', '1', '10', '1', '126', 'اضافة فاتورة مبيعات', 'sellbillController.php', '25', '15', '2', '2026-10-07 14:51:12','0','0'); -- id=2694
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('580','i0000923', '126', '28', '923', '5', '600', '3000', '0', '', '0', '2026-10-07 14:51:12', '923', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','600','3000','0','','0','0.00','0','0','0','0'); -- id=506
UPDATE sellbilldetail SET  lastbuyprice = 580.00 , meanbuyprice = 580.00, lastbuyprice_withDiscount = 580.00, meanbuyprice_withDiscount = 580.00
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 580
                where sellbilldetailid = 506;
 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 (923, '2026-10-07', 2976.2905666723, 2900, 2900
                    , 2900, 2900, 2900, 2900
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2900, 2900, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2976.2905666723, sellCostBuyPrice =sellCostBuyPrice+2900
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2900, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2900
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2900, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2900
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2900
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2900
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2900
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2976.2905666723, 2900, 2900
                    , 2900, 2900, 2900, 2900
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2900, 2900, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2976.2905666723, sellCostBuyPrice =sellCostBuyPrice+2900
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2900, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2900
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2900, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2900
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2900
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2900
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2900
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '10', userid = '2', storedetaildate = '2026-10-07 14:51:12' WHERE storedetailid = '923';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('923', '1', '5', '1', '126', 'اضافة فاتورة مبيعات', 'sellbillController.php', '15', '10', '2', '2026-10-07 14:51:12','0','0'); -- id=2695
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 378;
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 ('610','01560', '126', '28', '1560', '5', '630', '3150', '0', '', '0', '2026-10-07 14:51:12', '1560', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','378-5,','1','1','0','0','630','3150','0','','0','0.00','0','0','0','0'); -- id=507
UPDATE sellbilldetail SET  lastbuyprice = 610.00 , meanbuyprice = 610.00, lastbuyprice_withDiscount = 610.00, meanbuyprice_withDiscount = 610.00
        , lastbuyprice_withTax = 610, meanbuyprice_withTax = 610, lastbuyprice_withDiscountAndTax = 610
                where sellbilldetailid = 507;
 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 (1560, '2026-10-07', 3125.1050950059, 3050, 3050
                    , 3050, 3050, 3050, 3050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 3050, 3050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3125.1050950059, sellCostBuyPrice =sellCostBuyPrice+3050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3125.1050950059, 3050, 3050
                    , 3050, 3050, 3050, 3050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3050, 3050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3125.1050950059, sellCostBuyPrice =sellCostBuyPrice+3050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '5', userid = '2', storedetaildate = '2026-10-07 14:51:12' WHERE storedetailid = '1585';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1560', '1', '5', '1', '126', 'اضافة فاتورة مبيعات', 'sellbillController.php', '10', '5', '2', '2026-10-07 14:51:12','0','0'); -- id=2696
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 372;
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 ('532','01554', '126', '8', '1554', '5', '560', '2800', '0', '', '0', '2026-10-07 14:51:12', '1554', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','372-5,','1','1','0','0','560','2800','0','','0','0.00','0','0','0','0'); -- id=508
UPDATE sellbilldetail SET  lastbuyprice = 532.00 , meanbuyprice = 532.00, lastbuyprice_withDiscount = 532.00, meanbuyprice_withDiscount = 532.00
        , lastbuyprice_withTax = 532, meanbuyprice_withTax = 532, lastbuyprice_withDiscountAndTax = 532
                where sellbilldetailid = 508;
 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 (1554, '2026-10-07', 2777.8711955608, 2660, 2660
                    , 2660, 2660, 2660, 2660
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2660, 2660, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2777.8711955608, sellCostBuyPrice =sellCostBuyPrice+2660
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2660, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2660
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2660, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2660
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2660
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2660
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2660
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2777.8711955608, 2660, 2660
                    , 2660, 2660, 2660, 2660
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2660, 2660, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2777.8711955608, sellCostBuyPrice =sellCostBuyPrice+2660
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2660, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2660
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2660, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2660
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2660
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2660
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2660
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '20', userid = '2', storedetaildate = '2026-10-07 14:51:12' WHERE storedetailid = '1579';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1554', '1', '5', '1', '126', 'اضافة فاتورة مبيعات', 'sellbillController.php', '25', '20', '2', '2026-10-07 14:51:12','0','0'); -- id=2697
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 375;
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 ('617','01557', '126', '8', '1557', '5', '645', '3225', '0', '', '0', '2026-10-07 14:51:12', '1557', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','375-5,','1','1','0','0','645','3225','0','','0','0.00','0','0','0','0'); -- id=509
UPDATE sellbilldetail SET  lastbuyprice = 617.00 , meanbuyprice = 617.00, lastbuyprice_withDiscount = 617.00, meanbuyprice_withDiscount = 617.00
        , lastbuyprice_withTax = 617, meanbuyprice_withTax = 617, lastbuyprice_withDiscountAndTax = 617
                where sellbilldetailid = 509;
 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 (1557, '2026-10-07', 3199.5123591727, 3085, 3085
                    , 3085, 3085, 3085, 3085
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 3085, 3085, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3199.5123591727, sellCostBuyPrice =sellCostBuyPrice+3085
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3085, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3085
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3085, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3085
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3085
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3085
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3085
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3199.5123591727, 3085, 3085
                    , 3085, 3085, 3085, 3085
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3085, 3085, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3199.5123591727, sellCostBuyPrice =sellCostBuyPrice+3085
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3085, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3085
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3085, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3085
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3085
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3085
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3085
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '10', userid = '2', storedetaildate = '2026-10-07 14:51:12' WHERE storedetailid = '1582';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1557', '1', '5', '1', '126', 'اضافة فاتورة مبيعات', 'sellbillController.php', '15', '10', '2', '2026-10-07 14:51:12','0','0'); -- id=2698
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 76;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('441','01384', '126', '95', '1384', '6', '490', '2940', '0', '', '0', '2026-10-07 14:51:12', '1384', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','76-6,','1','1','0','0','490','2940','0','','0','0.00','0','0','0','0'); -- id=510
UPDATE sellbilldetail SET  lastbuyprice = 490.00 , meanbuyprice = 490.00, lastbuyprice_withDiscount = 441.00, meanbuyprice_withDiscount = 465.50
        , lastbuyprice_withTax = 490, meanbuyprice_withTax = 245, lastbuyprice_withDiscountAndTax = 441
                where sellbilldetailid = 510;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1384, '2026-10-07', 2916.7647553388, 2940, 2940
                    , 2940, 2646, 2793, 2646
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 2940, 1470, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2916.7647553388, sellCostBuyPrice =sellCostBuyPrice+2940
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2940, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2940
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2646, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2793
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2646
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2940
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1470
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2916.7647553388, 2940, 2940
                    , 2940, 2646, 2793, 2646
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2940, 1470, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2916.7647553388, sellCostBuyPrice =sellCostBuyPrice+2940
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2940, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2940
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2646, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2793
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2646
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2940
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1470
                        , returnSellVal = returnSellVal+0, 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 = '351', userid = '2', storedetaildate = '2026-10-07 14:51:12' WHERE storedetailid = '1384';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1384', '1', '6', '1', '126', 'اضافة فاتورة مبيعات', 'sellbillController.php', '357', '351', '2', '2026-10-07 14:51:12','0','0'); -- id=2699
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+8 where id = 248;
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 ('570','01485', '126', '107', '1485', '8', '610', '4880', '0', '', '0', '2026-10-07 14:51:12', '1485', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','248-8,','1','1','0','0','610','4880','0','','0','0.00','0','0','0','0'); -- id=511
UPDATE sellbilldetail SET  lastbuyprice = 570.00 , meanbuyprice = 570.00, lastbuyprice_withDiscount = 570.00, meanbuyprice_withDiscount = 570.00
        , lastbuyprice_withTax = 570, meanbuyprice_withTax = 570, lastbuyprice_withDiscountAndTax = 570
                where sellbilldetailid = 511;
 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 (1485, '2026-10-07', 4841.4326551202, 4560, 4560
                    , 4560, 4560, 4560, 4560
                    , 0, 0, 0, 0
                    , 0, 0, 0, 8, 0, 4560, 4560, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4841.4326551202, sellCostBuyPrice =sellCostBuyPrice+4560
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4560, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4560
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4560, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4560
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4560
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4560
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4560
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+8
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 4841.4326551202, 4560, 4560
                    , 4560, 4560, 4560, 4560
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4560, 4560, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4841.4326551202, sellCostBuyPrice =sellCostBuyPrice+4560
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4560, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4560
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4560, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4560
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4560
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4560
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4560
                        , returnSellVal = returnSellVal+0, 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 = '16', userid = '2', storedetaildate = '2026-10-07 14:51:12' WHERE storedetailid = '1510';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1485', '1', '8', '1', '126', 'اضافة فاتورة مبيعات', 'sellbillController.php', '24', '16', '2', '2026-10-07 14:51:12','0','0'); -- id=2700
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 208;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('330','01427', '126', '100', '1427', '6', '360', '2160', '0', '', '0', '2026-10-07 14:51:12', '1427', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','208-6,','1','1','0','0','360','2160','0','','0','0.00','0','0','0','0'); -- id=512
UPDATE sellbilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where sellbilldetailid = 512;
 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 (1427, '2026-10-07', 2142.929208004, 1980, 1980
                    , 1980, 1980, 1980, 1980
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 1980, 1980, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2142.929208004, sellCostBuyPrice =sellCostBuyPrice+1980
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1980, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1980
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1980, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1980
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1980
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1980
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1980
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2142.929208004, 1980, 1980
                    , 1980, 1980, 1980, 1980
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1980, 1980, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2142.929208004, sellCostBuyPrice =sellCostBuyPrice+1980
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1980, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1980
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1980, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1980
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1980
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1980
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1980
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-07 14:51:12' WHERE storedetailid = '1440';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1427', '1', '6', '1', '126', 'اضافة فاتورة مبيعات', 'sellbillController.php', '21', '15', '2', '2026-10-07 14:51:12','0','0'); -- id=2701
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+4 where id = 250;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('480','01487', '126', '107', '1487', '4', '520', '2080', '0', '', '0', '2026-10-07 14:51:12', '1487', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','250-4,','1','1','0','0','520','2080','0','','0','0.00','0','0','0','0'); -- id=513
UPDATE sellbilldetail SET  lastbuyprice = 480.00 , meanbuyprice = 480.00, lastbuyprice_withDiscount = 480.00, meanbuyprice_withDiscount = 480.00
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 480, lastbuyprice_withDiscountAndTax = 480
                where sellbilldetailid = 513;
 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 (1487, '2026-10-07', 2063.5614595594, 1920, 1920
                    , 1920, 1920, 1920, 1920
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4, 0, 1920, 1920, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2063.5614595594, sellCostBuyPrice =sellCostBuyPrice+1920
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1920, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1920
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1920, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1920
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1920
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1920
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1920
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+4
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2063.5614595594, 1920, 1920
                    , 1920, 1920, 1920, 1920
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1920, 1920, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2063.5614595594, sellCostBuyPrice =sellCostBuyPrice+1920
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1920, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1920
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1920, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1920
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1920
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1920
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1920
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '20', userid = '2', storedetaildate = '2026-10-07 14:51:12' WHERE storedetailid = '1512';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1487', '1', '4', '1', '126', 'اضافة فاتورة مبيعات', 'sellbillController.php', '24', '20', '2', '2026-10-07 14:51:12','0','0'); -- id=2702
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '617585',  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 ('588085','29500', '0', '2', 'اضافة فاتورة مبيعات', '126', '617585', '2026-10-07 14:51:12', '2',  'sellbillController.php','1','','0'); -- id=155
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '29735', '29735', '2026-10-07', '2', '0', '0', '2026-10-07 14:51:12','اضافة فاتورة مبيعات رقم 126','1','0',null,'0','126','sellbillController.php?do=showDetail&sellbillid=126'); -- id=1260
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1260', '419', '29500', '','0'); -- id=1269
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '617585', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-27 18:07:37' WHERE id = '419';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1260', '398', '235', '','0'); -- id=1270
UPDATE accountstree SET name = 'خصم مسموح به', customName = 'خصم مسموح به', customNameEn = '', nameEn = '', parent = '158', accountNature = '0', theValue = '136433', theOrder = '0', layingOrder = '51', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-08-08 17:58:26' WHERE id = '398';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1260', '143', '29735', '','0'); -- id=1260
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1311555', 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 ( '28101', '28101', '2026-10-07', '2', '0', '0', '2026-10-07 14:51:12','اضافة فاتورة مبيعات رقم 126 - صرف البضاعة من المخزن','1','0',null,'0','126','sellbillController.php?do=showDetail&sellbillid=126'); -- id=1261
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1261', '402', '28101', '','0'); -- id=1271
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1266340.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1261', '382', '28101', '','0'); -- id=1261
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17652001.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1260,0,1261' where sellbillid=126;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 29500, 28395, 28395
                    , 28395, 28101, 28248, 28101
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,28395, 26925, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+29500, sellCostBuyPrice =sellCostBuyPrice+28395
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+28395, sellCostMeanBuyPrice = sellCostMeanBuyPrice+28395
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+28101, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+28248
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+28101
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+28395
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+26925
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 29500, 28395, 28395
                    , 28395, 28101, 28248, 28101
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,28395, 26925, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+29500, sellCostBuyPrice =sellCostBuyPrice+28395
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+28395, sellCostMeanBuyPrice = sellCostMeanBuyPrice+28395
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+28101, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+28248
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+28101
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+28395
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+26925
                        , returnSellVal = returnSellVal+0, 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, 29500, 28395, 28395
                    , 28395, 28101, 28248, 28101, 28395, 26925)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+29500, netSellCostBuyPrice = netSellCostBuyPrice+28395
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+28395
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+28395
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+28101
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+28248
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+28101
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+28395
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+26925;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac62cfa063bc and sellbillId = 126 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:21:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:51:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 14:51:13', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3839
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:22:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:52:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:52:35', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3840
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:22:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:52:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 14:52:37', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3841
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:22:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:52:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 14:52:55', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3842
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('ماجيك مان','2026-10-07','','93', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=114
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (114, 1,'2026-10-07 14:52:55',1)
                ON DUPLICATE KEY UPDATE catid = 114, edited = 1, sysdate = '2026-10-07 14:52:55', userid = 1; -- id=116
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '114', '1', '2026-10-07', '1', '0'); -- id=28
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:22:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:52:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 14:52:55', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3843
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:22:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:52:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 14:52:57', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3844
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:23:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:53:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:53:01', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3845
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:24:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:54:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:54:27', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3846
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكيت جلد ماجيك مان','','114','650','650','650','650','2026-10-07','0','1','0','','0','0','0','0','0','650','650','650','650','650','0','0','0','0','.','0','0','0','650','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','650','650','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','650','0','0','0','0','0','0','','','0','0','0','0'); -- id=1581
UPDATE product SET productName = 'جاكيت جلد ماجيك مان', productDescription = '', productCatId = '114', productBuyPrice = '650', productSellAllPrice = '650', productSellUnitPrice = '650', productSellHalfPrice = '650', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01581',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650',lastbuyprice_withDiscount = '650',meanbuyprice = '650',meanbuyprice_withDiscount = '650' , productbuypricereal = '650' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1581';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1581', '1.00', '2026-10-07', '1', '0','0158101','650','650','650','650','','0','0','0','0','0','0','0','0','0','0'); -- id=1581
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1581', '1', '0', '1', '2026-10-07'); -- id=1606
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1581', '1', '0', '0', '1581', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2703
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1581, 1,'2026-10-07 14:54:27',1)
                ON DUPLICATE KEY UPDATE productid = 1581, edited = 1, sysdate = '2026-10-07 14:54:27', userid = 1; -- id=2396
UPDATE product SET productName = 'جاكيت جلد ماجيك مان', productDescription = '', productCatId = '114', productBuyPrice = '650.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01581',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650',lastbuyprice_withDiscount = '650',meanbuyprice = '650',meanbuyprice_withDiscount = '650' , productbuypricereal = '650' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='650',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1581';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('تي شيرت هودي ماجيك مان','','114','410','410','410','410','2026-10-07','0','1','0','','0','0','0','0','0','410','410','410','410','410','0','0','0','0','.','0','0','0','410','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','410','410','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','410','0','0','0','0','0','0','','','0','0','0','0'); -- id=1582
UPDATE product SET productName = 'تي شيرت هودي ماجيك مان', productDescription = '', productCatId = '114', productBuyPrice = '410', productSellAllPrice = '410', productSellUnitPrice = '410', productSellHalfPrice = '410', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01582',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410',meanbuyprice_withDiscount = '410' , productbuypricereal = '410' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='410',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1582';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1582', '1.00', '2026-10-07', '1', '0','0158201','410','410','410','410','','0','0','0','0','0','0','0','0','0','0'); -- id=1582
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1582', '1', '0', '1', '2026-10-07'); -- id=1607
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1582', '1', '0', '0', '1582', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2704
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1582, 1,'2026-10-07 14:54:27',1)
                ON DUPLICATE KEY UPDATE productid = 1582, edited = 1, sysdate = '2026-10-07 14:54:27', userid = 1; -- id=2397
UPDATE product SET productName = 'تي شيرت هودي ماجيك مان', productDescription = '', productCatId = '114', productBuyPrice = '410.00', productSellAllPrice = '410.00', productSellUnitPrice = '410.00', productSellHalfPrice = '410.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01582',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410',meanbuyprice_withDiscount = '410' , productbuypricereal = '410' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='410',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1582';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('تي شيرت حوض ماجيك مان','','114','375','375','375','375','2026-10-07','0','1','0','','0','0','0','0','0','375','375','375','375','375','0','0','0','0','.','0','0','0','375','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','375','375','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','375','0','0','0','0','0','0','','','0','0','0','0'); -- id=1583
UPDATE product SET productName = 'تي شيرت حوض ماجيك مان', productDescription = '', productCatId = '114', productBuyPrice = '375', productSellAllPrice = '375', productSellUnitPrice = '375', productSellHalfPrice = '375', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01583',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '375',lastbuyprice_withDiscount = '375',meanbuyprice = '375',meanbuyprice_withDiscount = '375' , productbuypricereal = '375' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='375',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='375',meanbuyprice_withTax='375',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='375',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1583';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1583', '1.00', '2026-10-07', '1', '0','0158301','375','375','375','375','','0','0','0','0','0','0','0','0','0','0'); -- id=1583
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1583', '1', '0', '1', '2026-10-07'); -- id=1608
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1583', '1', '0', '0', '1583', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2705
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1583, 1,'2026-10-07 14:54:27',1)
                ON DUPLICATE KEY UPDATE productid = 1583, edited = 1, sysdate = '2026-10-07 14:54:27', userid = 1; -- id=2398
UPDATE product SET productName = 'تي شيرت حوض ماجيك مان', productDescription = '', productCatId = '114', productBuyPrice = '375.00', productSellAllPrice = '375.00', productSellUnitPrice = '375.00', productSellHalfPrice = '375.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01583',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '375',lastbuyprice_withDiscount = '375',meanbuyprice = '375',meanbuyprice_withDiscount = '375' , productbuypricereal = '375' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='375',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='375',meanbuyprice_withTax='375',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='375',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1583';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:24:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:54:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:54:29', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3847
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:24:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:54:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:54:30', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3848
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('ماجيك مان', '', '', '', '', '0', '1', '2026-10-07 14:54:42', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=110
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('110', '0', '', '0', 'إضافة مورد جديد', '110', '', '2026-10-07 14:54:42', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=199
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('ماجيك مان', 'ماجيك مان', 'ماجيك مان', 'ماجيك مان', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-07 14:54:42'); -- id=593
UPDATE supplier SET suppliername = 'ماجيك مان', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-07', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='593',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '110';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:25:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:55:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:55:19', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3849
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac632f6a0f7b', '2026-10-07 14:54:30', '110', '0.00', '27684', '10', '1', '30760.00',  '27684.00', '0', '27684', '1', '2026-10-07 14:55:19', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=54
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01581', '54', '114', '1581', '28', '650', '18200.00', '0', '', '2026-10-07 14:55:19', '1581','','','0','0','0','0','0',null,'650','18200','0','0','0','0','0','0','0','0','1'); -- id=326
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:54:30', 1, 1581, 0, 0
                    , 585, 28, 0, 0, 1, '2026-10-07 14:55:19')
                ON DUPLICATE KEY UPDATE buyprice = 585,
                        buyQuantity =buyQuantity+28, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:55:19' ; -- id=402
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1581', '650', '28', '0', 'buyBillController.php', '326', '', '0', '0'); -- id=284
UPDATE product SET  productBuyPrice = "650" WHERE productId = 1581 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 326 ;
UPDATE product SET productName = 'جاكيت جلد ماجيك مان', productDescription = '', productCatId = '114', productBuyPrice = '650.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01581',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '650',lastbuyprice_withDiscount = '585',meanbuyprice = '650',meanbuyprice_withDiscount = '585' , productbuypricereal = '650.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='650',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='650',meanbuyprice_withTax='650',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='585',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1581';
UPDATE buybilldetail SET  lastbuyprice = 650 , meanbuyprice = 650, lastbuyprice_withDiscount = 585, meanbuyprice_withDiscount = 585
        , lastbuyprice_withTax = 650, meanbuyprice_withTax = 650, lastbuyprice_withDiscountAndTax = 585
                where buybilldetailid = 326;
UPDATE productunit SET proUnitBuyPrice  = 650 * productnumber WHERE productid = 1581;
UPDATE storedetail SET  productquantity = '28', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1606';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1581', '1', '28', '0', '54', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '28', '1', '2026-10-07 14:54:30','0','0'); -- id=2706
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01582', '54', '114', '1582', '16', '410', '6560.00', '0', '', '2026-10-07 14:55:19', '1582','','','0','0','0','0','0',null,'410','6560','0','0','0','0','0','0','0','0','1'); -- id=327
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:54:30', 1, 1582, 0, 0
                    , 369, 16, 0, 0, 1, '2026-10-07 14:55:19')
                ON DUPLICATE KEY UPDATE buyprice = 369,
                        buyQuantity =buyQuantity+16, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:55:19' ; -- id=403
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1582', '410', '16', '0', 'buyBillController.php', '327', '', '0', '0'); -- id=285
UPDATE product SET  productBuyPrice = "410" WHERE productId = 1582 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 327 ;
UPDATE product SET productName = 'تي شيرت هودي ماجيك مان', productDescription = '', productCatId = '114', productBuyPrice = '410.00', productSellAllPrice = '410.00', productSellUnitPrice = '410.00', productSellHalfPrice = '410.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01582',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '369',meanbuyprice = '410',meanbuyprice_withDiscount = '369' , productbuypricereal = '410.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='410',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='369',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1582';
UPDATE buybilldetail SET  lastbuyprice = 410 , meanbuyprice = 410, lastbuyprice_withDiscount = 369, meanbuyprice_withDiscount = 369
        , lastbuyprice_withTax = 410, meanbuyprice_withTax = 410, lastbuyprice_withDiscountAndTax = 369
                where buybilldetailid = 327;
UPDATE productunit SET proUnitBuyPrice  = 410 * productnumber WHERE productid = 1582;
UPDATE storedetail SET  productquantity = '16', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1607';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1582', '1', '16', '0', '54', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '16', '1', '2026-10-07 14:54:30','0','0'); -- id=2707
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01583', '54', '114', '1583', '16', '375', '6000.00', '0', '', '2026-10-07 14:55:19', '1583','','','0','0','0','0','0',null,'375','6000','0','0','0','0','0','0','0','0','1'); -- id=328
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:54:30', 1, 1583, 0, 0
                    , 337.5, 16, 0, 0, 1, '2026-10-07 14:55:19')
                ON DUPLICATE KEY UPDATE buyprice = 337.5,
                        buyQuantity =buyQuantity+16, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:55:19' ; -- id=404
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1583', '375', '16', '0', 'buyBillController.php', '328', '', '0', '0'); -- id=286
UPDATE product SET  productBuyPrice = "375" WHERE productId = 1583 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 328 ;
UPDATE product SET productName = 'تي شيرت حوض ماجيك مان', productDescription = '', productCatId = '114', productBuyPrice = '375.00', productSellAllPrice = '375.00', productSellUnitPrice = '375.00', productSellHalfPrice = '375.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01583',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '375',lastbuyprice_withDiscount = '337.5',meanbuyprice = '375',meanbuyprice_withDiscount = '337.5' , productbuypricereal = '375.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='375',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='375',meanbuyprice_withTax='375',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='337.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1583';
UPDATE buybilldetail SET  lastbuyprice = 375 , meanbuyprice = 375, lastbuyprice_withDiscount = 337.5, meanbuyprice_withDiscount = 337.5
        , lastbuyprice_withTax = 375, meanbuyprice_withTax = 375, lastbuyprice_withDiscountAndTax = 337.5
                where buybilldetailid = 328;
UPDATE productunit SET proUnitBuyPrice  = 375 * productnumber WHERE productid = 1583;
UPDATE storedetail SET  productquantity = '16', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1608';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1583', '1', '16', '0', '54', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '16', '1', '2026-10-07 14:54:30','0','0'); -- id=2708
UPDATE supplier SET  suppliercurrentDebt = '27684',suppliercurrentDebtInCurrency= '27684' , userid = '1', supplierdate = '2026-10-07 14:55:19'   WHERE supplierid = '110';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('110', '0.00', '27684', '0', 'اضافة فاتورة مشتريات', '54', '27684', '2026-10-07 14:54:30', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','27684','1','0','27684','27684','0',''); -- id=200
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '27684', '27684', '2026-10-07', '1', '0', '0', '2026-10-07 14:55:19','اضافة فاتورة مشتريات رقم 54','1','0',null,'0','54','buyBillController.php?do=details&id=54'); -- id=1262
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1262', '382', '27684', '','0'); -- id=1272
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17679685.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1262', '593', '27684', '','0'); -- id=1262
UPDATE accountstree SET name = 'ماجيك مان', customName = 'ماجيك مان', customNameEn = 'ماجيك مان', nameEn = 'ماجيك مان', parent = '81', accountNature = '1', theValue = '27684', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 14:54:42' WHERE id = '593';
update buybill set dailyentryid='1262,0' where buybillid=54;
COMMIT;
UPDATE product SET overAllAveragePrice = 585 WHERE productId = 1581;UPDATE product SET overAllAveragePrice = 369 WHERE productId = 1582;UPDATE product SET overAllAveragePrice = 337.5 WHERE productId = 1583;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:25:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:55:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:55:20', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=54'); -- id=3850
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:25:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:55:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:55:23', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=54&type=2'); -- id=3851
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:27:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:57:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:57:11', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=54&type=2'); -- id=3852
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:27:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:57:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-07 14:57:18', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3853
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:27:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:57:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-07 14:57:25', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3854
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:28:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:58:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 14:58:25', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3855
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:28:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:58:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 14:58:32', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3856
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:28:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 14:58:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:58:38', '1', 'details', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=details&id=54'); -- id=3857
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:30:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:00:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 15:00:08', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3858
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:30:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:00:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 15:00:16', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3859
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:30:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:00:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 15:00:20', '1', 'details', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=details&id=53'); -- id=3860
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:30:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:00:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 15:00:28', '1', 'addoneserial', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=addoneserial&id=53&type=2'); -- id=3861
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:30:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:00:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 15:00:35', '1', 'details', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=details&id=53'); -- id=3862
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:30:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:00:48", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:00:48', '4', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3863

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac62f28299e6
-- ----------------------------------------------------------------------------------------------------

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

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac62f28299e6 and sellbillId = 127 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:30:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:00:48", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:00:48', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3864
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:31:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:01:14", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:01:14', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3865
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:31:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:01:52", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:01:52', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3866
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:36:02";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:36:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:06:40", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 15:06:40', '6', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3867
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:36:40";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 15:06:40", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 15:06:40', '6', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3868
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:37:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:07:01", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:07:01', '6', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3869
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:40:56";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:41:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:11:24", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 15:11:24', '6', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3870
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:41:24";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 15:11:24", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 15:11:24', '6', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3871
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:42:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:12:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 15:12:07', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3872
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:42:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:12:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 15:12:13', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3873
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:46:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:16:08", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:16:08', '6', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3874
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:46:33";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:47:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:17:07", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 15:17:07', '6', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3875
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:47:07";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 15:17:07", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 15:17:07', '6', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3876
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:47:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:17:13", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:17:13', '6', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3877
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:48:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:18:12", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:18:13', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3878
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:48:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:18:35", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:18:35', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3879
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:50:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:20:29", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:20:29', '6', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=3880
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:51:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:21:15", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:21:15', '6', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3881

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac6390dbde2f
-- ----------------------------------------------------------------------------------------------------

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

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

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:51:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:21:15", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:21:15', '6', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=3882
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:52:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:22:53", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:22:53', '6', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=3883
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:52:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:22:56", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:22:56', '6', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3884
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:59:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:29:18", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:29:18', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3885

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac6323112608
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 15:29:18', '06ac6323112608', '1', '0.00', '0', '0', '1', '7635.00', '7635', '7635', '0', '1', '2026-10-07 15:29:18', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '12' ,'0','','','','','-1','0','0','0','0','0','7635','0','','0','0','7635','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=128
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','اضافة فاتورة مبيعات','128', '0', '2026-10-07 15:29:18', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '7635', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 15:29:18','0','0','',''); -- id=219
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+4 where id = 239;
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 ('500','01477', '128', '106', '1477', '4', '540', '2160', '0', '', '0', '2026-10-07 15:29:18', '1477', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','239-4,','1','1','0','0','540','2160','0','','0','0.00','0','0','0','0'); -- id=516
UPDATE sellbilldetail SET  lastbuyprice = 500.00 , meanbuyprice = 500.00, lastbuyprice_withDiscount = 500.00, meanbuyprice_withDiscount = 500.00
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 250, lastbuyprice_withDiscountAndTax = 500
                where sellbilldetailid = 516;
 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 (1477, '2026-10-07', 2160, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4, 0, 2000, 1000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2160, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+4
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2160, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2000, 1000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2160, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '20', userid = '2', storedetaildate = '2026-10-07 15:29:18' WHERE storedetailid = '1502';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1477', '1', '4', '1', '128', 'اضافة فاتورة مبيعات', 'sellbillController.php', '24', '20', '2', '2026-10-07 15:29:18','0','0'); -- id=2712
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 353;
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 ('650','01507', '128', '108', '1507', '5', '675', '3375', '0', '', '0', '2026-10-07 15:29:18', '1507', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','353-5,','1','1','0','0','675','3375','0','','0','0.00','0','0','0','0'); -- id=517
UPDATE sellbilldetail SET  lastbuyprice = 650.00 , meanbuyprice = 650.00, lastbuyprice_withDiscount = 650.00, meanbuyprice_withDiscount = 650.00
        , lastbuyprice_withTax = 650, meanbuyprice_withTax = 650, lastbuyprice_withDiscountAndTax = 650
                where sellbilldetailid = 517;
 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 (1507, '2026-10-07', 3375, 3250, 3250
                    , 3250, 3250, 3250, 3250
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 3250, 3250, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3375, sellCostBuyPrice =sellCostBuyPrice+3250
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3250, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3250
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3250, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3250
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3250
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3250
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3250
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3375, 3250, 3250
                    , 3250, 3250, 3250, 3250
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3250, 3250, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3375, sellCostBuyPrice =sellCostBuyPrice+3250
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3250, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3250
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3250, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3250
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3250
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3250
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3250
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '1', userid = '2', storedetaildate = '2026-10-07 15:29:18' WHERE storedetailid = '1532';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1507', '1', '5', '1', '128', 'اضافة فاتورة مبيعات', 'sellbillController.php', '6', '1', '2', '2026-10-07 15:29:18','0','0'); -- id=2713
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 336;
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 ('675','01491', '128', '108', '1491', '3', '700', '2100', '0', '', '0', '2026-10-07 15:29:18', '1491', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','336-3,','1','1','0','0','700','2100','0','','0','0.00','0','0','0','0'); -- id=518
UPDATE sellbilldetail SET  lastbuyprice = 675.00 , meanbuyprice = 675.00, lastbuyprice_withDiscount = 675.00, meanbuyprice_withDiscount = 675.00
        , lastbuyprice_withTax = 675, meanbuyprice_withTax = 675, lastbuyprice_withDiscountAndTax = 675
                where sellbilldetailid = 518;
 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 (1491, '2026-10-07', 2100, 2025, 2025
                    , 2025, 2025, 2025, 2025
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 2025, 2025, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2025
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2025, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2025
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2025, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2025
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2025
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2025
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2025
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2100, 2025, 2025
                    , 2025, 2025, 2025, 2025
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2025, 2025, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2025
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2025, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2025
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2025, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2025
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2025
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2025
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2025
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '3', userid = '2', storedetaildate = '2026-10-07 15:29:18' WHERE storedetailid = '1516';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1491', '1', '3', '1', '128', 'اضافة فاتورة مبيعات', 'sellbillController.php', '6', '3', '2', '2026-10-07 15:29:18','0','0'); -- id=2714
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '624470',  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 ('616835','7635', '0', '2', 'اضافة فاتورة مبيعات', '128', '624470', '2026-10-07 15:29:18', '2',  'sellbillController.php','1','','0'); -- id=158
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '7635', '7635', '2026-10-07', '2', '0', '0', '2026-10-07 15:29:18','اضافة فاتورة مبيعات رقم 128','1','0',null,'0','128','sellbillController.php?do=showDetail&sellbillid=128'); -- id=1267
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1267', '419', '7635', '','0'); -- id=1277
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '624470', 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 ('1267', '143', '7635', '','0'); -- id=1267
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1323520', 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 ( '7275', '7275', '2026-10-07', '2', '0', '0', '2026-10-07 15:29:18','اضافة فاتورة مبيعات رقم 128 - صرف البضاعة من المخزن','1','0',null,'0','128','sellbillController.php?do=showDetail&sellbillid=128'); -- id=1268
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1268', '402', '7275', '','0'); -- id=1278
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1277345.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1268', '382', '7275', '','0'); -- id=1268
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17673400.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1267,0,1268' where sellbillid=128;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 7635, 7275, 7275
                    , 7275, 7275, 7275, 7275
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,7275, 6275, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7635, sellCostBuyPrice =sellCostBuyPrice+7275
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7275, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7275
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7275, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7275
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7275
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7275
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6275
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 7635, 7275, 7275
                    , 7275, 7275, 7275, 7275
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,7275, 6275, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7635, sellCostBuyPrice =sellCostBuyPrice+7275
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7275, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7275
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7275, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7275
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7275
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7275
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6275
                        , returnSellVal = returnSellVal+0, 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, 7635, 7275, 7275
                    , 7275, 7275, 7275, 7275, 7275, 6275)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+7635, netSellCostBuyPrice = netSellCostBuyPrice+7275
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+7275
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+7275
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+7275
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+7275
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+7275
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+7275
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+6275;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac6323112608 and sellbillId = 128 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:59:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:29:19", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:29:19', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3886
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:02:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:32:35", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:32:35', '6', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3887

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac639a0d2e83
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 15:32:35', '06ac639a0d2e83', '1', '0.00', '0', '0', '1', '4420.00', '4420', '4420', '0', '1', '2026-10-07 15:32:35', '', '6', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '17' ,'0','','','','','-1','0','0','0','0','0','4420','0','','0','0','4420','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=129
UPDATE client SET  clientdebt = '0', userid = '6' 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','اضافة فاتورة مبيعات','129', '0', '2026-10-07 15:32:35', '6', 'sellbillController.php', 'اضافة فاتورة مبيعات', '4420', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 15:32:35','0','0','',''); -- id=220
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('375','i0001244', '129', '71', '1244', '8', '260', '2080', '0', '', '0', '2026-10-07 15:32:35', '1244', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','260','2080','0','','0','0.00','0','0','0','0'); -- id=519
UPDATE sellbilldetail SET  lastbuyprice = 365.00 , meanbuyprice = 370.00, lastbuyprice_withDiscount = 365.00, meanbuyprice_withDiscount = 370.00
        , lastbuyprice_withTax = 370, meanbuyprice_withTax = 370, lastbuyprice_withDiscountAndTax = 365
                where sellbilldetailid = 519;
 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 (1244, '2026-10-07', 2080, 3000, 2920
                    , 2960, 2920, 2960, 2920
                    , 0, 0, 0, 0
                    , 0, 0, 0, 8, 0, 2960, 2960, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2080, sellCostBuyPrice =sellCostBuyPrice+3000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2920, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2960
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2920, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2960
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2920
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2960
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2960
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+8
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2080, 3000, 2920
                    , 2960, 2920, 2960, 2920
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2960, 2960, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2080, sellCostBuyPrice =sellCostBuyPrice+3000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2920, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2960
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2920, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2960
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2920
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2960
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2960
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '6', storedetaildate = '2026-10-07 15:32:35' WHERE storedetailid = '1244';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1244', '1', '8', '1', '129', 'اضافة فاتورة مبيعات', 'sellbillController.php', '8', '0', '6', '2026-10-07 15:32:35','0','0'); -- id=2715
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 ('285','i0001243', '129', '71', '1243', '4', '260', '1040', '0', '', '0', '2026-10-07 15:32:35', '1243', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','260','1040','0','','0','0.00','0','0','0','0'); -- id=520
UPDATE sellbilldetail SET  lastbuyprice = 275.00 , meanbuyprice = 275.00, lastbuyprice_withDiscount = 275.00, meanbuyprice_withDiscount = 275.00
        , lastbuyprice_withTax = 275, meanbuyprice_withTax = 275, lastbuyprice_withDiscountAndTax = 275
                where sellbilldetailid = 520;
 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 (1243, '2026-10-07', 1040, 1140, 1100
                    , 1100, 1100, 1100, 1100
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4, 0, 1100, 1100, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1040, sellCostBuyPrice =sellCostBuyPrice+1140
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1100, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1100
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1100, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1100
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1100
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1100
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1100
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+4
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 1040, 1140, 1100
                    , 1100, 1100, 1100, 1100
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1100, 1100, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1040, sellCostBuyPrice =sellCostBuyPrice+1140
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1100, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1100
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1100, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1100
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1100
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1100
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1100
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '6', storedetaildate = '2026-10-07 15:32:35' WHERE storedetailid = '1243';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1243', '1', '4', '1', '129', 'اضافة فاتورة مبيعات', 'sellbillController.php', '4', '0', '6', '2026-10-07 15:32:35','0','0'); -- id=2716
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 ('190','i0001247', '129', '71', '1247', '5', '260', '1300', '0', '', '0', '2026-10-07 15:32:35', '1247', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','260','1300','0','','0','0.00','0','0','0','0'); -- id=521
UPDATE sellbilldetail SET  lastbuyprice = 190.00 , meanbuyprice = 189.56, lastbuyprice_withDiscount = 190.00, meanbuyprice_withDiscount = 189.56
        , lastbuyprice_withTax = 190, meanbuyprice_withTax = 189.56, lastbuyprice_withDiscountAndTax = 190
                where sellbilldetailid = 521;
 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 (1247, '2026-10-07', 1300, 950, 950
                    , 947.8, 950, 947.8, 950
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 950, 947.8, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1300, sellCostBuyPrice =sellCostBuyPrice+950
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+950, sellCostMeanBuyPrice = sellCostMeanBuyPrice+947.8
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+950, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+947.8
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+950
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+950
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+947.8
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 1300, 950, 950
                    , 947.8, 950, 947.8, 950
                    , 0, 0, 0, 0
                    , 0, 0, 0, 950, 947.8, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1300, sellCostBuyPrice =sellCostBuyPrice+950
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+950, sellCostMeanBuyPrice = sellCostMeanBuyPrice+947.8
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+950, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+947.8
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+950
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+950
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+947.8
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '6', storedetaildate = '2026-10-07 15:32:35' WHERE storedetailid = '1247';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1247', '1', '5', '1', '129', 'اضافة فاتورة مبيعات', 'sellbillController.php', '5', '0', '6', '2026-10-07 15:32:35','0','0'); -- id=2717
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '628890',  userid = '6' 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 ('624470','4420', '0', '2', 'اضافة فاتورة مبيعات', '129', '628890', '2026-10-07 15:32:35', '6',  'sellbillController.php','1','','0'); -- id=159
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '4420', '4420', '2026-10-07', '6', '0', '0', '2026-10-07 15:32:35','اضافة فاتورة مبيعات رقم 129','1','0',null,'0','129','sellbillController.php?do=showDetail&sellbillid=129'); -- id=1269
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1269', '419', '4420', '','0'); -- id=1279
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '628890', 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 ('1269', '143', '4420', '','0'); -- id=1269
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1327940', 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 ( '4970', '4970', '2026-10-07', '6', '0', '0', '2026-10-07 15:32:35','اضافة فاتورة مبيعات رقم 129 - صرف البضاعة من المخزن','1','0',null,'0','129','sellbillController.php?do=showDetail&sellbillid=129'); -- id=1270
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1270', '402', '4970', '','0'); -- id=1280
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1282315.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1270', '382', '4970', '','0'); -- id=1270
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17668430.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1269,0,1270' where sellbillid=129;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 4420, 5090, 4970
                    , 5007.8, 4970, 5007.8, 4970
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,5010, 5007.8, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4420, sellCostBuyPrice =sellCostBuyPrice+5090
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4970, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5007.8
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4970, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5007.8
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4970
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5010
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5007.8
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 4420, 5090, 4970
                    , 5007.8, 4970, 5007.8, 4970
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,5010, 5007.8, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4420, sellCostBuyPrice =sellCostBuyPrice+5090
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4970, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5007.8
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4970, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5007.8
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4970
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5010
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5007.8
                        , returnSellVal = returnSellVal+0, 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, 4420, 5090, 4970
                    , 5007.8, 4970, 5007.8, 4970, 5010, 5007.8)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+4420, netSellCostBuyPrice = netSellCostBuyPrice+5090
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+4970
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+5007.8
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+4970
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+5007.8
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+4970
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+5010
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+5007.8;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac639a0d2e83 and sellbillId = 129 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:02:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:32:35", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:32:35', '6', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3888
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:02:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:32:45", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:32:45', '6', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=129'); -- id=3889
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:03:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:33:13", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:33:13', '6', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3890
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:03:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:33:24", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:33:24', '6', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=129'); -- id=3891
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:04:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:34:56", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:34:56', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3892
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:05:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:35:04", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:35:04', '2', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=128'); -- id=3893
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:05:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:35:50", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:35:50', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3894
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:05:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:35:59", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:35:59', '2', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=129'); -- id=3895
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:08:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:38:59", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:38:59', '4', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3896

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac6389b331b7
-- ----------------------------------------------------------------------------------------------------

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

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac6389b331b7 and sellbillId = 130 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:08:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:38:59", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:38:59', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3897
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:16:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:46:21", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:46:21', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3898
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:18:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:48:10", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:48:10', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3899
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:19:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:49:26", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:49:26', '2', 'edit', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=edit&userid=2'); -- id=3900
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:19:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:49:38", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:49:38', '2', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=update'); -- id=3901
UPDATE user SET username = 'كاشير', password = '123', usergroupid = '3', employeename = 'ياسمين', currentdate = '2026-09-27', conditions = '0', saveid = '2'  , userstoreid ='-1' ,awardrate = '0' ,searchinonesave = '0', branchId = '-1', question = 'اسمك ايه', answer = 'اشرب شاي',blockedByLimits = '0',directSaveBills = '0',userstoreidDef='1',empid='0',obygyDoctorId = '0',lang = '',viewclients = '1',viewbills = '0',storeSupervisor='0',storeSupervisorStores='',projectids='0',bankids='0',saveids='-1,2',searchinonestorebalance='0',storeids='1',webApiId='0',closeSavid='2',charityids='0',laterNakdiUserIds='-1,-1',awardrategomla = '0',awardratehalf = '0', dellaternakdipayed='1',accountids='-1,' WHERE userid = '2';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:19:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:49:39", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:49:39', '2', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=sucess'); -- id=3902
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:19:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:49:40", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:49:40', '2', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=show'); -- id=3903
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:19:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:49:47", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:49:47', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3904
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:19:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:49:50", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:49:50', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3905
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:20:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:50:04", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:50:04', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3906
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:20:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:50:08", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:50:08', '2', 'edit', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=edit&userid=2'); -- id=3907
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:20:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:50:11", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:50:11', '2', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=update'); -- id=3908
UPDATE user SET username = 'كاشير', password = '123', usergroupid = '3', employeename = 'ياسمين', currentdate = '2026-09-27', conditions = '0', saveid = '2'  , userstoreid ='-1' ,awardrate = '0' ,searchinonesave = '0', branchId = '-1', question = 'اسمك ايه', answer = 'اشرب شاي',blockedByLimits = '0',directSaveBills = '0',userstoreidDef='1',empid='0',obygyDoctorId = '0',lang = '',viewclients = '1',viewbills = '0',storeSupervisor='0',storeSupervisorStores='',projectids='0',bankids='0',saveids='-1,2',searchinonestorebalance='0',storeids='1',webApiId='0',closeSavid='2',charityids='0',laterNakdiUserIds='-1,-1',awardrategomla = '0',awardratehalf = '0', dellaternakdipayed='1',accountids='-1,' WHERE userid = '2';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:20:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:50:11", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:50:11', '2', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=sucess'); -- id=3909
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:20:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:50:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:50:13', '2', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=show'); -- id=3910
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:20:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:50:19", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:50:19', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3911
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:20:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:50:22", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:50:22', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3912
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:22:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:52:49", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:52:49', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3913
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:23:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:53:14", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:53:14', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3914
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:29:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 15:59:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:59:13', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3915
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:32:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:02:46", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:02:46', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3916
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:38:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:08:40", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:08:40', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3917

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac642f638852
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 16:08:40', '06ac642f638852', '1', '0.00', '0', '0', '1', '10750.00', '10750', '10750', '0', '1', '2026-10-07 16:08:40', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '15' ,'0','','','','','-1','0','0','0','0','0','10750','0','','0','0','10750','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=131
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','اضافة فاتورة مبيعات','131', '0', '2026-10-07 16:08:40', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '10750', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 16:08:40','0','0','',''); -- id=222
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 382;
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 ('730','01564', '131', '28', '1564', '5', '750', '3750', '0', '', '0', '2026-10-07 16:08:40', '1564', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','382-5,','1','1','0','0','750','3750','0','','0','0.00','0','0','0','0'); -- id=523
UPDATE sellbilldetail SET  lastbuyprice = 730.00 , meanbuyprice = 730.00, lastbuyprice_withDiscount = 730.00, meanbuyprice_withDiscount = 730.00
        , lastbuyprice_withTax = 730, meanbuyprice_withTax = 730, lastbuyprice_withDiscountAndTax = 730
                where sellbilldetailid = 523;
 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 (1564, '2026-10-07', 3750, 3650, 3650
                    , 3650, 3650, 3650, 3650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 3650, 3650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3750, sellCostBuyPrice =sellCostBuyPrice+3650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3750, 3650, 3650
                    , 3650, 3650, 3650, 3650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3650, 3650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3750, sellCostBuyPrice =sellCostBuyPrice+3650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '5', userid = '2', storedetaildate = '2026-10-07 16:08:40' WHERE storedetailid = '1589';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1564', '1', '5', '1', '131', 'اضافة فاتورة مبيعات', 'sellbillController.php', '10', '5', '2', '2026-10-07 16:08:40','0','0'); -- id=2719
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 379;
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 ('680','32389', '131', '28', '1561', '5', '700', '3500', '0', '', '0', '2026-10-07 16:08:40', '1561', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','379-5,','1','1','0','0','700','3500','0','','0','0.00','0','0','0','0'); -- id=524
UPDATE sellbilldetail SET  lastbuyprice = 680.00 , meanbuyprice = 680.00, lastbuyprice_withDiscount = 680.00, meanbuyprice_withDiscount = 680.00
        , lastbuyprice_withTax = 680, meanbuyprice_withTax = 680, lastbuyprice_withDiscountAndTax = 680
                where sellbilldetailid = 524;
 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 (1561, '2026-10-07', 3500, 3400, 3400
                    , 3400, 3400, 3400, 3400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 3400, 3400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3500, 3400, 3400
                    , 3400, 3400, 3400, 3400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3400, 3400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '5', userid = '2', storedetaildate = '2026-10-07 16:08:40' WHERE storedetailid = '1586';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1561', '1', '5', '1', '131', 'اضافة فاتورة مبيعات', 'sellbillController.php', '10', '5', '2', '2026-10-07 16:08:40','0','0'); -- id=2720
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 380;
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 ('680','87559', '131', '28', '1562', '5', '700', '3500', '0', '', '0', '2026-10-07 16:08:40', '1562', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','380-5,','1','1','0','0','700','3500','0','','0','0.00','0','0','0','0'); -- id=525
UPDATE sellbilldetail SET  lastbuyprice = 680.00 , meanbuyprice = 680.00, lastbuyprice_withDiscount = 680.00, meanbuyprice_withDiscount = 680.00
        , lastbuyprice_withTax = 680, meanbuyprice_withTax = 680, lastbuyprice_withDiscountAndTax = 680
                where sellbilldetailid = 525;
 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 (1562, '2026-10-07', 3500, 3400, 3400
                    , 3400, 3400, 3400, 3400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 3400, 3400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3500, 3400, 3400
                    , 3400, 3400, 3400, 3400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3400, 3400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-07 16:08:40' WHERE storedetailid = '1587';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1562', '1', '5', '1', '131', 'اضافة فاتورة مبيعات', 'sellbillController.php', '20', '15', '2', '2026-10-07 16:08:40','0','0'); -- id=2721
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '639640',  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 ('628890','10750', '0', '2', 'اضافة فاتورة مبيعات', '131', '639640', '2026-10-07 16:08:40', '2',  'sellbillController.php','1','','0'); -- id=161
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '10750', '10750', '2026-10-07', '2', '0', '0', '2026-10-07 16:08:40','اضافة فاتورة مبيعات رقم 131','1','0',null,'0','131','sellbillController.php?do=showDetail&sellbillid=131'); -- id=1273
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1273', '419', '10750', '','0'); -- id=1283
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '639640', 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 ('1273', '143', '10750', '','0'); -- id=1273
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1340410', 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 ( '10450', '10450', '2026-10-07', '2', '0', '0', '2026-10-07 16:08:40','اضافة فاتورة مبيعات رقم 131 - صرف البضاعة من المخزن','1','0',null,'0','131','sellbillController.php?do=showDetail&sellbillid=131'); -- id=1274
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1274', '402', '10450', '','0'); -- id=1284
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1294325.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1274', '382', '10450', '','0'); -- id=1274
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17657980.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1273,0,1274' where sellbillid=131;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 10750, 10450, 10450
                    , 10450, 10450, 10450, 10450
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,10450, 10450, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+10750, sellCostBuyPrice =sellCostBuyPrice+10450
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+10450, sellCostMeanBuyPrice = sellCostMeanBuyPrice+10450
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+10450, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+10450
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+10450
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+10450
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+10450
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 10750, 10450, 10450
                    , 10450, 10450, 10450, 10450
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,10450, 10450, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+10750, sellCostBuyPrice =sellCostBuyPrice+10450
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+10450, sellCostMeanBuyPrice = sellCostMeanBuyPrice+10450
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+10450, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+10450
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+10450
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+10450
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+10450
                        , returnSellVal = returnSellVal+0, 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, 10750, 10450, 10450
                    , 10450, 10450, 10450, 10450, 10450, 10450)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+10750, netSellCostBuyPrice = netSellCostBuyPrice+10450
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+10450
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+10450
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+10450
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+10450
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+10450
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+10450
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+10450;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac642f638852 and sellbillId = 131 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:38:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:08:40", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:08:40', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3918
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:42:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:12:09", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 16:12:09', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3919
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:45:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:15:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 16:15:10', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3920
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:45:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:15:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 16:15:19', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3921
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:45:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:15:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 16:15:23', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3922
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:45:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:15:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 16:15:30', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3923
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:45:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:15:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-07 16:15:50', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3924
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:45:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:15:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-07 16:15:55', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3925
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:46:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:16:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 16:16:06', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=3926
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:46:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:16:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 16:16:17', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php?do=show'); -- id=3927
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:46:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:16:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 16:16:50', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3928
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:46:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:16:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 16:16:56', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3929
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:51:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:21:58", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 16:21:58', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3930
UPDATE user SET loginip = "" WHERE userid = 6;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:56:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:26:02", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:26:02', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3931
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:57:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:27:42", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:27:42', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3932
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:57:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:27:47", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 16:27:47', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3933
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:00:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:30:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 16:30:13', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3934
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:00:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:30:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 16:30:18', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3935
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:00:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:30:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 16:30:29', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=3936
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:00:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:30:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 16:30:54', '1', 'editbill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editbill&id=53'); -- id=3937
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:01:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:31:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 16:31:57', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=update'); -- id=3938
BEGIN;
UPDATE costcenterdetail SET del = 1 WHERE type in( 3) and  modelid = 53;
UPDATE buybill SET  buybillsysdate = '2026-10-07 16:31:57', userid = '1',delbyuserid = '1', conditions = '1' WHERE buybillid = '53';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1573, 0, 0
                    , 380, 30, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-30, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=392
UPDATE buybilldetail SET  lastbuyprice = 380.00 , meanbuyprice = 380.00, lastbuyprice_withDiscount = 380.00, meanbuyprice_withDiscount = 380.00
        , lastbuyprice_withTax = 380.00, meanbuyprice_withTax = 380.00, lastbuyprice_withDiscountAndTax = 380.00
                where buybilldetailid = 316;
UPDATE product SET productName = '1401 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '380.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01573',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '0',meanbuyprice = '380.00',meanbuyprice_withDiscount = '380' , productbuypricereal = '380.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1573';
UPDATE productunit SET proUnitBuyPrice  = 380 * productnumber WHERE productid = 1573;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1598';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1573', '1', '30', '1', '53', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '30', '0', '1', '2026-10-07 14:29:27','0','0'); -- id=2722
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1574, 0, 0
                    , 330, 21, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-21, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=393
UPDATE buybilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330.00, meanbuyprice_withTax = 330.00, lastbuyprice_withDiscountAndTax = 330.00
                where buybilldetailid = 317;
UPDATE product SET productName = '1415 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '330.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01574',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '0',meanbuyprice = '330.00',meanbuyprice_withDiscount = '330' , productbuypricereal = '330.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1574';
UPDATE productunit SET proUnitBuyPrice  = 330 * productnumber WHERE productid = 1574;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1599';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1574', '1', '21', '1', '53', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '21', '0', '1', '2026-10-07 14:29:27','0','0'); -- id=2723
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1575, 0, 0
                    , 525, 24, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=394
UPDATE buybilldetail SET  lastbuyprice = 525.00 , meanbuyprice = 525.00, lastbuyprice_withDiscount = 525.00, meanbuyprice_withDiscount = 525.00
        , lastbuyprice_withTax = 525.00, meanbuyprice_withTax = 525.00, lastbuyprice_withDiscountAndTax = 525.00
                where buybilldetailid = 318;
UPDATE product SET productName = '1414 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '525.00', productSellAllPrice = '525.00', productSellUnitPrice = '525.00', productSellHalfPrice = '525.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01575',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '525',lastbuyprice_withDiscount = '0',meanbuyprice = '525.00',meanbuyprice_withDiscount = '525' , productbuypricereal = '525.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='525',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='525',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1575';
UPDATE productunit SET proUnitBuyPrice  = 525 * productnumber WHERE productid = 1575;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1600';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1575', '1', '24', '1', '53', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '24', '0', '1', '2026-10-07 14:29:27','0','0'); -- id=2724
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1576, 0, 0
                    , 500, 24, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=395
UPDATE buybilldetail SET  lastbuyprice = 500.00 , meanbuyprice = 500.00, lastbuyprice_withDiscount = 500.00, meanbuyprice_withDiscount = 500.00
        , lastbuyprice_withTax = 500.00, meanbuyprice_withTax = 500.00, lastbuyprice_withDiscountAndTax = 500.00
                where buybilldetailid = 319;
UPDATE product SET productName = 'موديلات ريد لاين 500', productDescription = '', productCatId = '113', productBuyPrice = '500.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01576',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '0',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1576';
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1576;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1601';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1576', '1', '24', '1', '53', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '45', '21', '1', '2026-10-07 14:29:27','0','0'); -- id=2725
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1577, 0, 0
                    , 520, 21, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-21, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=396
UPDATE buybilldetail SET  lastbuyprice = 520.00 , meanbuyprice = 520.00, lastbuyprice_withDiscount = 520.00, meanbuyprice_withDiscount = 520.00
        , lastbuyprice_withTax = 520.00, meanbuyprice_withTax = 520.00, lastbuyprice_withDiscountAndTax = 520.00
                where buybilldetailid = 320;
UPDATE product SET productName = '1417 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '520.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01577',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '520',lastbuyprice_withDiscount = '0',meanbuyprice = '520.00',meanbuyprice_withDiscount = '520' , productbuypricereal = '520.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='520',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='520',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1577';
UPDATE productunit SET proUnitBuyPrice  = 520 * productnumber WHERE productid = 1577;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1602';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1577', '1', '21', '1', '53', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '21', '0', '1', '2026-10-07 14:29:27','0','0'); -- id=2726
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1576, 0, 0
                    , 500, 21, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-21, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=395
UPDATE buybilldetail SET  lastbuyprice = 500.00 , meanbuyprice = 500.00, lastbuyprice_withDiscount = 0.00, meanbuyprice_withDiscount = 500.00
        , lastbuyprice_withTax = 500.00, meanbuyprice_withTax = 500.00, lastbuyprice_withDiscountAndTax = 0.00
                where buybilldetailid = 321;
UPDATE product SET productName = 'موديلات ريد لاين 500', productDescription = '', productCatId = '113', productBuyPrice = '500.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01576',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '0',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1576';
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1576;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1601';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1576', '1', '21', '1', '53', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '21', '0', '1', '2026-10-07 14:29:27','0','0'); -- id=2727
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1578, 0, 0
                    , 400, 21, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-21, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=398
UPDATE buybilldetail SET  lastbuyprice = 400.00 , meanbuyprice = 400.00, lastbuyprice_withDiscount = 400.00, meanbuyprice_withDiscount = 400.00
        , lastbuyprice_withTax = 400.00, meanbuyprice_withTax = 400.00, lastbuyprice_withDiscountAndTax = 400.00
                where buybilldetailid = 322;
UPDATE product SET productName = 'موديلات ريد لاين 400', productDescription = '', productCatId = '113', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01578',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '0',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1578';
UPDATE productunit SET proUnitBuyPrice  = 400 * productnumber WHERE productid = 1578;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1603';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1578', '1', '21', '1', '53', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '42', '21', '1', '2026-10-07 14:29:27','0','0'); -- id=2728
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1579, 0, 0
                    , 470, 24, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=399
UPDATE buybilldetail SET  lastbuyprice = 470.00 , meanbuyprice = 470.00, lastbuyprice_withDiscount = 470.00, meanbuyprice_withDiscount = 470.00
        , lastbuyprice_withTax = 470.00, meanbuyprice_withTax = 470.00, lastbuyprice_withDiscountAndTax = 470.00
                where buybilldetailid = 323;
UPDATE product SET productName = '1406 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '470.00', productSellAllPrice = '470.00', productSellUnitPrice = '470.00', productSellHalfPrice = '470.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01579',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '470',lastbuyprice_withDiscount = '0',meanbuyprice = '470.00',meanbuyprice_withDiscount = '470' , productbuypricereal = '470.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='470',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='470',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1579';
UPDATE productunit SET proUnitBuyPrice  = 470 * productnumber WHERE productid = 1579;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1604';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1579', '1', '24', '1', '53', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '24', '0', '1', '2026-10-07 14:29:27','0','0'); -- id=2729
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1578, 0, 0
                    , 400, 21, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-21, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=398
UPDATE buybilldetail SET  lastbuyprice = 400.00 , meanbuyprice = 400.00, lastbuyprice_withDiscount = 0.00, meanbuyprice_withDiscount = 400.00
        , lastbuyprice_withTax = 400.00, meanbuyprice_withTax = 400.00, lastbuyprice_withDiscountAndTax = 0.00
                where buybilldetailid = 324;
UPDATE product SET productName = 'موديلات ريد لاين 400', productDescription = '', productCatId = '113', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01578',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '0',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1578';
UPDATE productunit SET proUnitBuyPrice  = 400 * productnumber WHERE productid = 1578;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1603';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1578', '1', '21', '1', '53', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '21', '0', '1', '2026-10-07 14:29:27','0','0'); -- id=2730
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1580, 0, 0
                    , 530, 24, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-24, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=401
UPDATE buybilldetail SET  lastbuyprice = 530.00 , meanbuyprice = 530.00, lastbuyprice_withDiscount = 530.00, meanbuyprice_withDiscount = 530.00
        , lastbuyprice_withTax = 530.00, meanbuyprice_withTax = 530.00, lastbuyprice_withDiscountAndTax = 530.00
                where buybilldetailid = 325;
UPDATE product SET productName = '1418 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '530.00', productSellAllPrice = '530.00', productSellUnitPrice = '530.00', productSellHalfPrice = '530.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01580',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '0',meanbuyprice = '530.00',meanbuyprice_withDiscount = '530' , productbuypricereal = '530.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1580';
UPDATE productunit SET proUnitBuyPrice  = 530 * productnumber WHERE productid = 1580;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1605';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1580', '1', '24', '1', '53', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '24', '0', '1', '2026-10-07 14:29:27','0','0'); -- id=2731
UPDATE supplier SET  suppliercurrentDebt = '0',suppliercurrentDebtInCurrency= '0' , userid = '1', supplierdate = '2026-10-07 16:31:57'   WHERE supplierid = '109';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('109', '105150.00', '105150.00', '1', 'حذف فاتورة مشتريات - للتعديل', '53', '0', '2026-10-07 14:29:27', '1', 'buyBillController.php', 'حذف فاتورة مشتريات - للتعديل', '0','', '0','1','1','105150','1','105150','105150','0','0',''); -- id=201
UPDATE productserial SET del = 1
		 WHERE billid = 53;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,deletedbuyid,controlname,payedtax,costcenterid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac62d17d29ce', '2026-10-07 14:29:27', '109', '0.00', '94635', '10', '1', '105150.00', '94635.00', '0.00', '94635', '1', '2026-10-07 16:31:57', '', '1', '0', '', '1', '1','1','53','buyBillController.php','0.00','-1','1','0','0','.','0','0','0','0','0','0'); -- id=55
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01573', '55', '113', '1573', '30.00', '380', '11400.00', '0.00', '', '2026-10-07 16:31:57', '1573','','','0','0','0','0','0',null,'380','11400','0','0','0','0','0','0','0','0','1'); -- id=329
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1573, 0, 0
                    , 342, 30, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyprice = 342,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=392
UPDATE product SET  productBuyPrice = "380" WHERE productId = 1573 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 329 ;
UPDATE product SET productName = '1401 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '380.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01573',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '380',lastbuyprice_withDiscount = '342',meanbuyprice = '380',meanbuyprice_withDiscount = '361' , productbuypricereal = '380.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='190',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='342',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1573';
UPDATE buybilldetail SET  lastbuyprice = 380 , meanbuyprice = 380, lastbuyprice_withDiscount = 342, meanbuyprice_withDiscount = 361
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 190, lastbuyprice_withDiscountAndTax = 342
                where buybilldetailid = 329;
UPDATE productunit SET proUnitBuyPrice  = 380 * productnumber WHERE productid = 1573;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1598';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1573', '1', '30', '0', '55', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 14:29:27','0','0'); -- id=2732
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01574', '55', '113', '1574', '21.00', '330', '6930.00', '0.00', '', '2026-10-07 16:31:57', '1574','','','0','0','0','0','0',null,'330','6930','0','0','0','0','0','0','0','0','1'); -- id=330
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1574, 0, 0
                    , 297, 21, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyprice = 297,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=393
UPDATE product SET  productBuyPrice = "330" WHERE productId = 1574 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 330 ;
UPDATE product SET productName = '1415 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '330.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01574',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '297',meanbuyprice = '330',meanbuyprice_withDiscount = '313.5' , productbuypricereal = '330.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='165',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='297',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1574';
UPDATE buybilldetail SET  lastbuyprice = 330 , meanbuyprice = 330, lastbuyprice_withDiscount = 297, meanbuyprice_withDiscount = 313.5
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 165, lastbuyprice_withDiscountAndTax = 297
                where buybilldetailid = 330;
UPDATE productunit SET proUnitBuyPrice  = 330 * productnumber WHERE productid = 1574;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1599';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1574', '1', '21', '0', '55', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-07 14:29:27','0','0'); -- id=2733
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01575', '55', '113', '1575', '24.00', '525', '12600.00', '0.00', '', '2026-10-07 16:31:57', '1575','','','0','0','0','0','0',null,'525','12600','0','0','0','0','0','0','0','0','1'); -- id=331
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1575, 0, 0
                    , 472.5, 24, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyprice = 472.5,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=394
UPDATE product SET  productBuyPrice = "525" WHERE productId = 1575 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 331 ;
UPDATE product SET productName = '1414 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '525.00', productSellAllPrice = '525.00', productSellUnitPrice = '525.00', productSellHalfPrice = '525.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01575',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '525',lastbuyprice_withDiscount = '472.5',meanbuyprice = '525',meanbuyprice_withDiscount = '498.75' , productbuypricereal = '525.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='525',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='525',meanbuyprice_withTax='262.5',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='472.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1575';
UPDATE buybilldetail SET  lastbuyprice = 525 , meanbuyprice = 525, lastbuyprice_withDiscount = 472.5, meanbuyprice_withDiscount = 498.75
        , lastbuyprice_withTax = 525, meanbuyprice_withTax = 262.5, lastbuyprice_withDiscountAndTax = 472.5
                where buybilldetailid = 331;
UPDATE productunit SET proUnitBuyPrice  = 525 * productnumber WHERE productid = 1575;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1600';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1575', '1', '24', '0', '55', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-07 14:29:27','0','0'); -- id=2734
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01576', '55', '113', '1576', '24.00', '500', '12000.00', '0.00', '', '2026-10-07 16:31:57', '1576','','','0','0','0','0','0',null,'500','12000','0','0','0','0','0','0','0','0','1'); -- id=332
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1576, 0, 0
                    , 450, 24, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyprice = 450,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=395
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1576 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 332 ;
UPDATE product SET productName = 'موديلات ريد لاين 500', productDescription = '', productCatId = '113', productBuyPrice = '500.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01576',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '450',meanbuyprice = '500',meanbuyprice_withDiscount = '482.61' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1576';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 450, meanbuyprice_withDiscount = 482.61
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 450
                where buybilldetailid = 332;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1576;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1601';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1576', '1', '24', '0', '55', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-07 14:29:27','0','0'); -- id=2735
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01577', '55', '113', '1577', '21.00', '520', '10920.00', '0.00', '', '2026-10-07 16:31:57', '1577','','','0','0','0','0','0',null,'520','10920','0','0','0','0','0','0','0','0','1'); -- id=333
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1577, 0, 0
                    , 468, 21, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyprice = 468,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=396
UPDATE product SET  productBuyPrice = "520" WHERE productId = 1577 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 333 ;
UPDATE product SET productName = '1417 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '520.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01577',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '520',lastbuyprice_withDiscount = '468',meanbuyprice = '520',meanbuyprice_withDiscount = '494' , productbuypricereal = '520.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='520',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='520',meanbuyprice_withTax='260',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='468',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1577';
UPDATE buybilldetail SET  lastbuyprice = 520 , meanbuyprice = 520, lastbuyprice_withDiscount = 468, meanbuyprice_withDiscount = 494
        , lastbuyprice_withTax = 520, meanbuyprice_withTax = 260, lastbuyprice_withDiscountAndTax = 468
                where buybilldetailid = 333;
UPDATE productunit SET proUnitBuyPrice  = 520 * productnumber WHERE productid = 1577;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1602';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1577', '1', '21', '0', '55', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-07 14:29:27','0','0'); -- id=2736
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01576', '55', '113', '1576', '21.00', '500', '10500.00', '0.00', '', '2026-10-07 16:31:57', '1576','','','0','0','0','0','0',null,'500','10500','0','0','0','0','0','0','0','0','1'); -- id=334
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1576, 0, 0
                    , 450, 21, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyprice = 450,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=395
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1576 ;
UPDATE buybilldetail SET  quantitybefore = 24 WHERE buybilldetailid = 334 ;
UPDATE product SET productName = 'موديلات ريد لاين 500', productDescription = '', productCatId = '113', productBuyPrice = '500.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01576',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '450',meanbuyprice = '500',meanbuyprice_withDiscount = '472.23' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1576';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 450, meanbuyprice_withDiscount = 472.23
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 450
                where buybilldetailid = 334;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1576;
UPDATE storedetail SET  productquantity = '45', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1601';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1576', '1', '21', '0', '55', 'اضافة فاتورة مشتريات', 'buyBillController.php', '24', '45', '1', '2026-10-07 14:29:27','0','0'); -- id=2737
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01578', '55', '113', '1578', '21.00', '400', '8400.00', '0.00', '', '2026-10-07 16:31:57', '1578','','','0','0','0','0','0',null,'400','8400','0','0','0','0','0','0','0','0','1'); -- id=335
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1578, 0, 0
                    , 360, 21, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyprice = 360,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=398
UPDATE product SET  productBuyPrice = "400" WHERE productId = 1578 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 335 ;
UPDATE product SET productName = 'موديلات ريد لاين 400', productDescription = '', productCatId = '113', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01578',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '360',meanbuyprice = '400',meanbuyprice_withDiscount = '386.67' , productbuypricereal = '400.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='360',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1578';
UPDATE buybilldetail SET  lastbuyprice = 400 , meanbuyprice = 400, lastbuyprice_withDiscount = 360, meanbuyprice_withDiscount = 386.67
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 360
                where buybilldetailid = 335;
UPDATE productunit SET proUnitBuyPrice  = 400 * productnumber WHERE productid = 1578;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1603';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1578', '1', '21', '0', '55', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-07 14:29:27','0','0'); -- id=2738
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01579', '55', '113', '1579', '24.00', '470', '11280.00', '0.00', '', '2026-10-07 16:31:57', '1579','','','0','0','0','0','0',null,'470','11280','0','0','0','0','0','0','0','0','1'); -- id=336
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1579, 0, 0
                    , 423, 24, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyprice = 423,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=399
UPDATE product SET  productBuyPrice = "470" WHERE productId = 1579 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 336 ;
UPDATE product SET productName = '1406 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '470.00', productSellAllPrice = '470.00', productSellUnitPrice = '470.00', productSellHalfPrice = '470.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01579',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '470',lastbuyprice_withDiscount = '423',meanbuyprice = '470',meanbuyprice_withDiscount = '446.5' , productbuypricereal = '470.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='470',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='470',meanbuyprice_withTax='235',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='423',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1579';
UPDATE buybilldetail SET  lastbuyprice = 470 , meanbuyprice = 470, lastbuyprice_withDiscount = 423, meanbuyprice_withDiscount = 446.5
        , lastbuyprice_withTax = 470, meanbuyprice_withTax = 235, lastbuyprice_withDiscountAndTax = 423
                where buybilldetailid = 336;
UPDATE productunit SET proUnitBuyPrice  = 470 * productnumber WHERE productid = 1579;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1604';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1579', '1', '24', '0', '55', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-07 14:29:27','0','0'); -- id=2739
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01578', '55', '113', '1578', '21.00', '400', '8400.00', '0.00', '', '2026-10-07 16:31:57', '1578','','','0','0','0','0','0',null,'400','8400','0','0','0','0','0','0','0','0','1'); -- id=337
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1578, 0, 0
                    , 360, 21, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyprice = 360,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=398
UPDATE product SET  productBuyPrice = "400" WHERE productId = 1578 ;
UPDATE buybilldetail SET  quantitybefore = 21 WHERE buybilldetailid = 337 ;
UPDATE product SET productName = 'موديلات ريد لاين 400', productDescription = '', productCatId = '113', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01578',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '360',meanbuyprice = '400',meanbuyprice_withDiscount = '377.78' , productbuypricereal = '400.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='360',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1578';
UPDATE buybilldetail SET  lastbuyprice = 400 , meanbuyprice = 400, lastbuyprice_withDiscount = 360, meanbuyprice_withDiscount = 377.78
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 360
                where buybilldetailid = 337;
UPDATE productunit SET proUnitBuyPrice  = 400 * productnumber WHERE productid = 1578;
UPDATE storedetail SET  productquantity = '42', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1603';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1578', '1', '21', '0', '55', 'اضافة فاتورة مشتريات', 'buyBillController.php', '21', '42', '1', '2026-10-07 14:29:27','0','0'); -- id=2740
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01580', '55', '113', '1580', '24.00', '530', '12720.00', '0.00', '', '2026-10-07 16:31:57', '1580','','','0','0','0','0','0',null,'530','12720','0','0','0','0','0','0','0','0','1'); -- id=338
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:29:27', 1, 1580, 0, 0
                    , 477, 24, 0, 0, 1, '2026-10-07 16:31:57')
                ON DUPLICATE KEY UPDATE buyprice = 477,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:31:57' ; -- id=401
UPDATE product SET  productBuyPrice = "530" WHERE productId = 1580 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 338 ;
UPDATE product SET productName = '1418 ريد لاين', productDescription = '', productCatId = '113', productBuyPrice = '530.00', productSellAllPrice = '530.00', productSellUnitPrice = '530.00', productSellHalfPrice = '530.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01580',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '530',lastbuyprice_withDiscount = '477',meanbuyprice = '530',meanbuyprice_withDiscount = '503.5' , productbuypricereal = '530.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='530',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='530',meanbuyprice_withTax='265',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='477',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1580';
UPDATE buybilldetail SET  lastbuyprice = 530 , meanbuyprice = 530, lastbuyprice_withDiscount = 477, meanbuyprice_withDiscount = 503.5
        , lastbuyprice_withTax = 530, meanbuyprice_withTax = 265, lastbuyprice_withDiscountAndTax = 477
                where buybilldetailid = 338;
UPDATE productunit SET proUnitBuyPrice  = 530 * productnumber WHERE productid = 1580;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1605';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1580', '1', '24', '0', '55', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-07 14:29:27','0','0'); -- id=2741
DELETE FROM productserial WHERE billid = 53
		and type =0 
		;
UPDATE supplier SET  suppliercurrentDebt = '94635',suppliercurrentDebtInCurrency= '94635' , userid = '1', supplierdate = '2026-10-07 16:31:57'   WHERE supplierid = '109';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('109', '0.00', '94635', '0', 'اضافة فاتورة مشتريات', '55', '94635', '2026-10-07 16:31:57', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','105150','1','0','94635','94635','0',''); -- id=202
UPDATE dailyentry SET totalcreditor = '105150.00', totaldebtor = '105150.00', thedate = '2026-10-07', userid = '1', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-07 14:32:13', entryComment = 'اضافة فاتورة مشتريات رقم 53', fromFlag = '1',related='0',isopeningentry='0',operationId='53',operationDetailLink='buyBillController.php?do=details&id=53' WHERE id = '1257';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '105150.00', '105150.00', '2026-10-07', '1', '0', '1257', '2026-10-07 16:31:57','تم عكس القيد رقم 1257 ','1','0','0','0','0',''); -- id=1275
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1275', '382', '105150.00', '','0'); -- id=1275
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17552830.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1275', '592', '105150.00', '','0'); -- id=1285
UPDATE accountstree SET name = 'ريد لاين', customName = 'ريد لاين', customNameEn = 'ريد لاين', nameEn = 'ريد لاين', parent = '81', accountNature = '1', theValue = '0', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 14:32:03' WHERE id = '592';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '94635', '94635', '2026-10-07', '1', '0', '0', '2026-10-07 16:31:57','اضافة فاتورة مشتريات رقم 55','1','0',null,'0','55','buyBillController.php?do=details&id=55'); -- id=1276
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1276', '382', '94635', '','0'); -- id=1286
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17647465.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1276', '592', '94635', '','0'); -- id=1276
UPDATE accountstree SET name = 'ريد لاين', customName = 'ريد لاين', customNameEn = 'ريد لاين', nameEn = 'ريد لاين', parent = '81', accountNature = '1', theValue = '94635', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 14:32:03' WHERE id = '592';
update buybill set dailyentryid='1276,0' where buybillid=55;
UPDATE product SET overAllAveragePrice = 342 WHERE productId = 1573;UPDATE product SET overAllAveragePrice = 297 WHERE productId = 1574;UPDATE product SET overAllAveragePrice = 472.5 WHERE productId = 1575;UPDATE product SET overAllAveragePrice = 450 WHERE productId = 1576;UPDATE product SET overAllAveragePrice = 468 WHERE productId = 1577;UPDATE product SET overAllAveragePrice = 360 WHERE productId = 1578;UPDATE product SET overAllAveragePrice = 423 WHERE productId = 1579;UPDATE product SET overAllAveragePrice = 477 WHERE productId = 1580;;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:01:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:31:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 16:31:57', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=55'); -- id=3939
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:03:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:33:02", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:33:02', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3940
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:04:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:34:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 16:34:48', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3941
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:05:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:35:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 16:35:04', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3942
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:07:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:37:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 16:37:39', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3943
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:07:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:37:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 16:37:46', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3944
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:08:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:38:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 16:38:10', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3945
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:08:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:38:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-07 16:38:32', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3946
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:08:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:38:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-07 16:38:38', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3947
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:08:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:38:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storereportController.php', '2026-10-07 16:38:41', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storereportController.php'); -- id=3948
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:09:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:39:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 16:39:07', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3949
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:09:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:39:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 16:39:14', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3950
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:09:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:39:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 16:39:22', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3951
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:14:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:44:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 16:44:31', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3952
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:14:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:44:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 16:44:38', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3953
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:15:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:45:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 16:45:12', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3954
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('باور ماكس','2026-10-07','','93', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=115
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (115, 1,'2026-10-07 16:45:12',1)
                ON DUPLICATE KEY UPDATE catid = 115, edited = 1, sysdate = '2026-10-07 16:45:12', userid = 1; -- id=117
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '115', '1', '2026-10-07', '1', '0'); -- id=29
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:15:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:45:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 16:45:12', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3955
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:15:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:45:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 16:45:14', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3956
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:23:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:53:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:53:13', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3957

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac64a0e7c11a
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 16:53:13', '06ac64a0e7c11a', '1', '0.00', '0', '0', '1', '7250.00', '7250', '7250', '0', '1', '2026-10-07 16:53:13', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '10' ,'0','','','','','-1','0','0','0','0','0','7250','0','','0','0','7250','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=132
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','اضافة فاتورة مبيعات','132', '0', '2026-10-07 16:53:13', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '7250', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 16:53:13','0','0','',''); -- id=223
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 380;
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 ('680','87559', '132', '28', '1562', '5', '700', '3500', '0', '', '0', '2026-10-07 16:53:13', '1562', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','380-5,','1','1','0','0','700','3500','0','','0','0.00','0','0','0','0'); -- id=526
UPDATE sellbilldetail SET  lastbuyprice = 680.00 , meanbuyprice = 680.00, lastbuyprice_withDiscount = 680.00, meanbuyprice_withDiscount = 680.00
        , lastbuyprice_withTax = 680, meanbuyprice_withTax = 680, lastbuyprice_withDiscountAndTax = 680
                where sellbilldetailid = 526;
 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 (1562, '2026-10-07', 3500, 3400, 3400
                    , 3400, 3400, 3400, 3400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 3400, 3400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3500, 3400, 3400
                    , 3400, 3400, 3400, 3400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3400, 3400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '10', userid = '2', storedetaildate = '2026-10-07 16:53:13' WHERE storedetailid = '1587';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1562', '1', '5', '1', '132', 'اضافة فاتورة مبيعات', 'sellbillController.php', '15', '10', '2', '2026-10-07 16:53:13','0','0'); -- id=2742
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 382;
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 ('730','01564', '132', '28', '1564', '5', '750', '3750', '0', '', '0', '2026-10-07 16:53:13', '1564', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','382-5,','1','1','0','0','750','3750','0','','0','0.00','0','0','0','0'); -- id=527
UPDATE sellbilldetail SET  lastbuyprice = 730.00 , meanbuyprice = 730.00, lastbuyprice_withDiscount = 730.00, meanbuyprice_withDiscount = 730.00
        , lastbuyprice_withTax = 730, meanbuyprice_withTax = 730, lastbuyprice_withDiscountAndTax = 730
                where sellbilldetailid = 527;
 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 (1564, '2026-10-07', 3750, 3650, 3650
                    , 3650, 3650, 3650, 3650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 3650, 3650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3750, sellCostBuyPrice =sellCostBuyPrice+3650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3750, 3650, 3650
                    , 3650, 3650, 3650, 3650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3650, 3650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3750, sellCostBuyPrice =sellCostBuyPrice+3650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '2', storedetaildate = '2026-10-07 16:53:13' WHERE storedetailid = '1589';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1564', '1', '5', '1', '132', 'اضافة فاتورة مبيعات', 'sellbillController.php', '5', '0', '2', '2026-10-07 16:53:13','0','0'); -- id=2743
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '646890',  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 ('639640','7250', '0', '2', 'اضافة فاتورة مبيعات', '132', '646890', '2026-10-07 16:53:13', '2',  'sellbillController.php','1','','0'); -- id=162
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '7250', '7250', '2026-10-07', '2', '0', '0', '2026-10-07 16:53:13','اضافة فاتورة مبيعات رقم 132','1','0',null,'0','132','sellbillController.php?do=showDetail&sellbillid=132'); -- id=1277
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1277', '419', '7250', '','0'); -- id=1287
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '646890', 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 ('1277', '143', '7250', '','0'); -- id=1277
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1347660', 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 ( '7050', '7050', '2026-10-07', '2', '0', '0', '2026-10-07 16:53:13','اضافة فاتورة مبيعات رقم 132 - صرف البضاعة من المخزن','1','0',null,'0','132','sellbillController.php?do=showDetail&sellbillid=132'); -- id=1278
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1278', '402', '7050', '','0'); -- id=1288
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1301375.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1278', '382', '7050', '','0'); -- id=1278
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17640415.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1277,0,1278' where sellbillid=132;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 7250, 7050, 7050
                    , 7050, 7050, 7050, 7050
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,7050, 7050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7250, sellCostBuyPrice =sellCostBuyPrice+7050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 7250, 7050, 7050
                    , 7050, 7050, 7050, 7050
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,7050, 7050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7250, sellCostBuyPrice =sellCostBuyPrice+7050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7050
                        , returnSellVal = returnSellVal+0, 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, 7250, 7050, 7050
                    , 7050, 7050, 7050, 7050, 7050, 7050)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+7250, netSellCostBuyPrice = netSellCostBuyPrice+7050
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+7050
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+7050
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+7050
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+7050
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+7050
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+7050
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+7050;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac64a0e7c11a and sellbillId = 132 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:23:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:53:13", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:53:13', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3958
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:24:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:54:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 16:54:13', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3959
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:24:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:54:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 16:54:31', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3960
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:25:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:55:51", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 16:55:51', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3961
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:26:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:56:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 16:56:32', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3962
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('اوفر سايز دبل باور ماكس','','115','400','400','400','400','2026-10-07','0','1','0','','0','0','0','0','0','400','400','400','400','400','0','0','0','0','.','0','0','0','400','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','400','400','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','400','0','0','0','0','0','0','','','0','0','0','0'); -- id=1584
UPDATE product SET productName = 'اوفر سايز دبل باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '400', productSellAllPrice = '400', productSellUnitPrice = '400', productSellHalfPrice = '400', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01584',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '400',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1584';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1584', '1.00', '2026-10-07', '1', '0','0158401','400','400','400','400','','0','0','0','0','0','0','0','0','0','0'); -- id=1584
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1584', '1', '0', '1', '2026-10-07'); -- id=1609
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1584', '1', '0', '0', '1584', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2744
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1584, 1,'2026-10-07 16:56:32',1)
                ON DUPLICATE KEY UPDATE productid = 1584, edited = 1, sysdate = '2026-10-07 16:56:32', userid = 1; -- id=2399
UPDATE product SET productName = 'اوفر سايز دبل باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01584',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '400',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1584';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('بوكس فيت باور ماكس','','115','450','450','450','450','2026-10-07','0','1','0','','0','0','0','0','0','450','450','450','450','450','0','0','0','0','.','0','0','0','450','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','450','450','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','450','0','0','0','0','0','0','','','0','0','0','0'); -- id=1585
UPDATE product SET productName = 'بوكس فيت باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '450', productSellAllPrice = '450', productSellUnitPrice = '450', productSellHalfPrice = '450', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01585',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1585';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1585', '1.00', '2026-10-07', '1', '0','0158501','450','450','450','450','','0','0','0','0','0','0','0','0','0','0'); -- id=1585
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1585', '1', '0', '1', '2026-10-07'); -- id=1610
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1585', '1', '0', '0', '1585', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2745
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1585, 1,'2026-10-07 16:56:32',1)
                ON DUPLICATE KEY UPDATE productid = 1585, edited = 1, sysdate = '2026-10-07 16:56:32', userid = 1; -- id=2400
UPDATE product SET productName = 'بوكس فيت باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '450.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01585',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '450',meanbuyprice = '450',meanbuyprice_withDiscount = '450' , productbuypricereal = '450' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='450',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1585';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('شبابي فولكافر باور ماكس','','115','325','325','325','325','2026-10-07','0','1','0','','0','0','0','0','0','325','325','325','325','325','0','0','0','0','.','0','0','0','325','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','325','325','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','325','0','0','0','0','0','0','','','0','0','0','0'); -- id=1586
UPDATE product SET productName = 'شبابي فولكافر باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '325', productSellAllPrice = '325', productSellUnitPrice = '325', productSellHalfPrice = '325', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01586',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '325',lastbuyprice_withDiscount = '325',meanbuyprice = '325',meanbuyprice_withDiscount = '325' , productbuypricereal = '325' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='325',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='325',meanbuyprice_withTax='325',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='325',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1586';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1586', '1.00', '2026-10-07', '1', '0','0158601','325','325','325','325','','0','0','0','0','0','0','0','0','0','0'); -- id=1586
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1586', '1', '0', '1', '2026-10-07'); -- id=1611
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1586', '1', '0', '0', '1586', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2746
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1586, 1,'2026-10-07 16:56:32',1)
                ON DUPLICATE KEY UPDATE productid = 1586, edited = 1, sysdate = '2026-10-07 16:56:32', userid = 1; -- id=2401
UPDATE product SET productName = 'شبابي فولكافر باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '325.00', productSellAllPrice = '325.00', productSellUnitPrice = '325.00', productSellHalfPrice = '325.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01586',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '325',lastbuyprice_withDiscount = '325',meanbuyprice = '325',meanbuyprice_withDiscount = '325' , productbuypricereal = '325' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='325',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='325',meanbuyprice_withTax='325',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='325',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1586';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('شبابي طباعه باور ماكس','','115','315','315','315','315','2026-10-07','0','1','0','','0','0','0','0','0','315','315','315','315','315','0','0','0','0','.','0','0','0','315','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','315','315','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','315','0','0','0','0','0','0','','','0','0','0','0'); -- id=1587
UPDATE product SET productName = 'شبابي طباعه باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '315', productSellAllPrice = '315', productSellUnitPrice = '315', productSellHalfPrice = '315', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01587',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '315',lastbuyprice_withDiscount = '315',meanbuyprice = '315',meanbuyprice_withDiscount = '315' , productbuypricereal = '315' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='315',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='315',meanbuyprice_withTax='315',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='315',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1587';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1587', '1.00', '2026-10-07', '1', '0','0158701','315','315','315','315','','0','0','0','0','0','0','0','0','0','0'); -- id=1587
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1587', '1', '0', '1', '2026-10-07'); -- id=1612
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1587', '1', '0', '0', '1587', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2747
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1587, 1,'2026-10-07 16:56:32',1)
                ON DUPLICATE KEY UPDATE productid = 1587, edited = 1, sysdate = '2026-10-07 16:56:32', userid = 1; -- id=2402
UPDATE product SET productName = 'شبابي طباعه باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '315.00', productSellAllPrice = '315.00', productSellUnitPrice = '315.00', productSellHalfPrice = '315.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01587',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '315',lastbuyprice_withDiscount = '315',meanbuyprice = '315',meanbuyprice_withDiscount = '315' , productbuypricereal = '315' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='315',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='315',meanbuyprice_withTax='315',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='315',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1587';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('اوفرسايز عادي باور ماكس','','115','350','350','350','350','2026-10-07','0','1','0','','0','0','0','0','0','350','350','350','350','350','0','0','0','0','.','0','0','0','350','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','350','350','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','350','0','0','0','0','0','0','','','0','0','0','0'); -- id=1588
UPDATE product SET productName = 'اوفرسايز عادي باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '350', productSellAllPrice = '350', productSellUnitPrice = '350', productSellHalfPrice = '350', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01588',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '350',lastbuyprice_withDiscount = '350',meanbuyprice = '350',meanbuyprice_withDiscount = '350' , productbuypricereal = '350' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='350',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='350',meanbuyprice_withTax='350',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='350',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1588';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1588', '1.00', '2026-10-07', '1', '0','0158801','350','350','350','350','','0','0','0','0','0','0','0','0','0','0'); -- id=1588
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1588', '1', '0', '1', '2026-10-07'); -- id=1613
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1588', '1', '0', '0', '1588', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2748
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1588, 1,'2026-10-07 16:56:32',1)
                ON DUPLICATE KEY UPDATE productid = 1588, edited = 1, sysdate = '2026-10-07 16:56:32', userid = 1; -- id=2403
UPDATE product SET productName = 'اوفرسايز عادي باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '350.00', productSellAllPrice = '350.00', productSellUnitPrice = '350.00', productSellHalfPrice = '350.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01588',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '350',lastbuyprice_withDiscount = '350',meanbuyprice = '350',meanbuyprice_withDiscount = '350' , productbuypricereal = '350' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='350',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='350',meanbuyprice_withTax='350',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='350',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1588';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:26:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:56:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 16:56:33', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3963
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:26:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:56:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 16:56:38', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3964
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('باور ماكس', '', '', '', '', '0', '1', '2026-10-07 16:56:48', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=111
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('111', '0', '', '0', 'إضافة مورد جديد', '111', '', '2026-10-07 16:56:48', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=203
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('باور ماكس', 'باور ماكس', 'باور ماكس', 'باور ماكس', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-07 16:56:48'); -- id=594
UPDATE supplier SET suppliername = 'باور ماكس', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-07', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='594',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '111';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:27:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:57:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 16:57:43', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3965
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac64f96e24ee', '2026-10-07 16:56:38', '111', '0.00', '139667.4', '7', '1', '150180.00',  '139667.40', '0', '139667.4', '1', '2026-10-07 16:57:43', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=56
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01584', '56', '115', '1584', '216', '400', '86400.00', '0', '', '2026-10-07 16:57:43', '1584','','','0','0','0','0','0',null,'400','86400','0','0','0','0','0','0','0','0','1'); -- id=339
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 16:56:38', 1, 1584, 0, 0
                    , 372, 216, 0, 0, 1, '2026-10-07 16:57:43')
                ON DUPLICATE KEY UPDATE buyprice = 372,
                        buyQuantity =buyQuantity+216, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:57:43' ; -- id=425
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1584', '400', '216', '0', 'buyBillController.php', '339', '', '0', '0'); -- id=287
UPDATE product SET  productBuyPrice = "400" WHERE productId = 1584 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 339 ;
UPDATE product SET productName = 'اوفر سايز دبل باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01584',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '372',meanbuyprice = '400',meanbuyprice_withDiscount = '372' , productbuypricereal = '400.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='372',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1584';
UPDATE buybilldetail SET  lastbuyprice = 400 , meanbuyprice = 400, lastbuyprice_withDiscount = 372, meanbuyprice_withDiscount = 372
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 372
                where buybilldetailid = 339;
UPDATE productunit SET proUnitBuyPrice  = 400 * productnumber WHERE productid = 1584;
UPDATE storedetail SET  productquantity = '216', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1609';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1584', '1', '216', '0', '56', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '216', '1', '2026-10-07 16:56:38','0','0'); -- id=2749
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01585', '56', '115', '1585', '54', '450', '24300.00', '0', '', '2026-10-07 16:57:43', '1585','','','0','0','0','0','0',null,'450','24300','0','0','0','0','0','0','0','0','1'); -- id=340
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 16:56:38', 1, 1585, 0, 0
                    , 418.5, 54, 0, 0, 1, '2026-10-07 16:57:43')
                ON DUPLICATE KEY UPDATE buyprice = 418.5,
                        buyQuantity =buyQuantity+54, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:57:43' ; -- id=426
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1585', '450', '54', '0', 'buyBillController.php', '340', '', '0', '0'); -- id=288
UPDATE product SET  productBuyPrice = "450" WHERE productId = 1585 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 340 ;
UPDATE product SET productName = 'بوكس فيت باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '450.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01585',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '450',lastbuyprice_withDiscount = '418.5',meanbuyprice = '450',meanbuyprice_withDiscount = '418.5' , productbuypricereal = '450.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='450',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='450',meanbuyprice_withTax='450',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='418.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1585';
UPDATE buybilldetail SET  lastbuyprice = 450 , meanbuyprice = 450, lastbuyprice_withDiscount = 418.5, meanbuyprice_withDiscount = 418.5
        , lastbuyprice_withTax = 450, meanbuyprice_withTax = 450, lastbuyprice_withDiscountAndTax = 418.5
                where buybilldetailid = 340;
UPDATE productunit SET proUnitBuyPrice  = 450 * productnumber WHERE productid = 1585;
UPDATE storedetail SET  productquantity = '54', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1610';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1585', '1', '54', '0', '56', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '54', '1', '2026-10-07 16:56:38','0','0'); -- id=2750
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01586', '56', '115', '1586', '42', '325', '13650.00', '0', '', '2026-10-07 16:57:43', '1586','','','0','0','0','0','0',null,'325','13650','0','0','0','0','0','0','0','0','1'); -- id=341
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 16:56:38', 1, 1586, 0, 0
                    , 302.25, 42, 0, 0, 1, '2026-10-07 16:57:43')
                ON DUPLICATE KEY UPDATE buyprice = 302.25,
                        buyQuantity =buyQuantity+42, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:57:43' ; -- id=427
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1586', '325', '42', '0', 'buyBillController.php', '341', '', '0', '0'); -- id=289
UPDATE product SET  productBuyPrice = "325" WHERE productId = 1586 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 341 ;
UPDATE product SET productName = 'شبابي فولكافر باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '325.00', productSellAllPrice = '325.00', productSellUnitPrice = '325.00', productSellHalfPrice = '325.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01586',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '325',lastbuyprice_withDiscount = '302.25',meanbuyprice = '325',meanbuyprice_withDiscount = '302.25' , productbuypricereal = '325.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='325',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='325',meanbuyprice_withTax='325',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='302.25',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1586';
UPDATE buybilldetail SET  lastbuyprice = 325 , meanbuyprice = 325, lastbuyprice_withDiscount = 302.25, meanbuyprice_withDiscount = 302.25
        , lastbuyprice_withTax = 325, meanbuyprice_withTax = 325, lastbuyprice_withDiscountAndTax = 302.25
                where buybilldetailid = 341;
UPDATE productunit SET proUnitBuyPrice  = 325 * productnumber WHERE productid = 1586;
UPDATE storedetail SET  productquantity = '42', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1611';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1586', '1', '42', '0', '56', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '42', '1', '2026-10-07 16:56:38','0','0'); -- id=2751
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01587', '56', '115', '1587', '42', '315', '13230.00', '0', '', '2026-10-07 16:57:43', '1587','','','0','0','0','0','0',null,'315','13230','0','0','0','0','0','0','0','0','1'); -- id=342
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 16:56:38', 1, 1587, 0, 0
                    , 292.95, 42, 0, 0, 1, '2026-10-07 16:57:43')
                ON DUPLICATE KEY UPDATE buyprice = 292.95,
                        buyQuantity =buyQuantity+42, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:57:43' ; -- id=428
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1587', '315', '42', '0', 'buyBillController.php', '342', '', '0', '0'); -- id=290
UPDATE product SET  productBuyPrice = "315" WHERE productId = 1587 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 342 ;
UPDATE product SET productName = 'شبابي طباعه باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '315.00', productSellAllPrice = '315.00', productSellUnitPrice = '315.00', productSellHalfPrice = '315.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01587',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '315',lastbuyprice_withDiscount = '292.95',meanbuyprice = '315',meanbuyprice_withDiscount = '292.95' , productbuypricereal = '315.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='315',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='315',meanbuyprice_withTax='315',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='292.95',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1587';
UPDATE buybilldetail SET  lastbuyprice = 315 , meanbuyprice = 315, lastbuyprice_withDiscount = 292.95, meanbuyprice_withDiscount = 292.95
        , lastbuyprice_withTax = 315, meanbuyprice_withTax = 315, lastbuyprice_withDiscountAndTax = 292.95
                where buybilldetailid = 342;
UPDATE productunit SET proUnitBuyPrice  = 315 * productnumber WHERE productid = 1587;
UPDATE storedetail SET  productquantity = '42', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1612';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1587', '1', '42', '0', '56', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '42', '1', '2026-10-07 16:56:38','0','0'); -- id=2752
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01588', '56', '115', '1588', '36', '350', '12600.00', '0', '', '2026-10-07 16:57:43', '1588','','','0','0','0','0','0',null,'350','12600','0','0','0','0','0','0','0','0','1'); -- id=343
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 16:56:38', 1, 1588, 0, 0
                    , 325.5, 36, 0, 0, 1, '2026-10-07 16:57:43')
                ON DUPLICATE KEY UPDATE buyprice = 325.5,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 16:57:43' ; -- id=429
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1588', '350', '36', '0', 'buyBillController.php', '343', '', '0', '0'); -- id=291
UPDATE product SET  productBuyPrice = "350" WHERE productId = 1588 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 343 ;
UPDATE product SET productName = 'اوفرسايز عادي باور ماكس', productDescription = '', productCatId = '115', productBuyPrice = '350.00', productSellAllPrice = '350.00', productSellUnitPrice = '350.00', productSellHalfPrice = '350.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01588',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '350',lastbuyprice_withDiscount = '325.5',meanbuyprice = '350',meanbuyprice_withDiscount = '325.5' , productbuypricereal = '350.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='350',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='350',meanbuyprice_withTax='350',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='325.5',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1588';
UPDATE buybilldetail SET  lastbuyprice = 350 , meanbuyprice = 350, lastbuyprice_withDiscount = 325.5, meanbuyprice_withDiscount = 325.5
        , lastbuyprice_withTax = 350, meanbuyprice_withTax = 350, lastbuyprice_withDiscountAndTax = 325.5
                where buybilldetailid = 343;
UPDATE productunit SET proUnitBuyPrice  = 350 * productnumber WHERE productid = 1588;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1613';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1588', '1', '36', '0', '56', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 16:56:38','0','0'); -- id=2753
UPDATE supplier SET  suppliercurrentDebt = '139667.4',suppliercurrentDebtInCurrency= '139667.4' , userid = '1', supplierdate = '2026-10-07 16:57:43'   WHERE supplierid = '111';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('111', '0.00', '139667.4', '0', 'اضافة فاتورة مشتريات', '56', '139667.4', '2026-10-07 16:56:38', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','139667.4','1','0','139667.4','139667.4','0',''); -- id=204
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '139667.4', '139667.4', '2026-10-07', '1', '0', '0', '2026-10-07 16:57:43','اضافة فاتورة مشتريات رقم 56','1','0',null,'0','56','buyBillController.php?do=details&id=56'); -- id=1279
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1279', '382', '139667.4', '','0'); -- id=1289
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17780082.64', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1279', '594', '139667.4', '','0'); -- id=1279
UPDATE accountstree SET name = 'باور ماكس', customName = 'باور ماكس', customNameEn = 'باور ماكس', nameEn = 'باور ماكس', parent = '81', accountNature = '1', theValue = '139667.4', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 16:56:48' WHERE id = '594';
update buybill set dailyentryid='1279,0' where buybillid=56;
COMMIT;
UPDATE product SET overAllAveragePrice = 372 WHERE productId = 1584;UPDATE product SET overAllAveragePrice = 418.5 WHERE productId = 1585;UPDATE product SET overAllAveragePrice = 302.25 WHERE productId = 1586;UPDATE product SET overAllAveragePrice = 292.95 WHERE productId = 1587;UPDATE product SET overAllAveragePrice = 325.5 WHERE productId = 1588;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:27:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:57:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 16:57:43', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=56'); -- id=3966
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:27:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 16:57:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 16:57:45', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=56&type=2'); -- id=3967
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:30:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:00:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 17:00:27', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=56&type=2'); -- id=3968
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:43:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:13:05", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:13:05', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3969
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:44:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:14:01", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:14:01', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3970

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac653712ef0a
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 17:14:01', '06ac653712ef0a', '1', '0.00', '0', '0', '1', '2100.00', '2100', '2100', '0', '1', '2026-10-07 17:14:01', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '3' ,'0','','','','','-1','0','0','0','0','0','2100','0','','0','0','2100','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=133
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','اضافة فاتورة مبيعات','133', '0', '2026-10-07 17:14:01', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '2100', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 17:14:01','0','0','',''); -- id=224
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 336;
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 ('675','01491', '133', '108', '1491', '3', '700', '2100', '0', '', '0', '2026-10-07 17:14:01', '1491', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','336-3,','1','1','0','0','700','2100','0','','0','0.00','0','0','0','0'); -- id=528
UPDATE sellbilldetail SET  lastbuyprice = 675.00 , meanbuyprice = 675.00, lastbuyprice_withDiscount = 675.00, meanbuyprice_withDiscount = 675.00
        , lastbuyprice_withTax = 675, meanbuyprice_withTax = 675, lastbuyprice_withDiscountAndTax = 675
                where sellbilldetailid = 528;
 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 (1491, '2026-10-07', 2100, 2025, 2025
                    , 2025, 2025, 2025, 2025
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 2025, 2025, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2025
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2025, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2025
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2025, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2025
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2025
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2025
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2025
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2100, 2025, 2025
                    , 2025, 2025, 2025, 2025
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2025, 2025, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2025
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2025, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2025
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2025, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2025
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2025
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2025
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2025
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '2', storedetaildate = '2026-10-07 17:14:01' WHERE storedetailid = '1516';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1491', '1', '3', '1', '133', 'اضافة فاتورة مبيعات', 'sellbillController.php', '3', '0', '2', '2026-10-07 17:14:01','0','0'); -- id=2754
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '648990',  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 ('646890','2100', '0', '2', 'اضافة فاتورة مبيعات', '133', '648990', '2026-10-07 17:14:01', '2',  'sellbillController.php','1','','0'); -- id=163
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2100', '2100', '2026-10-07', '2', '0', '0', '2026-10-07 17:14:01','اضافة فاتورة مبيعات رقم 133','1','0',null,'0','133','sellbillController.php?do=showDetail&sellbillid=133'); -- id=1280
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1280', '419', '2100', '','0'); -- id=1290
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '648990', 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 ('1280', '143', '2100', '','0'); -- id=1280
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1349760', 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 ( '2025', '2025', '2026-10-07', '2', '0', '0', '2026-10-07 17:14:01','اضافة فاتورة مبيعات رقم 133 - صرف البضاعة من المخزن','1','0',null,'0','133','sellbillController.php?do=showDetail&sellbillid=133'); -- id=1281
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1281', '402', '2025', '','0'); -- id=1291
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1303400.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1281', '382', '2025', '','0'); -- id=1281
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17778057.64', 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='1280,0,1281' where sellbillid=133;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 2100, 2025, 2025
                    , 2025, 2025, 2025, 2025
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,2025, 2025, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2025
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2025, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2025
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2025, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2025
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2025
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2025
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2025
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2100, 2025, 2025
                    , 2025, 2025, 2025, 2025
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,2025, 2025, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2025
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2025, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2025
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2025, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2025
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2025
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2025
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2025
                        , returnSellVal = returnSellVal+0, 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, 2100, 2025, 2025
                    , 2025, 2025, 2025, 2025, 2025, 2025)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+2100, netSellCostBuyPrice = netSellCostBuyPrice+2025
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+2025
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+2025
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+2025
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+2025
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+2025
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+2025
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+2025;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac653712ef0a and sellbillId = 133 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:44:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:14:01", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:14:01', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3971
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:44:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:14:50", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:14:50', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3972
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:45:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:15:16", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:15:16', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=3973
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:45:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:15:29", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:15:29', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3974
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:49:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:19:27", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 17:19:27', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3975
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:49:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:19:57", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:19:57', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3976
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:50:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:20:18", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 17:20:18', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3977
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:50:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:20:31", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:20:31', '4', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=125'); -- id=3978
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:51:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:21:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storereportController.php', '2026-10-07 17:21:49', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storereportController.php'); -- id=3979
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:52:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:22:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storereportController.php', '2026-10-07 17:22:12', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storereportController.php?do=show'); -- id=3980
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:52:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:22:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 17:22:37', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=3981
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:52:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:22:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 17:22:43', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3982
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:53:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:23:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 17:23:02', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=3983
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:53:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:23:27", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:23:27', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3984

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac6550d2d144
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 17:23:27', '06ac6550d2d144', '1', '0.00', '0', '0', '1', '6825.00', '6825', '6825', '0', '1', '2026-10-07 17:23:27', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '26' ,'0','','','','','-1','0','0','0','0','0','6825','0','','0','0','6825','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=134
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','اضافة فاتورة مبيعات','134', '0', '2026-10-07 17:23:27', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '6825', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 17:23:27','0','0','',''); -- id=225
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 ('275','07110', '134', '40', '1129', '10', '295', '2950', '0', '', '0', '2026-10-07 17:23:27', '1129', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','295','2950','0','','0','0.00','0','0','0','0'); -- id=529
UPDATE sellbilldetail SET  lastbuyprice = 275.00 , meanbuyprice = 275.00, lastbuyprice_withDiscount = 275.00, meanbuyprice_withDiscount = 275.00
        , lastbuyprice_withTax = 275, meanbuyprice_withTax = 275, lastbuyprice_withDiscountAndTax = 275
                where sellbilldetailid = 529;
 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 (1129, '2026-10-07', 2950, 2750, 2750
                    , 2750, 2750, 2750, 2750
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 2750, 2750, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2950, sellCostBuyPrice =sellCostBuyPrice+2750
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2750, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2750
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2750, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2750
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2750
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2750
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2750
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 2950, 2750, 2750
                    , 2750, 2750, 2750, 2750
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2750, 2750, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2950, sellCostBuyPrice =sellCostBuyPrice+2750
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2750, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2750
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2750, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2750
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2750
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2750
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2750
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '612', userid = '2', storedetaildate = '2026-10-07 17:23:27' WHERE storedetailid = '1129';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1129', '1', '10', '1', '134', 'اضافة فاتورة مبيعات', 'sellbillController.php', '622', '612', '2', '2026-10-07 17:23:27','0','0'); -- id=2755
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 ('225','i0000859', '134', '21', '859', '15', '235', '3525', '0', '', '0', '2026-10-07 17:23:27', '859', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','235','3525','0','','0','0.00','0','0','0','0'); -- id=530
UPDATE sellbilldetail SET  lastbuyprice = 225.00 , meanbuyprice = 225.00, lastbuyprice_withDiscount = 225.00, meanbuyprice_withDiscount = 225.00
        , lastbuyprice_withTax = 225, meanbuyprice_withTax = 225, lastbuyprice_withDiscountAndTax = 225
                where sellbilldetailid = 530;
 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 (859, '2026-10-07', 3525, 3375, 3375
                    , 3375, 3375, 3375, 3375
                    , 0, 0, 0, 0
                    , 0, 0, 0, 15, 0, 3375, 3375, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3525, sellCostBuyPrice =sellCostBuyPrice+3375
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3375, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3375
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3375, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3375
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3375
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3375
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3375
                        , returnSellVal = returnSellVal+0, 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+15
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3525, 3375, 3375
                    , 3375, 3375, 3375, 3375
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3375, 3375, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3525, sellCostBuyPrice =sellCostBuyPrice+3375
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3375, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3375
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3375, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3375
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3375
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3375
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3375
                        , returnSellVal = returnSellVal+0, 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 = '673', userid = '2', storedetaildate = '2026-10-07 17:23:27' WHERE storedetailid = '859';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('859', '1', '15', '1', '134', 'اضافة فاتورة مبيعات', 'sellbillController.php', '688', '673', '2', '2026-10-07 17:23:27','0','0'); -- id=2756
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 ('340','i0000848', '134', '20', '848', '1', '350', '350', '0', '', '0', '2026-10-07 17:23:27', '848', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','350','350','0','','0','0.00','0','0','0','0'); -- id=531
UPDATE sellbilldetail SET  lastbuyprice = 340.00 , meanbuyprice = 340.00, lastbuyprice_withDiscount = 340.00, meanbuyprice_withDiscount = 340.00
        , lastbuyprice_withTax = 340, meanbuyprice_withTax = 340, lastbuyprice_withDiscountAndTax = 340
                where sellbilldetailid = 531;
 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 (848, '2026-10-07', 350, 340, 340
                    , 340, 340, 340, 340
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 340, 340, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+350, sellCostBuyPrice =sellCostBuyPrice+340
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+340, sellCostMeanBuyPrice = sellCostMeanBuyPrice+340
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+340, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+340
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+340
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+340
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+340
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+1
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 350, 340, 340
                    , 340, 340, 340, 340
                    , 0, 0, 0, 0
                    , 0, 0, 0, 340, 340, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+350, sellCostBuyPrice =sellCostBuyPrice+340
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+340, sellCostMeanBuyPrice = sellCostMeanBuyPrice+340
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+340, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+340
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+340
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+340
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+340
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '144', userid = '2', storedetaildate = '2026-10-07 17:23:27' WHERE storedetailid = '848';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('848', '1', '1', '1', '134', 'اضافة فاتورة مبيعات', 'sellbillController.php', '145', '144', '2', '2026-10-07 17:23:27','0','0'); -- id=2757
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '655815',  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 ('648990','6825', '0', '2', 'اضافة فاتورة مبيعات', '134', '655815', '2026-10-07 17:23:27', '2',  'sellbillController.php','1','','0'); -- id=164
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '6825', '6825', '2026-10-07', '2', '0', '0', '2026-10-07 17:23:27','اضافة فاتورة مبيعات رقم 134','1','0',null,'0','134','sellbillController.php?do=showDetail&sellbillid=134'); -- id=1282
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1282', '419', '6825', '','0'); -- id=1292
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '655815', 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 ('1282', '143', '6825', '','0'); -- id=1282
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1356585', 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 ( '6465', '6465', '2026-10-07', '2', '0', '0', '2026-10-07 17:23:27','اضافة فاتورة مبيعات رقم 134 - صرف البضاعة من المخزن','1','0',null,'0','134','sellbillController.php?do=showDetail&sellbillid=134'); -- id=1283
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1283', '402', '6465', '','0'); -- id=1293
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1309865.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1283', '382', '6465', '','0'); -- id=1283
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17771592.64', 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='1282,0,1283' where sellbillid=134;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 6825, 6465, 6465
                    , 6465, 6465, 6465, 6465
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,6465, 6465, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6825, sellCostBuyPrice =sellCostBuyPrice+6465
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6465, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6465
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6465, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6465
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6465
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6465
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6465
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 6825, 6465, 6465
                    , 6465, 6465, 6465, 6465
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,6465, 6465, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+6825, sellCostBuyPrice =sellCostBuyPrice+6465
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6465, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6465
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6465, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6465
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6465
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6465
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6465
                        , returnSellVal = returnSellVal+0, 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, 6825, 6465, 6465
                    , 6465, 6465, 6465, 6465, 6465, 6465)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+6825, netSellCostBuyPrice = netSellCostBuyPrice+6465
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+6465
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+6465
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+6465
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+6465
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+6465
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+6465
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+6465;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac6550d2d144 and sellbillId = 134 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:53:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:23:27", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:23:27', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3985
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:54:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:24:51", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:24:51', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3986
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:54:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:24:54", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 17:24:54', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3987
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:55:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:25:00", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:25:00', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3988
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:55:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:25:12", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:25:12', '2', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=134'); -- id=3989
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:56:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:26:04", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 17:26:04', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3990
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:56:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:26:29", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:26:29', '2', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=129'); -- id=3991
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:56:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:26:50", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 17:26:50', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3992
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 13:58:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:28:09", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:28:09', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3993
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:00:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:30:22", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:30:22', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=134'); -- id=3994
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:00:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:30:29", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:30:29', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3995
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:00:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:30:55", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:30:55', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3996
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:01:20";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:01:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:31:31", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 17:31:31', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3997
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:01:31";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 17:31:31", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 17:31:31', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3998
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:01:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:31:58", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:31:58', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3999
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:04:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:34:27", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 17:34:27', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=4000
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:09:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:39:54", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:39:54', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4001
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:12:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:42:16", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 17:42:16', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=4002
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:28:37";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:28:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:58:48", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 17:58:48', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4003
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:28:48";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 17:58:48", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 17:58:48', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4004
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:28:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:58:51", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:58:51', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4005
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:28:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:58:53", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 17:58:53', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=4006
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:29:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:59:00", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 17:59:00', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4007
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:29:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:59:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 17:59:45', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4008
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:29:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 17:59:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 17:59:51', '1', 'editbill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editbill&id=52'); -- id=4009
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:30:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:00:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:00:00', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=update'); -- id=4010
BEGIN;
UPDATE costcenterdetail SET del = 1 WHERE type in( 3) and  modelid = 52;
UPDATE buybill SET  buybillsysdate = '2026-10-07 18:00:00', userid = '1',delbyuserid = '1', conditions = '1' WHERE buybillid = '52';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1568, 0, 0
                    , 500, 36, 0, 0, 1, '2026-10-07 18:00:00')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-36, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:00:00' ; -- id=386
UPDATE buybilldetail SET  lastbuyprice = 500.00 , meanbuyprice = 500.00, lastbuyprice_withDiscount = 500.00, meanbuyprice_withDiscount = 500.00
        , lastbuyprice_withTax = 500.00, meanbuyprice_withTax = 500.00, lastbuyprice_withDiscountAndTax = 500.00
                where buybilldetailid = 310;
UPDATE product SET productName = 'فيلو جينز 6160', productDescription = '', productCatId = '31', productBuyPrice = '500.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01568',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '0',meanbuyprice = '500.00',meanbuyprice_withDiscount = '500' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1568';
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1568;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1593';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1568', '1', '36', '1', '52', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '36', '0', '1', '2026-10-07 14:20:21','0','0'); -- id=2758
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1350, 0, 0
                    , 555, 40, 0, 0, 1, '2026-10-07 18:00:00')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-40, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:00:00' ; -- id=387
UPDATE product SET productName = 'اميري تطريز 6161 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '555.00', productSellAllPrice = '575.00', productSellUnitPrice = '575.00', productSellHalfPrice = '575.00', productDate = '2026-09-30', conditions = '0', userId = '1', limitamount = '0', parcode = '01350',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '555',lastbuyprice_withDiscount = '555',meanbuyprice = '555',meanbuyprice_withDiscount = '555' , productbuypricereal = '555.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.60' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='555',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='555',meanbuyprice_withTax='555',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1350';
UPDATE productunit SET proUnitBuyPrice  = 555 * productnumber WHERE productid = 1350;
UPDATE storedetail SET  productquantity = '40', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1350';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1350', '1', '40', '1', '52', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '80', '40', '1', '2026-10-07 14:20:21','0','0'); -- id=2759
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1569, 0, 0
                    , 465, 30, 0, 0, 1, '2026-10-07 18:00:00')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-30, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:00:00' ; -- id=388
UPDATE buybilldetail SET  lastbuyprice = 465.00 , meanbuyprice = 465.00, lastbuyprice_withDiscount = 465.00, meanbuyprice_withDiscount = 465.00
        , lastbuyprice_withTax = 465.00, meanbuyprice_withTax = 465.00, lastbuyprice_withDiscountAndTax = 465.00
                where buybilldetailid = 312;
UPDATE product SET productName = 'فيلو جينز 6155', productDescription = '', productCatId = '31', productBuyPrice = '465.00', productSellAllPrice = '485.00', productSellUnitPrice = '485.00', productSellHalfPrice = '485.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01569',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '465',lastbuyprice_withDiscount = '0',meanbuyprice = '465.00',meanbuyprice_withDiscount = '465' , productbuypricereal = '465.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.30' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='465',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='465',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1569';
UPDATE productunit SET proUnitBuyPrice  = 465 * productnumber WHERE productid = 1569;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1594';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1569', '1', '30', '1', '52', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '30', '0', '1', '2026-10-07 14:20:21','0','0'); -- id=2760
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1570, 0, 0
                    , 430, 35, 0, 0, 1, '2026-10-07 18:00:00')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-35, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:00:00' ; -- id=389
UPDATE buybilldetail SET  lastbuyprice = 430.00 , meanbuyprice = 430.00, lastbuyprice_withDiscount = 430.00, meanbuyprice_withDiscount = 430.00
        , lastbuyprice_withTax = 430.00, meanbuyprice_withTax = 430.00, lastbuyprice_withDiscountAndTax = 430.00
                where buybilldetailid = 313;
UPDATE product SET productName = 'فيلو جينز 6167', productDescription = '', productCatId = '31', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01570',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '0',meanbuyprice = '430.00',meanbuyprice_withDiscount = '430' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.65' , buyhalf_precentage = '4.65' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1570';
UPDATE productunit SET proUnitBuyPrice  = 430 * productnumber WHERE productid = 1570;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1595';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1570', '1', '35', '1', '52', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '35', '0', '1', '2026-10-07 14:20:21','0','0'); -- id=2761
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1571, 0, 0
                    , 480, 25, 0, 0, 1, '2026-10-07 18:00:00')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-25, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:00:00' ; -- id=390
UPDATE buybilldetail SET  lastbuyprice = 480.00 , meanbuyprice = 480.00, lastbuyprice_withDiscount = 480.00, meanbuyprice_withDiscount = 480.00
        , lastbuyprice_withTax = 480.00, meanbuyprice_withTax = 480.00, lastbuyprice_withDiscountAndTax = 480.00
                where buybilldetailid = 314;
UPDATE product SET productName = 'فيلو جينز 6504', productDescription = '', productCatId = '31', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01571',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '0',meanbuyprice = '480.00',meanbuyprice_withDiscount = '480' , productbuypricereal = '480.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1571';
UPDATE productunit SET proUnitBuyPrice  = 480 * productnumber WHERE productid = 1571;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1596';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1571', '1', '25', '1', '52', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '25', '0', '1', '2026-10-07 14:20:21','0','0'); -- id=2762
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1572, 0, 0
                    , 490, 33, 0, 0, 1, '2026-10-07 18:00:00')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-33, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:00:00' ; -- id=391
UPDATE buybilldetail SET  lastbuyprice = 490.00 , meanbuyprice = 490.00, lastbuyprice_withDiscount = 490.00, meanbuyprice_withDiscount = 490.00
        , lastbuyprice_withTax = 490.00, meanbuyprice_withTax = 490.00, lastbuyprice_withDiscountAndTax = 490.00
                where buybilldetailid = 315;
UPDATE product SET productName = 'جاكيت فيلو جينز 6177', productDescription = '', productCatId = '31', productBuyPrice = '490.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01572',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '490',lastbuyprice_withDiscount = '0',meanbuyprice = '490.00',meanbuyprice_withDiscount = '490' , productbuypricereal = '490.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.12' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='490',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='490',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1572';
UPDATE productunit SET proUnitBuyPrice  = 490 * productnumber WHERE productid = 1572;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1597';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1572', '1', '33', '1', '52', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '33', '0', '1', '2026-10-07 14:20:21','0','0'); -- id=2763
UPDATE supplier SET  suppliercurrentDebt = '1021282',suppliercurrentDebtInCurrency= '731775' , userid = '1', supplierdate = '2026-10-07 18:00:00'   WHERE supplierid = '6';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('6', '1118652.00', '97370.00', '1', 'حذف فاتورة مشتريات - للتعديل', '52', '1021282', '2026-10-07 14:20:21', '1', 'buyBillController.php', 'حذف فاتورة مشتريات - للتعديل', '0','', '0','1','1','97370','1','829145','97370','731775','0',''); -- id=205
UPDATE productserial SET del = 1
		 WHERE billid = 52;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,deletedbuyid,controlname,payedtax,costcenterid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac62af59e492', '2026-10-07 14:20:21', '6', '731775.00', '806945', '0', '0', '75170.00', '75170.00', '0.00', '75170', '1', '2026-10-07 18:00:00', '', '1', '0', '', '1', '1','1','52','buyBillController.php','0.00','-1','1','0','0','.','0','0','0','0','0','0'); -- id=57
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01568', '57', '31', '1568', '36.00', '500', '18000.00', '0.00', '', '2026-10-07 18:00:00', '1568','','','0','0','0','0','0',null,'500','18000','0','0','0','0','0','0','0','0','1'); -- id=344
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1568, 0, 0
                    , 500, 36, 0, 0, 1, '2026-10-07 18:00:00')
                ON DUPLICATE KEY UPDATE buyprice = 500,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:00:00' ; -- id=386
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1568 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 344 ;
UPDATE product SET productName = 'فيلو جينز 6160', productDescription = '', productCatId = '31', productBuyPrice = '500.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01568',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='250',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1568';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 500, meanbuyprice_withDiscount = 500
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 250, lastbuyprice_withDiscountAndTax = 500
                where buybilldetailid = 344;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1568;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1593';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1568', '1', '36', '0', '57', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 14:20:21','0','0'); -- id=2764
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01569', '57', '31', '1569', '30.00', '465', '13950.00', '0.00', '', '2026-10-07 18:00:00', '1569','','','0','0','0','0','0',null,'465','13950','0','0','0','0','0','0','0','0','1'); -- id=345
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1569, 0, 0
                    , 465, 30, 0, 0, 1, '2026-10-07 18:00:00')
                ON DUPLICATE KEY UPDATE buyprice = 465,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:00:00' ; -- id=388
UPDATE product SET  productBuyPrice = "465" WHERE productId = 1569 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 345 ;
UPDATE product SET productName = 'فيلو جينز 6155', productDescription = '', productCatId = '31', productBuyPrice = '465.00', productSellAllPrice = '485.00', productSellUnitPrice = '485.00', productSellHalfPrice = '485.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01569',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '465',lastbuyprice_withDiscount = '465',meanbuyprice = '465',meanbuyprice_withDiscount = '465' , productbuypricereal = '465.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.30' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='465',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='465',meanbuyprice_withTax='232.5',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='465',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1569';
UPDATE buybilldetail SET  lastbuyprice = 465 , meanbuyprice = 465, lastbuyprice_withDiscount = 465, meanbuyprice_withDiscount = 465
        , lastbuyprice_withTax = 465, meanbuyprice_withTax = 232.5, lastbuyprice_withDiscountAndTax = 465
                where buybilldetailid = 345;
UPDATE productunit SET proUnitBuyPrice  = 465 * productnumber WHERE productid = 1569;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1594';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1569', '1', '30', '0', '57', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-07 14:20:21','0','0'); -- id=2765
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01570', '57', '31', '1570', '35.00', '430', '15050.00', '0.00', '', '2026-10-07 18:00:00', '1570','','','0','0','0','0','0',null,'430','15050','0','0','0','0','0','0','0','0','1'); -- id=346
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1570, 0, 0
                    , 430, 35, 0, 0, 1, '2026-10-07 18:00:00')
                ON DUPLICATE KEY UPDATE buyprice = 430,
                        buyQuantity =buyQuantity+35, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:00:00' ; -- id=389
UPDATE product SET  productBuyPrice = "430" WHERE productId = 1570 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 346 ;
UPDATE product SET productName = 'فيلو جينز 6167', productDescription = '', productCatId = '31', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01570',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.65' , buyhalf_precentage = '4.65' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='215',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1570';
UPDATE buybilldetail SET  lastbuyprice = 430 , meanbuyprice = 430, lastbuyprice_withDiscount = 430, meanbuyprice_withDiscount = 430
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 215, lastbuyprice_withDiscountAndTax = 430
                where buybilldetailid = 346;
UPDATE productunit SET proUnitBuyPrice  = 430 * productnumber WHERE productid = 1570;
UPDATE storedetail SET  productquantity = '35', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1595';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1570', '1', '35', '0', '57', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '35', '1', '2026-10-07 14:20:21','0','0'); -- id=2766
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01571', '57', '31', '1571', '25.00', '480', '12000.00', '0.00', '', '2026-10-07 18:00:00', '1571','','','0','0','0','0','0',null,'480','12000','0','0','0','0','0','0','0','0','1'); -- id=347
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1571, 0, 0
                    , 480, 25, 0, 0, 1, '2026-10-07 18:00:00')
                ON DUPLICATE KEY UPDATE buyprice = 480,
                        buyQuantity =buyQuantity+25, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:00:00' ; -- id=390
UPDATE product SET  productBuyPrice = "480" WHERE productId = 1571 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 347 ;
UPDATE product SET productName = 'فيلو جينز 6504', productDescription = '', productCatId = '31', productBuyPrice = '480.00', productSellAllPrice = '500.00', productSellUnitPrice = '500.00', productSellHalfPrice = '500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01571',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '480',lastbuyprice_withDiscount = '480',meanbuyprice = '480',meanbuyprice_withDiscount = '480' , productbuypricereal = '480.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.17' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='480',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='480',meanbuyprice_withTax='240',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='480',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1571';
UPDATE buybilldetail SET  lastbuyprice = 480 , meanbuyprice = 480, lastbuyprice_withDiscount = 480, meanbuyprice_withDiscount = 480
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 240, lastbuyprice_withDiscountAndTax = 480
                where buybilldetailid = 347;
UPDATE productunit SET proUnitBuyPrice  = 480 * productnumber WHERE productid = 1571;
UPDATE storedetail SET  productquantity = '25', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1596';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1571', '1', '25', '0', '57', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '25', '1', '2026-10-07 14:20:21','0','0'); -- id=2767
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01572', '57', '31', '1572', '33.00', '490', '16170.00', '0.00', '', '2026-10-07 18:00:00', '1572','','','0','0','0','0','0',null,'490','16170','0','0','0','0','0','0','0','0','1'); -- id=348
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 14:20:21', 1, 1572, 0, 0
                    , 490, 33, 0, 0, 1, '2026-10-07 18:00:00')
                ON DUPLICATE KEY UPDATE buyprice = 490,
                        buyQuantity =buyQuantity+33, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:00:00' ; -- id=391
UPDATE product SET  productBuyPrice = "490" WHERE productId = 1572 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 348 ;
UPDATE product SET productName = 'جاكيت فيلو جينز 6177', productDescription = '', productCatId = '31', productBuyPrice = '490.00', productSellAllPrice = '520.00', productSellUnitPrice = '520.00', productSellHalfPrice = '520.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01572',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '490',lastbuyprice_withDiscount = '490',meanbuyprice = '490',meanbuyprice_withDiscount = '490' , productbuypricereal = '490.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.12' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='490',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='490',meanbuyprice_withTax='245',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='490',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1572';
UPDATE buybilldetail SET  lastbuyprice = 490 , meanbuyprice = 490, lastbuyprice_withDiscount = 490, meanbuyprice_withDiscount = 490
        , lastbuyprice_withTax = 490, meanbuyprice_withTax = 245, lastbuyprice_withDiscountAndTax = 490
                where buybilldetailid = 348;
UPDATE productunit SET proUnitBuyPrice  = 490 * productnumber WHERE productid = 1572;
UPDATE storedetail SET  productquantity = '33', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1597';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1572', '1', '33', '0', '57', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '33', '1', '2026-10-07 14:20:21','0','0'); -- id=2768
DELETE FROM productserial WHERE billid = 52
		and type =0 
		;
UPDATE supplier SET  suppliercurrentDebt = '1096452',suppliercurrentDebtInCurrency= '806945' , userid = '1', supplierdate = '2026-10-07 18:00:00'   WHERE supplierid = '6';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('6', '1021282.00', '75170', '0', 'اضافة فاتورة مشتريات', '57', '1096452', '2026-10-07 18:00:00', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','97370','1','731775','75170','806945','0',''); -- id=206
UPDATE dailyentry SET totalcreditor = '97370.00', totaldebtor = '97370.00', thedate = '2026-10-07', userid = '1', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-07 14:21:33', entryComment = 'اضافة فاتورة مشتريات رقم 52', fromFlag = '1',related='0',isopeningentry='0',operationId='52',operationDetailLink='buyBillController.php?do=details&id=52' WHERE id = '1254';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '97370.00', '97370.00', '2026-10-07', '1', '0', '1254', '2026-10-07 18:00:00','تم عكس القيد رقم 1254 ','1','0','0','0','0',''); -- id=1284
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1284', '382', '97370.00', '','0'); -- id=1284
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17674222.64', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1284', '425', '97370.00', '','0'); -- id=1294
UPDATE accountstree SET name = 'فيلو - مورد', customName = 'فيلو - مورد', customNameEn = 'فيلو - مورد', nameEn = 'فيلو - مورد', parent = '81', accountNature = '1', theValue = '185745', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '425';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '75170', '75170', '2026-10-07', '1', '0', '0', '2026-10-07 18:00:00','اضافة فاتورة مشتريات رقم 57','1','0',null,'0','57','buyBillController.php?do=details&id=57'); -- id=1285
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1285', '382', '75170', '','0'); -- id=1295
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17749392.64', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1285', '425', '75170', '','0'); -- id=1285
UPDATE accountstree SET name = 'فيلو - مورد', customName = 'فيلو - مورد', customNameEn = 'فيلو - مورد', nameEn = 'فيلو - مورد', parent = '81', accountNature = '1', theValue = '260915', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '425';
update buybill set dailyentryid='1285,0' where buybillid=57;
UPDATE product SET overAllAveragePrice = 500 WHERE productId = 1568;UPDATE product SET overAllAveragePrice = 465 WHERE productId = 1569;UPDATE product SET overAllAveragePrice = 430 WHERE productId = 1570;UPDATE product SET overAllAveragePrice = 480 WHERE productId = 1571;UPDATE product SET overAllAveragePrice = 490 WHERE productId = 1572;;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:30:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:00:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:00:00', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=57'); -- id=4011
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:30:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:00:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:00:07', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=57'); -- id=4012
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:33:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:03:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:03:58', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=4013
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:34:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:04:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:04:07', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=4014
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:37:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:07:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 18:07:12', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=4015
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:37:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:07:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 18:07:19', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=4016
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:37:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:07:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:07:51', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=4017
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:40:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:10:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 18:10:20', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4018
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:40:20";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 18:10:20', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4019
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:40:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:10:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 18:10:22', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=4020
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:40:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:10:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 18:10:34', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php?do=show'); -- id=4021
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:40:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:10:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 18:10:37', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4022
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:40:37";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 18:10:37', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4023
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:40:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:10:39", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 18:10:39', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4024
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:40:39";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 18:10:39", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 18:10:39', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4025
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:40:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:10:40", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 18:10:40', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4026
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:41:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:11:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 18:11:01', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/billsettingsController.php?do=show'); -- id=4027
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:41:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:11:18", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 18:11:18', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=4028

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac660f0c165c
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 18:11:18', '06ac660f0c165c', '1', '0.00', '0', '0', '1', '1980.00', '1980', '1980', '0', '1', '2026-10-07 18:11:18', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '6' ,'0','','','','','-1','0','0','0','0','0','1980','0','','0','0','1980','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','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=135
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','اضافة فاتورة مبيعات','135', '0', '2026-10-07 18:11:18', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '1980', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 18:11:18','0','0','',''); -- id=226
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 75;
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 ('300','01383', '135', '94', '1383', '6', '330', '1980', '0', '', '0', '2026-10-07 18:11:18', '1383', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','75-6,','1','1','0','0','330','1980','0','','0','0.00','0','0','0','0'); -- id=532
UPDATE sellbilldetail SET  lastbuyprice = 300.00 , meanbuyprice = 300.00, lastbuyprice_withDiscount = 300.00, meanbuyprice_withDiscount = 300.00
        , lastbuyprice_withTax = 300, meanbuyprice_withTax = 300, lastbuyprice_withDiscountAndTax = 300
                where sellbilldetailid = 532;
 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 (1383, '2026-10-07', 1980, 1800, 1800
                    , 1800, 1800, 1800, 1800
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 1800, 1800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1980, 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+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 1980, 1800, 1800
                    , 1800, 1800, 1800, 1800
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1800, 1800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1980, 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 = '390', userid = '2', storedetaildate = '2026-10-07 18:11:18' WHERE storedetailid = '1383';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1383', '1', '6', '1', '135', 'اضافة فاتورة مبيعات', 'sellbillController.php', '396', '390', '2', '2026-10-07 18:11:18','0','0'); -- id=2769
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '657795',  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 ('655815','1980', '0', '2', 'اضافة فاتورة مبيعات', '135', '657795', '2026-10-07 18:11:18', '2',  'sellbillController.php','1','','0'); -- id=165
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1980', '1980', '2026-10-07', '2', '0', '0', '2026-10-07 18:11:18','اضافة فاتورة مبيعات رقم 135','1','0',null,'0','135','sellbillController.php?do=showDetail&sellbillid=135'); -- id=1286
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1286', '419', '1980', '','0'); -- id=1296
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '657795', 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 ('1286', '143', '1980', '','0'); -- id=1286
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '1358565', 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-10-07', '2', '0', '0', '2026-10-07 18:11:18','اضافة فاتورة مبيعات رقم 135 - صرف البضاعة من المخزن','1','0',null,'0','135','sellbillController.php?do=showDetail&sellbillid=135'); -- id=1287
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1287', '402', '1800', '','0'); -- id=1297
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '1311665.76', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1287', '382', '1800', '','0'); -- id=1287
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17747592.64', 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='1286,0,1287' where sellbillid=135;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 1980, 1800, 1800
                    , 1800, 1800, 1800, 1800
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1800, 1800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1980, 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-10-07', 1980, 1800, 1800
                    , 1800, 1800, 1800, 1800
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1800, 1800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1980, 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, 1980, 1800, 1800
                    , 1800, 1800, 1800, 1800, 1800, 1800)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+1980, 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 06ac660f0c165c and sellbillId = 135 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:41:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:11:18", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 18:11:18', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4029
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:41:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:11:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:11:27', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4030
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:42:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:12:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:12:09', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4031
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:42:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:12:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:12:12', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=4032
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:43:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:13:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:13:04', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=4033
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:43:53";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:43:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:13:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 18:13:56', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4034
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:43:57";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 18:13:57', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4035
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:43:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:13:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:13:58', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=4036
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:46:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:16:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:16:19', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=4037
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:46:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:16:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:16:29', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=4038
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:47:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:17:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:17:03', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4039
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:48:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:18:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:18:19', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=4040
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:48:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:18:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 18:18:30', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=4041
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:48:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:18:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:18:42', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4042
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:48:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:18:45", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 18:18:45', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=4043
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:49:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:19:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 18:19:16', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=4044
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('زد و بروفيت','2026-10-07','','93', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=116
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (116, 1,'2026-10-07 18:19:16',1)
                ON DUPLICATE KEY UPDATE catid = 116, edited = 1, sysdate = '2026-10-07 18:19:16', userid = 1; -- id=118
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '116', '1', '2026-10-07', '1', '0'); -- id=30
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:49:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:19:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 18:19:16', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=4045
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:49:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:19:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 18:19:18', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=4046
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:49:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:19:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:19:20', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4047
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:54:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:24:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:24:36', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4048
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل 505 زد و بروفيت','','116','580','580','580','580','2026-10-07','0','1','0','','0','0','0','0','0','580','580','580','580','580','0','0','0','0','.','0','0','0','580','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','580','580','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','580','0','0','0','0','0','0','','','0','0','0','0'); -- id=1589
UPDATE product SET productName = 'موديل 505 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '580', productSellAllPrice = '580', productSellUnitPrice = '580', productSellHalfPrice = '580', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01589',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1589';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1589', '1.00', '2026-10-07', '1', '0','0158901','580','580','580','580','','0','0','0','0','0','0','0','0','0','0'); -- id=1589
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1589', '1', '0', '1', '2026-10-07'); -- id=1614
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1589', '1', '0', '0', '1589', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2770
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1589, 1,'2026-10-07 18:24:36',1)
                ON DUPLICATE KEY UPDATE productid = 1589, edited = 1, sysdate = '2026-10-07 18:24:36', userid = 1; -- id=2404
UPDATE product SET productName = 'موديل 505 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '580.00', productSellAllPrice = '580.00', productSellUnitPrice = '580.00', productSellHalfPrice = '580.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01589',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1589';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل 504 زد و بروفيت','','116','410','410','410','410','2026-10-07','0','1','0','','0','0','0','0','0','410','410','410','410','410','0','0','0','0','.','0','0','0','410','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','410','410','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','410','0','0','0','0','0','0','','','0','0','0','0'); -- id=1590
UPDATE product SET productName = 'موديل 504 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '410', productSellAllPrice = '410', productSellUnitPrice = '410', productSellHalfPrice = '410', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01590',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410',meanbuyprice_withDiscount = '410' , productbuypricereal = '410' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='410',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1590';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1590', '1.00', '2026-10-07', '1', '0','0159001','410','410','410','410','','0','0','0','0','0','0','0','0','0','0'); -- id=1590
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1590', '1', '0', '1', '2026-10-07'); -- id=1615
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1590', '1', '0', '0', '1590', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2771
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1590, 1,'2026-10-07 18:24:36',1)
                ON DUPLICATE KEY UPDATE productid = 1590, edited = 1, sysdate = '2026-10-07 18:24:36', userid = 1; -- id=2405
UPDATE product SET productName = 'موديل 504 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '410.00', productSellAllPrice = '410.00', productSellUnitPrice = '410.00', productSellHalfPrice = '410.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01590',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410',meanbuyprice_withDiscount = '410' , productbuypricereal = '410' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='410',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1590';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل 503 زد و بروفيت','','116','400','400','400','400','2026-10-07','0','1','0','','0','0','0','0','0','400','400','400','400','400','0','0','0','0','.','0','0','0','400','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','400','400','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','400','0','0','0','0','0','0','','','0','0','0','0'); -- id=1591
UPDATE product SET productName = 'موديل 503 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '400', productSellAllPrice = '400', productSellUnitPrice = '400', productSellHalfPrice = '400', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01591',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '400',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1591';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1591', '1.00', '2026-10-07', '1', '0','0159101','400','400','400','400','','0','0','0','0','0','0','0','0','0','0'); -- id=1591
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1591', '1', '0', '1', '2026-10-07'); -- id=1616
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1591', '1', '0', '0', '1591', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2772
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1591, 1,'2026-10-07 18:24:36',1)
                ON DUPLICATE KEY UPDATE productid = 1591, edited = 1, sysdate = '2026-10-07 18:24:36', userid = 1; -- id=2406
UPDATE product SET productName = 'موديل 503 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01591',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '400',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1591';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل 506 زد و بروفيت','','116','580','580','580','580','2026-10-07','0','1','0','','0','0','0','0','0','580','580','580','580','580','0','0','0','0','.','0','0','0','580','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','580','580','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','580','0','0','0','0','0','0','','','0','0','0','0'); -- id=1592
UPDATE product SET productName = 'موديل 506 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '580', productSellAllPrice = '580', productSellUnitPrice = '580', productSellHalfPrice = '580', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01592',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1592';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1592', '1.00', '2026-10-07', '1', '0','0159201','580','580','580','580','','0','0','0','0','0','0','0','0','0','0'); -- id=1592
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1592', '1', '0', '1', '2026-10-07'); -- id=1617
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1592', '1', '0', '0', '1592', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2773
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1592, 1,'2026-10-07 18:24:36',1)
                ON DUPLICATE KEY UPDATE productid = 1592, edited = 1, sysdate = '2026-10-07 18:24:36', userid = 1; -- id=2407
UPDATE product SET productName = 'موديل 506 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '580.00', productSellAllPrice = '580.00', productSellUnitPrice = '580.00', productSellHalfPrice = '580.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01592',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '580',meanbuyprice = '580',meanbuyprice_withDiscount = '580' , productbuypricereal = '580' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='580',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1592';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل 501 زد و بروفيت','','116','400','400','400','400','2026-10-07','0','1','0','','0','0','0','0','0','400','400','400','400','400','0','0','0','0','.','0','0','0','400','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','400','400','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','400','0','0','0','0','0','0','','','0','0','0','0'); -- id=1593
UPDATE product SET productName = 'موديل 501 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '400', productSellAllPrice = '400', productSellUnitPrice = '400', productSellHalfPrice = '400', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01593',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '400',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1593';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1593', '1.00', '2026-10-07', '1', '0','0159301','400','400','400','400','','0','0','0','0','0','0','0','0','0','0'); -- id=1593
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1593', '1', '0', '1', '2026-10-07'); -- id=1618
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1593', '1', '0', '0', '1593', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2774
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1593, 1,'2026-10-07 18:24:36',1)
                ON DUPLICATE KEY UPDATE productid = 1593, edited = 1, sysdate = '2026-10-07 18:24:36', userid = 1; -- id=2408
UPDATE product SET productName = 'موديل 501 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01593',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '400',meanbuyprice = '400',meanbuyprice_withDiscount = '400' , productbuypricereal = '400' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1593';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل 502 زد و بروفيت','','116','395','395','395','395','2026-10-07','0','1','0','','0','0','0','0','0','395','395','395','395','395','0','0','0','0','.','0','0','0','395','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','395','395','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','395','0','0','0','0','0','0','','','0','0','0','0'); -- id=1594
UPDATE product SET productName = 'موديل 502 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '395', productSellAllPrice = '395', productSellUnitPrice = '395', productSellHalfPrice = '395', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01594',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '395',lastbuyprice_withDiscount = '395',meanbuyprice = '395',meanbuyprice_withDiscount = '395' , productbuypricereal = '395' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='395',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='395',meanbuyprice_withTax='395',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='395',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1594';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1594', '1.00', '2026-10-07', '1', '0','0159401','395','395','395','395','','0','0','0','0','0','0','0','0','0','0'); -- id=1594
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1594', '1', '0', '1', '2026-10-07'); -- id=1619
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1594', '1', '0', '0', '1594', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2775
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1594, 1,'2026-10-07 18:24:36',1)
                ON DUPLICATE KEY UPDATE productid = 1594, edited = 1, sysdate = '2026-10-07 18:24:36', userid = 1; -- id=2409
UPDATE product SET productName = 'موديل 502 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '395.00', productSellAllPrice = '395.00', productSellUnitPrice = '395.00', productSellHalfPrice = '395.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01594',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '395',lastbuyprice_withDiscount = '395',meanbuyprice = '395',meanbuyprice_withDiscount = '395' , productbuypricereal = '395' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='395',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='395',meanbuyprice_withTax='395',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='395',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1594';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل 507 زد و بروفيت','','116','540','540','540','540','2026-10-07','0','1','0','','0','0','0','0','0','540','540','540','540','540','0','0','0','0','.','0','0','0','540','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','540','540','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','540','0','0','0','0','0','0','','','0','0','0','0'); -- id=1595
UPDATE product SET productName = 'موديل 507 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '540', productSellAllPrice = '540', productSellUnitPrice = '540', productSellHalfPrice = '540', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01595',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '540',lastbuyprice_withDiscount = '540',meanbuyprice = '540',meanbuyprice_withDiscount = '540' , productbuypricereal = '540' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='540',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='540',meanbuyprice_withTax='540',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='540',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1595';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1595', '1.00', '2026-10-07', '1', '0','0159501','540','540','540','540','','0','0','0','0','0','0','0','0','0','0'); -- id=1595
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1595', '1', '0', '1', '2026-10-07'); -- id=1620
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1595', '1', '0', '0', '1595', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2776
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1595, 1,'2026-10-07 18:24:36',1)
                ON DUPLICATE KEY UPDATE productid = 1595, edited = 1, sysdate = '2026-10-07 18:24:36', userid = 1; -- id=2410
UPDATE product SET productName = 'موديل 507 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '540.00', productSellAllPrice = '540.00', productSellUnitPrice = '540.00', productSellHalfPrice = '540.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01595',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '540',lastbuyprice_withDiscount = '540',meanbuyprice = '540',meanbuyprice_withDiscount = '540' , productbuypricereal = '540' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='540',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='540',meanbuyprice_withTax='540',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='540',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1595';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('موديل 1003 زد و بروفيت','','116','640','640','640','640','2026-10-07','0','1','0','','0','0','0','0','0','640','640','640','640','640','0','0','0','0','.','0','0','0','640','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','640','640','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','640','0','0','0','0','0','0','','','0','0','0','0'); -- id=1596
UPDATE product SET productName = 'موديل 1003 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '640', productSellAllPrice = '640', productSellUnitPrice = '640', productSellHalfPrice = '640', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01596',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '640',lastbuyprice_withDiscount = '640',meanbuyprice = '640',meanbuyprice_withDiscount = '640' , productbuypricereal = '640' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='640',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='640',meanbuyprice_withTax='640',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='640',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1596';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1596', '1.00', '2026-10-07', '1', '0','0159601','640','640','640','640','','0','0','0','0','0','0','0','0','0','0'); -- id=1596
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1596', '1', '0', '1', '2026-10-07'); -- id=1621
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1596', '1', '0', '0', '1596', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2777
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1596, 1,'2026-10-07 18:24:36',1)
                ON DUPLICATE KEY UPDATE productid = 1596, edited = 1, sysdate = '2026-10-07 18:24:36', userid = 1; -- id=2411
UPDATE product SET productName = 'موديل 1003 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '640.00', productSellAllPrice = '640.00', productSellUnitPrice = '640.00', productSellHalfPrice = '640.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01596',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '640',lastbuyprice_withDiscount = '640',meanbuyprice = '640',meanbuyprice_withDiscount = '640' , productbuypricereal = '640' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='640',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='640',meanbuyprice_withTax='640',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='640',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1596';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:54:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:24:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:24:38', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4049
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:54:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:24:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:24:43', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php'); -- id=4050
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:54:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:24:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:24:45', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=4051
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:55:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:25:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:25:54', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=4052
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('زد و بروفت', '', '', '', '', '0', '1', '2026-10-07 18:26:15', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=112
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('112', '0', '', '0', 'إضافة مورد جديد', '112', '', '2026-10-07 18:26:15', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=207
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('زد و بروفت', 'زد و بروفت', 'زد و بروفت', 'زد و بروفت', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-07 18:26:15'); -- id=595
UPDATE supplier SET suppliername = 'زد و بروفت', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-07', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='595',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '112';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:56:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:26:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:26:20', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=4053
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac6643da28d5', '2026-10-07 18:24:45', '112', '0.00', '130290.4', '8', '1', '141620.00',  '130290.40', '', '130290.4', '1', '2026-10-07 18:26:20', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=58
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01589', '58', '116', '1589', '36', '580', '20880.00', '0', '', '2026-10-07 18:26:20', '1589','','','0','0','0','0','0',null,'580','20880','0','0','0','0','0','0','0','0','1'); -- id=349
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:24:45', 1, 1589, 0, 0
                    , 533.6, 36, 0, 0, 1, '2026-10-07 18:26:20')
                ON DUPLICATE KEY UPDATE buyprice = 533.6,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:26:20' ; -- id=441
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1589', '580', '36', '0', 'buyBillController.php', '349', '', '0', '0'); -- id=292
UPDATE product SET  productBuyPrice = "580" WHERE productId = 1589 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 349 ;
UPDATE product SET productName = 'موديل 505 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '580.00', productSellAllPrice = '580.00', productSellUnitPrice = '580.00', productSellHalfPrice = '580.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01589',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '533.6',meanbuyprice = '580',meanbuyprice_withDiscount = '533.6' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='533.6',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1589';
UPDATE buybilldetail SET  lastbuyprice = 580 , meanbuyprice = 580, lastbuyprice_withDiscount = 533.6, meanbuyprice_withDiscount = 533.6
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 533.6
                where buybilldetailid = 349;
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1589;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1614';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1589', '1', '36', '0', '58', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 18:24:45','0','0'); -- id=2778
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01590', '58', '116', '1590', '36', '410', '14760.00', '0', '', '2026-10-07 18:26:20', '1590','','','0','0','0','0','0',null,'410','14760','0','0','0','0','0','0','0','0','1'); -- id=350
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:24:45', 1, 1590, 0, 0
                    , 377.2, 36, 0, 0, 1, '2026-10-07 18:26:20')
                ON DUPLICATE KEY UPDATE buyprice = 377.2,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:26:20' ; -- id=442
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1590', '410', '36', '0', 'buyBillController.php', '350', '', '0', '0'); -- id=293
UPDATE product SET  productBuyPrice = "410" WHERE productId = 1590 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 350 ;
UPDATE product SET productName = 'موديل 504 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '410.00', productSellAllPrice = '410.00', productSellUnitPrice = '410.00', productSellHalfPrice = '410.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01590',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '377.2',meanbuyprice = '410',meanbuyprice_withDiscount = '377.2' , productbuypricereal = '410.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='410',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='377.2',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1590';
UPDATE buybilldetail SET  lastbuyprice = 410 , meanbuyprice = 410, lastbuyprice_withDiscount = 377.2, meanbuyprice_withDiscount = 377.2
        , lastbuyprice_withTax = 410, meanbuyprice_withTax = 410, lastbuyprice_withDiscountAndTax = 377.2
                where buybilldetailid = 350;
UPDATE productunit SET proUnitBuyPrice  = 410 * productnumber WHERE productid = 1590;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1615';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1590', '1', '36', '0', '58', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 18:24:45','0','0'); -- id=2779
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01591', '58', '116', '1591', '36', '400', '14400.00', '0', '', '2026-10-07 18:26:20', '1591','','','0','0','0','0','0',null,'400','14400','0','0','0','0','0','0','0','0','1'); -- id=351
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:24:45', 1, 1591, 0, 0
                    , 368, 36, 0, 0, 1, '2026-10-07 18:26:20')
                ON DUPLICATE KEY UPDATE buyprice = 368,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:26:20' ; -- id=443
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1591', '400', '36', '0', 'buyBillController.php', '351', '', '0', '0'); -- id=294
UPDATE product SET  productBuyPrice = "400" WHERE productId = 1591 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 351 ;
UPDATE product SET productName = 'موديل 503 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01591',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '368',meanbuyprice = '400',meanbuyprice_withDiscount = '368' , productbuypricereal = '400.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='368',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1591';
UPDATE buybilldetail SET  lastbuyprice = 400 , meanbuyprice = 400, lastbuyprice_withDiscount = 368, meanbuyprice_withDiscount = 368
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 368
                where buybilldetailid = 351;
UPDATE productunit SET proUnitBuyPrice  = 400 * productnumber WHERE productid = 1591;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1616';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1591', '1', '36', '0', '58', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 18:24:45','0','0'); -- id=2780
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01592', '58', '116', '1592', '36', '580', '20880.00', '0', '', '2026-10-07 18:26:20', '1592','','','0','0','0','0','0',null,'580','20880','0','0','0','0','0','0','0','0','1'); -- id=352
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:24:45', 1, 1592, 0, 0
                    , 533.6, 36, 0, 0, 1, '2026-10-07 18:26:20')
                ON DUPLICATE KEY UPDATE buyprice = 533.6,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:26:20' ; -- id=444
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1592', '580', '36', '0', 'buyBillController.php', '352', '', '0', '0'); -- id=295
UPDATE product SET  productBuyPrice = "580" WHERE productId = 1592 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 352 ;
UPDATE product SET productName = 'موديل 506 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '580.00', productSellAllPrice = '580.00', productSellUnitPrice = '580.00', productSellHalfPrice = '580.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01592',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '580',lastbuyprice_withDiscount = '533.6',meanbuyprice = '580',meanbuyprice_withDiscount = '533.6' , productbuypricereal = '580.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='580',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='580',meanbuyprice_withTax='580',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='533.6',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1592';
UPDATE buybilldetail SET  lastbuyprice = 580 , meanbuyprice = 580, lastbuyprice_withDiscount = 533.6, meanbuyprice_withDiscount = 533.6
        , lastbuyprice_withTax = 580, meanbuyprice_withTax = 580, lastbuyprice_withDiscountAndTax = 533.6
                where buybilldetailid = 352;
UPDATE productunit SET proUnitBuyPrice  = 580 * productnumber WHERE productid = 1592;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1617';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1592', '1', '36', '0', '58', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 18:24:45','0','0'); -- id=2781
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01593', '58', '116', '1593', '36', '400', '14400.00', '0', '', '2026-10-07 18:26:20', '1593','','','0','0','0','0','0',null,'400','14400','0','0','0','0','0','0','0','0','1'); -- id=353
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:24:45', 1, 1593, 0, 0
                    , 368, 36, 0, 0, 1, '2026-10-07 18:26:20')
                ON DUPLICATE KEY UPDATE buyprice = 368,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:26:20' ; -- id=445
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1593', '400', '36', '0', 'buyBillController.php', '353', '', '0', '0'); -- id=296
UPDATE product SET  productBuyPrice = "400" WHERE productId = 1593 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 353 ;
UPDATE product SET productName = 'موديل 501 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '400.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01593',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '400',lastbuyprice_withDiscount = '368',meanbuyprice = '400',meanbuyprice_withDiscount = '368' , productbuypricereal = '400.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='368',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1593';
UPDATE buybilldetail SET  lastbuyprice = 400 , meanbuyprice = 400, lastbuyprice_withDiscount = 368, meanbuyprice_withDiscount = 368
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 368
                where buybilldetailid = 353;
UPDATE productunit SET proUnitBuyPrice  = 400 * productnumber WHERE productid = 1593;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1618';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1593', '1', '36', '0', '58', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 18:24:45','0','0'); -- id=2782
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01594', '58', '116', '1594', '36', '395', '14220.00', '0', '', '2026-10-07 18:26:20', '1594','','','0','0','0','0','0',null,'395','14220','0','0','0','0','0','0','0','0','1'); -- id=354
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:24:45', 1, 1594, 0, 0
                    , 363.4, 36, 0, 0, 1, '2026-10-07 18:26:20')
                ON DUPLICATE KEY UPDATE buyprice = 363.4,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:26:20' ; -- id=446
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1594', '395', '36', '0', 'buyBillController.php', '354', '', '0', '0'); -- id=297
UPDATE product SET  productBuyPrice = "395" WHERE productId = 1594 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 354 ;
UPDATE product SET productName = 'موديل 502 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '395.00', productSellAllPrice = '395.00', productSellUnitPrice = '395.00', productSellHalfPrice = '395.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01594',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '395',lastbuyprice_withDiscount = '363.4',meanbuyprice = '395',meanbuyprice_withDiscount = '363.4' , productbuypricereal = '395.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='395',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='395',meanbuyprice_withTax='395',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='363.4',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1594';
UPDATE buybilldetail SET  lastbuyprice = 395 , meanbuyprice = 395, lastbuyprice_withDiscount = 363.4, meanbuyprice_withDiscount = 363.4
        , lastbuyprice_withTax = 395, meanbuyprice_withTax = 395, lastbuyprice_withDiscountAndTax = 363.4
                where buybilldetailid = 354;
UPDATE productunit SET proUnitBuyPrice  = 395 * productnumber WHERE productid = 1594;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1619';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1594', '1', '36', '0', '58', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 18:24:45','0','0'); -- id=2783
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01595', '58', '116', '1595', '40', '540', '21600.00', '0', '', '2026-10-07 18:26:20', '1595','','','0','0','0','0','0',null,'540','21600','0','0','0','0','0','0','0','0','1'); -- id=355
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:24:45', 1, 1595, 0, 0
                    , 496.8, 40, 0, 0, 1, '2026-10-07 18:26:20')
                ON DUPLICATE KEY UPDATE buyprice = 496.8,
                        buyQuantity =buyQuantity+40, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:26:20' ; -- id=447
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1595', '540', '40', '0', 'buyBillController.php', '355', '', '0', '0'); -- id=298
UPDATE product SET  productBuyPrice = "540" WHERE productId = 1595 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 355 ;
UPDATE product SET productName = 'موديل 507 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '540.00', productSellAllPrice = '540.00', productSellUnitPrice = '540.00', productSellHalfPrice = '540.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01595',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '540',lastbuyprice_withDiscount = '496.8',meanbuyprice = '540',meanbuyprice_withDiscount = '496.8' , productbuypricereal = '540.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='540',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='540',meanbuyprice_withTax='540',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='496.8',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1595';
UPDATE buybilldetail SET  lastbuyprice = 540 , meanbuyprice = 540, lastbuyprice_withDiscount = 496.8, meanbuyprice_withDiscount = 496.8
        , lastbuyprice_withTax = 540, meanbuyprice_withTax = 540, lastbuyprice_withDiscountAndTax = 496.8
                where buybilldetailid = 355;
UPDATE productunit SET proUnitBuyPrice  = 540 * productnumber WHERE productid = 1595;
UPDATE storedetail SET  productquantity = '40', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1620';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1595', '1', '40', '0', '58', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '40', '1', '2026-10-07 18:24:45','0','0'); -- id=2784
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01596', '58', '116', '1596', '32', '640', '20480.00', '0', '', '2026-10-07 18:26:20', '1596','','','0','0','0','0','0',null,'640','20480','0','0','0','0','0','0','0','0','1'); -- id=356
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:24:45', 1, 1596, 0, 0
                    , 588.8, 32, 0, 0, 1, '2026-10-07 18:26:20')
                ON DUPLICATE KEY UPDATE buyprice = 588.8,
                        buyQuantity =buyQuantity+32, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:26:20' ; -- id=448
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1596', '640', '32', '0', 'buyBillController.php', '356', '', '0', '0'); -- id=299
UPDATE product SET  productBuyPrice = "640" WHERE productId = 1596 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 356 ;
UPDATE product SET productName = 'موديل 1003 زد و بروفيت', productDescription = '', productCatId = '116', productBuyPrice = '640.00', productSellAllPrice = '640.00', productSellUnitPrice = '640.00', productSellHalfPrice = '640.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01596',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '640',lastbuyprice_withDiscount = '588.8',meanbuyprice = '640',meanbuyprice_withDiscount = '588.8' , productbuypricereal = '640.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='640',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='640',meanbuyprice_withTax='640',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='588.8',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1596';
UPDATE buybilldetail SET  lastbuyprice = 640 , meanbuyprice = 640, lastbuyprice_withDiscount = 588.8, meanbuyprice_withDiscount = 588.8
        , lastbuyprice_withTax = 640, meanbuyprice_withTax = 640, lastbuyprice_withDiscountAndTax = 588.8
                where buybilldetailid = 356;
UPDATE productunit SET proUnitBuyPrice  = 640 * productnumber WHERE productid = 1596;
UPDATE storedetail SET  productquantity = '32', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1621';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1596', '1', '32', '0', '58', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '32', '1', '2026-10-07 18:24:45','0','0'); -- id=2785
UPDATE supplier SET  suppliercurrentDebt = '130290.4',suppliercurrentDebtInCurrency= '130290.4' , userid = '1', supplierdate = '2026-10-07 18:26:20'   WHERE supplierid = '112';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('112', '0.00', '130290.4', '0', 'اضافة فاتورة مشتريات', '58', '130290.4', '2026-10-07 18:24:45', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','130290.4','1','0','130290.4','130290.4','0',''); -- id=208
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '130290.4', '130290.4', '2026-10-07', '1', '0', '0', '2026-10-07 18:26:20','اضافة فاتورة مشتريات رقم 58','1','0',null,'0','58','buyBillController.php?do=details&id=58'); -- id=1288
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1288', '382', '130290.4', '','0'); -- id=1298
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17877883.04', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1288', '595', '130290.4', '','0'); -- id=1288
UPDATE accountstree SET name = 'زد و بروفت', customName = 'زد و بروفت', customNameEn = 'زد و بروفت', nameEn = 'زد و بروفت', parent = '81', accountNature = '1', theValue = '130290.4', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 18:26:15' WHERE id = '595';
update buybill set dailyentryid='1288,0' where buybillid=58;
COMMIT;
UPDATE product SET overAllAveragePrice = 533.6 WHERE productId = 1589;UPDATE product SET overAllAveragePrice = 377.2 WHERE productId = 1590;UPDATE product SET overAllAveragePrice = 368 WHERE productId = 1591;UPDATE product SET overAllAveragePrice = 533.6 WHERE productId = 1592;UPDATE product SET overAllAveragePrice = 368 WHERE productId = 1593;UPDATE product SET overAllAveragePrice = 363.4 WHERE productId = 1594;UPDATE product SET overAllAveragePrice = 496.8 WHERE productId = 1595;UPDATE product SET overAllAveragePrice = 588.8 WHERE productId = 1596;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:56:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:26:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:26:20', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=58'); -- id=4054
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:56:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:26:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 18:26:23', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/billsettingsController.php?do=show'); -- id=4055
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:56:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:26:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:26:26', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=58&type=2'); -- id=4056
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:56:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:26:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:26:30', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4057
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:57:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:27:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:27:29', '1', 'delete', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=delete'); -- id=4058
BEGIN;
UPDATE product SET overAllAveragePrice = 342 WHERE productId = 1573;UPDATE product SET overAllAveragePrice = 297 WHERE productId = 1574;UPDATE product SET overAllAveragePrice = 472.5 WHERE productId = 1575;UPDATE product SET overAllAveragePrice = 450 WHERE productId = 1576;UPDATE product SET overAllAveragePrice = 468 WHERE productId = 1577;UPDATE product SET overAllAveragePrice = 360 WHERE productId = 1578;UPDATE product SET overAllAveragePrice = 423 WHERE productId = 1579;UPDATE product SET overAllAveragePrice = 477 WHERE productId = 1580;;
UPDATE product SET overAllAveragePrice = 555 WHERE productId = 1350;UPDATE product SET overAllAveragePrice = 500 WHERE productId = 1568;UPDATE product SET overAllAveragePrice = 465 WHERE productId = 1569;UPDATE product SET overAllAveragePrice = 430 WHERE productId = 1570;UPDATE product SET overAllAveragePrice = 480 WHERE productId = 1571;UPDATE product SET overAllAveragePrice = 490 WHERE productId = 1572;;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:57:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:27:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:27:29', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=sucess'); -- id=4059
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:57:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:27:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:27:31', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4060
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:57:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:27:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:27:49', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=58&type=2'); -- id=4061
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 14:59:59";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:00:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:30:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 18:30:19', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=4062
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:00:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:30:31", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 18:30:31', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4063
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:00:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:30:34", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 18:30:34', '2', 'edit', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=edit&userid=2'); -- id=4064
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:00:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:30:49", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 18:30:49', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4065
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:00:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:30:51", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 18:30:51', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4066
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:00:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:30:53", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 18:30:53', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4067
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:00:53";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 18:30:53", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 18:30:53', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4068
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:00:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:30:55", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 18:30:55', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4069
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:00:55";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 18:30:55", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 18:30:55', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4070
update user set blockedByLimits = 0;
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:01:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:31:00", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 18:31:00', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4071
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:01:00";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 18:31:00", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 18:31:00', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4072
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:01:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:31:02", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 18:31:02', '2', 'edit', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=edit&userid=2'); -- id=4073
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:01:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:31:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 18:31:17', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=4074
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('هوك محمد الجمل','2026-10-07','','90', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=117
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (117, 1,'2026-10-07 18:31:17',1)
                ON DUPLICATE KEY UPDATE catid = 117, edited = 1, sysdate = '2026-10-07 18:31:17', userid = 1; -- id=119
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '117', '1', '2026-10-07', '1', '0'); -- id=31
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:01:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:31:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 18:31:18', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=4075
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:01:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:31:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 18:31:20', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=4076
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:01:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:31:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 18:31:23', '1', 'edit', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=edit&id=117&parentid=90'); -- id=4077
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:01:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:31:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 18:31:32', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=update'); -- id=4078
UPDATE productcat SET productCatName = 'هوك عبد الرحمن الجمل', productCatDate = '2026-10-07', productCatDescription = '', productCatParent = '90', userId = '1', conditions = '0', selldiscount = '0', buydiscount = '0', discounttype = '-1',isOptic = '0' , buytotal = '0' , buyhalf = '0' , buypart = '0' , buypricereal = '0', opticServices = '',logo = '.',inMenu='0',stopNegativeSale='0',price4='0',price5='0',price6='0',price7='0',price8='0',price9='0',price10='0',price11='0',price12='0',price13='0' WHERE productCatId = '117';
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (117, 1,'2026-10-07 18:31:32',1)
                ON DUPLICATE KEY UPDATE catid = 117, edited = 1, sysdate = '2026-10-07 18:31:32', userid = 1; -- id=119
DELETE FROM productcatunit WHERE productcatid = '117';
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '117', '1.00', '2026-10-07', '1', '0'); -- id=32
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:01:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:31:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 18:31:32', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=4079
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:01:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:31:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:31:33', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=58&type=2'); -- id=4080
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:01:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:31:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 18:31:34', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=4081
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:01:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:31:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:31:59', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4082
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:02:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:32:38", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 18:32:38', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4083
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:04:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:34:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:34:35', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4084
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكيت وتربروف هوك','','117','420','495','495','495','2026-10-07','0','1','0','','0','0','0','0','0','420','420','420','420','420','0','17.86','0','0','.','0','0','0','420','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','420','420','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','420','0','0','0','0','0','0','','','0','0','0','0'); -- id=1597
UPDATE product SET productName = 'جاكيت وتربروف هوك', productDescription = '', productCatId = '117', productBuyPrice = '420', productSellAllPrice = '495', productSellUnitPrice = '495', productSellHalfPrice = '495', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01597',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420' , buypricereal_precentage = '0' , buytotal_precentage = '17.86' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1597';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1597', '1.00', '2026-10-07', '1', '0','0159701','495','495','495','420','','0','0','0','0','0','0','0','0','0','0'); -- id=1597
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1597', '1', '0', '1', '2026-10-07'); -- id=1622
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1597', '1', '0', '0', '1597', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2786
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1597, 1,'2026-10-07 18:34:35',1)
                ON DUPLICATE KEY UPDATE productid = 1597, edited = 1, sysdate = '2026-10-07 18:34:35', userid = 1; -- id=2412
UPDATE product SET productName = 'جاكيت وتربروف هوك', productDescription = '', productCatId = '117', productBuyPrice = '420.00', productSellAllPrice = '495.00', productSellUnitPrice = '495.00', productSellHalfPrice = '495.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01597',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420' , buypricereal_precentage = '0' , buytotal_precentage = '17.86' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1597';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:04:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:34:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:34:36', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4085
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:05:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:35:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:35:06', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=4086
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('هوك عبدالرحمن الجمل', '', '', '', '', '0', '1', '2026-10-07 18:36:54', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=113
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('113', '0', '', '0', 'إضافة مورد جديد', '113', '', '2026-10-07 18:36:54', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=209
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('هوك عبدالرحمن الجمل', 'هوك عبدالرحمن الجمل', 'هوك عبدالرحمن الجمل', 'هوك عبدالرحمن الجمل', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-07 18:36:54'); -- id=596
UPDATE supplier SET suppliername = 'هوك عبدالرحمن الجمل', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-07', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='596',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '113';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:09:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:39:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 18:39:50', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=4087
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:10:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:40:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:40:10', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=4088
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac666aa8892f', '2026-10-07 18:35:06', '113', '0.00', '82320', '0', '0', '82320.00',  '82320.00', '0', '82320', '1', '2026-10-07 18:40:10', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=59
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01597', '59', '117', '1597', '32', '420', '13440.00', '0', '', '2026-10-07 18:40:10', '1597','','','0','0','0','0','0',null,'420','13440','0','0','0','0','0','0','0','0','1'); -- id=357
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:35:06', 1, 1597, 0, 0
                    , 420, 32, 0, 0, 1, '2026-10-07 18:40:10')
                ON DUPLICATE KEY UPDATE buyprice = 420,
                        buyQuantity =buyQuantity+32, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:40:10' ; -- id=449
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1597', '420', '32', '0', 'buyBillController.php', '357', '', '0', '0'); -- id=300
UPDATE product SET  productBuyPrice = "420" WHERE productId = 1597 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 357 ;
UPDATE product SET productName = 'جاكيت وتربروف هوك', productDescription = '', productCatId = '117', productBuyPrice = '420.00', productSellAllPrice = '495.00', productSellUnitPrice = '495.00', productSellHalfPrice = '495.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01597',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '17.86' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1597';
UPDATE buybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 420, meanbuyprice_withDiscount = 420
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 420
                where buybilldetailid = 357;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1597;
UPDATE storedetail SET  productquantity = '32', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1622';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1597', '1', '32', '0', '59', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '32', '1', '2026-10-07 18:35:06','0','0'); -- id=2787
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01597', '59', '117', '1597', '32', '420', '13440.00', '0', '', '2026-10-07 18:40:10', '1597','','','0','0','0','0','0',null,'420','13440','0','0','0','0','0','0','0','0','1'); -- id=358
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:35:06', 1, 1597, 0, 0
                    , 420, 32, 0, 0, 1, '2026-10-07 18:40:10')
                ON DUPLICATE KEY UPDATE buyprice = 420,
                        buyQuantity =buyQuantity+32, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:40:10' ; -- id=449
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1597', '420', '32', '0', 'buyBillController.php', '358', '', '0', '0'); -- id=301
UPDATE product SET  productBuyPrice = "420" WHERE productId = 1597 ;
UPDATE buybilldetail SET  quantitybefore = 32 WHERE buybilldetailid = 358 ;
UPDATE product SET productName = 'جاكيت وتربروف هوك', productDescription = '', productCatId = '117', productBuyPrice = '420.00', productSellAllPrice = '495.00', productSellUnitPrice = '495.00', productSellHalfPrice = '495.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01597',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '17.86' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1597';
UPDATE buybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 420, meanbuyprice_withDiscount = 420
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 420
                where buybilldetailid = 358;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1597;
UPDATE storedetail SET  productquantity = '64', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1622';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1597', '1', '32', '0', '59', 'اضافة فاتورة مشتريات', 'buyBillController.php', '32', '64', '1', '2026-10-07 18:35:06','0','0'); -- id=2788
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01597', '59', '117', '1597', '48', '420', '20160.00', '0', '', '2026-10-07 18:40:10', '1597','','','0','0','0','0','0',null,'420','20160','0','0','0','0','0','0','0','0','1'); -- id=359
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:35:06', 1, 1597, 0, 0
                    , 420, 48, 0, 0, 1, '2026-10-07 18:40:10')
                ON DUPLICATE KEY UPDATE buyprice = 420,
                        buyQuantity =buyQuantity+48, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:40:10' ; -- id=449
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1597', '420', '48', '0', 'buyBillController.php', '359', '', '0', '0'); -- id=302
UPDATE product SET  productBuyPrice = "420" WHERE productId = 1597 ;
UPDATE buybilldetail SET  quantitybefore = 64 WHERE buybilldetailid = 359 ;
UPDATE product SET productName = 'جاكيت وتربروف هوك', productDescription = '', productCatId = '117', productBuyPrice = '420.00', productSellAllPrice = '495.00', productSellUnitPrice = '495.00', productSellHalfPrice = '495.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01597',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '17.86' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1597';
UPDATE buybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 420, meanbuyprice_withDiscount = 420
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 420
                where buybilldetailid = 359;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1597;
UPDATE storedetail SET  productquantity = '112', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1622';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1597', '1', '48', '0', '59', 'اضافة فاتورة مشتريات', 'buyBillController.php', '64', '112', '1', '2026-10-07 18:35:06','0','0'); -- id=2789
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01597', '59', '117', '1597', '36', '420', '15120.00', '0', '', '2026-10-07 18:40:10', '1597','','','0','0','0','0','0',null,'420','15120','0','0','0','0','0','0','0','0','1'); -- id=360
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:35:06', 1, 1597, 0, 0
                    , 420, 36, 0, 0, 1, '2026-10-07 18:40:10')
                ON DUPLICATE KEY UPDATE buyprice = 420,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:40:10' ; -- id=449
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1597', '420', '36', '0', 'buyBillController.php', '360', '', '0', '0'); -- id=303
UPDATE product SET  productBuyPrice = "420" WHERE productId = 1597 ;
UPDATE buybilldetail SET  quantitybefore = 112 WHERE buybilldetailid = 360 ;
UPDATE product SET productName = 'جاكيت وتربروف هوك', productDescription = '', productCatId = '117', productBuyPrice = '420.00', productSellAllPrice = '495.00', productSellUnitPrice = '495.00', productSellHalfPrice = '495.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01597',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '17.86' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1597';
UPDATE buybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 420, meanbuyprice_withDiscount = 420
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 420
                where buybilldetailid = 360;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1597;
UPDATE storedetail SET  productquantity = '148', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1622';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1597', '1', '36', '0', '59', 'اضافة فاتورة مشتريات', 'buyBillController.php', '112', '148', '1', '2026-10-07 18:35:06','0','0'); -- id=2790
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01597', '59', '117', '1597', '48', '420', '20160.00', '0', '', '2026-10-07 18:40:10', '1597','','','0','0','0','0','0',null,'420','20160','0','0','0','0','0','0','0','0','1'); -- id=361
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 18:35:06', 1, 1597, 0, 0
                    , 420, 48, 0, 0, 1, '2026-10-07 18:40:10')
                ON DUPLICATE KEY UPDATE buyprice = 420,
                        buyQuantity =buyQuantity+48, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 18:40:10' ; -- id=449
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1597', '420', '48', '0', 'buyBillController.php', '361', '', '0', '0'); -- id=304
UPDATE product SET  productBuyPrice = "420" WHERE productId = 1597 ;
UPDATE buybilldetail SET  quantitybefore = 148 WHERE buybilldetailid = 361 ;
UPDATE product SET productName = 'جاكيت وتربروف هوك', productDescription = '', productCatId = '117', productBuyPrice = '420.00', productSellAllPrice = '495.00', productSellUnitPrice = '495.00', productSellHalfPrice = '495.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01597',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '17.86' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1597';
UPDATE buybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 420, meanbuyprice_withDiscount = 420
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 420
                where buybilldetailid = 361;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1597;
UPDATE storedetail SET  productquantity = '196', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1622';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1597', '1', '48', '0', '59', 'اضافة فاتورة مشتريات', 'buyBillController.php', '148', '196', '1', '2026-10-07 18:35:06','0','0'); -- id=2791
UPDATE supplier SET  suppliercurrentDebt = '82320',suppliercurrentDebtInCurrency= '82320' , userid = '1', supplierdate = '2026-10-07 18:40:10'   WHERE supplierid = '113';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('113', '0.00', '82320', '0', 'اضافة فاتورة مشتريات', '59', '82320', '2026-10-07 18:35:06', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','82320','1','0','82320','82320','0',''); -- id=210
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '82320', '82320', '2026-10-07', '1', '0', '0', '2026-10-07 18:40:10','اضافة فاتورة مشتريات رقم 59','1','0',null,'0','59','buyBillController.php?do=details&id=59'); -- id=1289
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1289', '382', '82320', '','0'); -- id=1299
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17960203.04', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1289', '596', '82320', '','0'); -- id=1289
UPDATE accountstree SET name = 'هوك عبدالرحمن الجمل', customName = 'هوك عبدالرحمن الجمل', customNameEn = 'هوك عبدالرحمن الجمل', nameEn = 'هوك عبدالرحمن الجمل', parent = '81', accountNature = '1', theValue = '82320', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 18:36:54' WHERE id = '596';
update buybill set dailyentryid='1289,0' where buybillid=59;
COMMIT;
UPDATE product SET overAllAveragePrice = 420 WHERE productId = 1597;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:10:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:40:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:40:10', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=59'); -- id=4089
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:10:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:40:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:40:13', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=59&type=2'); -- id=4090
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:10:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:40:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 18:40:25', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php?do=show'); -- id=4091
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:10:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:40:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 18:40:42', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php?do=show'); -- id=4092
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:23:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:53:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 18:53:19', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=4093
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:23:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:53:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 18:53:27', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=4094
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:23:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:53:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 18:53:33', '1', 'details', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=details&id=58'); -- id=4095
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:23:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:53:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 18:53:38', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=58&type=2'); -- id=4096
UPDATE user SET loginip = "" WHERE userid = 4;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:29:32";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:29:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:59:36", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 18:59:36', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4097
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:29:36";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 18:59:36", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 18:59:36', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4098
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:29:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 18:59:50", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 18:59:50', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4099
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:52:21";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:52:22";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:52:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 19:22:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 19:22:24', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4100
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:52:24";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 19:22:24', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4101
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 15:52:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 19:22:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-07 19:22:31', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=show'); -- id=4102
UPDATE user SET loginip = "" WHERE userid = 2;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:04:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 19:34:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-07 19:34:56', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php'); -- id=4103
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:05:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 19:35:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-07 19:35:02', '1', 'supplierShow2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php?do=supplierShow2'); -- id=4104
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:05:37";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:05:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 19:35:47", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 19:35:47', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4105
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:05:47";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 19:35:47", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 19:35:47', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4106
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:05:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 19:35:50", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 19:35:50', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4107
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:05:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 19:35:51", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 19:35:51', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=4108
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:06:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 19:36:12", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 19:36:12', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4109
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:12:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 19:42:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 19:42:54', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=4110
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:19:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 19:49:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 19:49:35', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php'); -- id=4111
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:19:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 19:49:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 19:49:35', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=4112
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:19:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 19:49:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 19:49:41', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=4113
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:30:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:00:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:00:53', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=4114
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('فيراري ', '', '', '', '', '0', '1', '2026-10-07 20:01:08', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=114
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('114', '0', '', '0', 'إضافة مورد جديد', '114', '', '2026-10-07 20:01:08', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=211
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('فيراري ', 'فيراري ', 'فيراري ', 'فيراري ', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-07 20:01:08'); -- id=597
UPDATE supplier SET suppliername = 'فيراري ', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-07', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='597',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '114';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:31:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:01:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 20:01:37', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=4115
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:31:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:01:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 20:01:52', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=4116
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:32:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:02:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 20:02:13', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=4117
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:36:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:06:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 20:06:11', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4118
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:36:12";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 20:06:12', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4119
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:36:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:06:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 20:06:31', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=4120
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:36:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:06:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 20:06:57', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=4121
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('مصطفي دبور','2026-10-07','','90', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=118
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (118, 1,'2026-10-07 20:06:57',1)
                ON DUPLICATE KEY UPDATE catid = 118, edited = 1, sysdate = '2026-10-07 20:06:57', userid = 1; -- id=121
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '118', '1', '2026-10-07', '1', '0'); -- id=33
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:36:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:06:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 20:06:57', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=4122
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:36:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:06:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 20:06:59', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=4123
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:37:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:07:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:07:01', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4124
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:37:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:07:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:07:22', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4125
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت دبور','','118','700','800','800','800','2026-10-07','0','1','0','','0','0','0','0','0','700','700','700','700','700','0','14.29','0','0','.','0','0','0','700','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','700','700','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','700','0','0','0','0','0','0','','','0','0','0','0'); -- id=1598
UPDATE product SET productName = 'جاكت دبور', productDescription = '', productCatId = '118', productBuyPrice = '700', productSellAllPrice = '800', productSellUnitPrice = '800', productSellHalfPrice = '800', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01598',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '700',lastbuyprice_withDiscount = '700',meanbuyprice = '700',meanbuyprice_withDiscount = '700' , productbuypricereal = '700' , buypricereal_precentage = '0' , buytotal_precentage = '14.29' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='700',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='700',meanbuyprice_withTax='700',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='700',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1598';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1598', '1.00', '2026-10-07', '1', '0','0159801','800','800','800','700','','0','0','0','0','0','0','0','0','0','0'); -- id=1598
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1598', '1', '0', '1', '2026-10-07'); -- id=1623
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1598', '1', '0', '0', '1598', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2792
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1598, 1,'2026-10-07 20:07:22',1)
                ON DUPLICATE KEY UPDATE productid = 1598, edited = 1, sysdate = '2026-10-07 20:07:22', userid = 1; -- id=2413
UPDATE product SET productName = 'جاكت دبور', productDescription = '', productCatId = '118', productBuyPrice = '700.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01598',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '700',lastbuyprice_withDiscount = '700',meanbuyprice = '700',meanbuyprice_withDiscount = '700' , productbuypricereal = '700' , buypricereal_precentage = '0' , buytotal_precentage = '14.29' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='700',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='700',meanbuyprice_withTax='700',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='700',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1598';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:37:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:07:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:07:24', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4126
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:37:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:07:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:07:24', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=4127
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:38:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:08:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:08:30', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=4128
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:38:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:08:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:08:34', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=4129
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:40:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:10:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:10:34', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=4130
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('مصطفي دبور', '', '', '', '', '0', '1', '2026-10-07 20:10:54', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=115
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('115', '0', '', '0', 'إضافة مورد جديد', '115', '', '2026-10-07 20:10:54', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=212
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('مصطفي دبور', 'مصطفي دبور', 'مصطفي دبور', 'مصطفي دبور', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-07 20:10:54'); -- id=598
UPDATE supplier SET suppliername = 'مصطفي دبور', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-07', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='598',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '115';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:41:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:11:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:11:08', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=4131
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac67d0adf110', '2026-10-07 20:10:34', '115', '0.00', '420000', '0', '0', '420000.00',  '420000.00', '0', '420000', '1', '2026-10-07 20:11:08', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=60
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01598', '60', '118', '1598', '600', '700', '420000.00', '0', '', '2026-10-07 20:11:08', '1598','','','0','0','0','0','0',null,'700','420000','0','0','0','0','0','0','0','0','1'); -- id=362
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 20:10:34', 1, 1598, 0, 0
                    , 700, 600, 0, 0, 1, '2026-10-07 20:11:08')
                ON DUPLICATE KEY UPDATE buyprice = 700,
                        buyQuantity =buyQuantity+600, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 20:11:08' ; -- id=454
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1598', '700', '600', '0', 'buyBillController.php', '362', '', '0', '0'); -- id=305
UPDATE product SET  productBuyPrice = "700" WHERE productId = 1598 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 362 ;
UPDATE product SET productName = 'جاكت دبور', productDescription = '', productCatId = '118', productBuyPrice = '700.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01598',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '700',lastbuyprice_withDiscount = '700',meanbuyprice = '700',meanbuyprice_withDiscount = '700' , productbuypricereal = '700.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '14.29' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='700',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='700',meanbuyprice_withTax='700',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='700',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1598';
UPDATE buybilldetail SET  lastbuyprice = 700 , meanbuyprice = 700, lastbuyprice_withDiscount = 700, meanbuyprice_withDiscount = 700
        , lastbuyprice_withTax = 700, meanbuyprice_withTax = 700, lastbuyprice_withDiscountAndTax = 700
                where buybilldetailid = 362;
UPDATE productunit SET proUnitBuyPrice  = 700 * productnumber WHERE productid = 1598;
UPDATE storedetail SET  productquantity = '600', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1623';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1598', '1', '600', '0', '60', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '600', '1', '2026-10-07 20:10:34','0','0'); -- id=2793
UPDATE supplier SET  suppliercurrentDebt = '420000',suppliercurrentDebtInCurrency= '420000' , userid = '1', supplierdate = '2026-10-07 20:11:08'   WHERE supplierid = '115';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('115', '0.00', '420000', '0', 'اضافة فاتورة مشتريات', '60', '420000', '2026-10-07 20:10:34', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','420000','1','0','420000','420000','0',''); -- id=213
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '420000', '420000', '2026-10-07', '1', '0', '0', '2026-10-07 20:11:08','اضافة فاتورة مشتريات رقم 60','1','0',null,'0','60','buyBillController.php?do=details&id=60'); -- id=1290
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1290', '382', '420000', '','0'); -- id=1300
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18380203.04', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1290', '598', '420000', '','0'); -- id=1290
UPDATE accountstree SET name = 'مصطفي دبور', customName = 'مصطفي دبور', customNameEn = 'مصطفي دبور', nameEn = 'مصطفي دبور', parent = '81', accountNature = '1', theValue = '420000', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 20:10:54' WHERE id = '598';
update buybill set dailyentryid='1290,0' where buybillid=60;
COMMIT;
UPDATE product SET overAllAveragePrice = 700 WHERE productId = 1598;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:41:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:11:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:11:08', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=60'); -- id=4132
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:41:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:11:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 20:11:46', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=4133
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:48:24";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:48:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:18:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 20:18:51', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4134
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:48:52";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 20:18:52', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4135
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:49:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:19:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:19:01', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=6'); -- id=4136
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:51:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:21:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:21:57', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=4137
BEGIN;
INSERT INTO returnbuybill (returnbuybillSerial, returnbuybilldate, returnbuybillsupplierid, returnbuybilltotaldeptbefor, returnbuybilltotaldeptafter, returnbuybilldiscount, returnbuybilldiscountrype, returnbuybilltotalbill, returnbuybillaftertotalbill, returnbuybilltotalpayed, returnbuybillfinalbill, returnbuybillstoreid, returnbuybillsysdate,comment, userid, conditions, returnbuybillclientname, returnbuybillsaveid, billnameid, returnbuybilldirectpayment,payedtax,costcenterid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,client,returnbuybilladdition,returnbuybilladditiontrype) VALUES ('06ac67f05e7ade', '2026-10-07 20:19:01', '7', '186345.00', '159365', '0', '0', '-26980.00', '-26980.00', '0', '-26980', '1', '2026-10-07 20:21:57', '', '1', '0', '', '1', '6','1','0.00','-1','0','1','0','0','0','0','0'); -- id=5
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('08565', '5', '22', '870', '35', '330', '11550', '0', '', '870','','','0','0','0','0','0','330','11550','0','0','0','0','0','0','0','1'); -- id=19
UPDATE product SET productName = 'جينز الو /خالد الدولي 350', productDescription = '', productCatId = '22', productBuyPrice = '330.00', productSellAllPrice = '350.00', productSellUnitPrice = '0.00', productSellHalfPrice = '0.00', productDate = '2026-09-27', conditions = '0', userId = '1', limitamount = '0', parcode = '08565',type ='0', expireDate = '0' , dailyentryId = '225',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='8565',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='1',sellpercenttype='0',searchfiltersid='1',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='1',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '870';
UPDATE returnbuybilldetail SET  lastbuyprice = 330 , meanbuyprice = 330, lastbuyprice_withDiscount = 330, meanbuyprice_withDiscount = 330
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where returnbuybilldetailid = 19;
UPDATE productunit SET proUnitBuyPrice  = 330 * productnumber WHERE productid = 870;
UPDATE storedetail SET  productquantity = '-5', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '870';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('870', '1', '35', '1', '5', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '30', '-5', '1', '2026-10-07 20:19:01','0','0'); -- id=2794
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('40048', '5', '22', '868', '31', '280', '8680', '0', '', '868','','','0','0','0','0','0','280','8680','0','0','0','0','0','0','0','1'); -- id=20
UPDATE product SET productName = 'جينز نيو فيجن', productDescription = '', productCatId = '22', productBuyPrice = '280.00', productSellAllPrice = '300.00', productSellUnitPrice = '0.00', productSellHalfPrice = '0.00', productDate = '2026-09-27', conditions = '0', userId = '1', limitamount = '0', parcode = '40048',type ='0', expireDate = '0' , dailyentryId = '223',isService = '0',isOptic = '0',lastbuyprice = '280',lastbuyprice_withDiscount = '280',meanbuyprice = '280',meanbuyprice_withDiscount = '280' , productbuypricereal = '280.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='280',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='40048',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='280',meanbuyprice_withTax='280',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='1',sellpercenttype='0',searchfiltersid='1',lastbuyprice_withDiscountAndTax='280',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='1',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '868';
UPDATE returnbuybilldetail SET  lastbuyprice = 280 , meanbuyprice = 280, lastbuyprice_withDiscount = 280, meanbuyprice_withDiscount = 280
        , lastbuyprice_withTax = 280, meanbuyprice_withTax = 280, lastbuyprice_withDiscountAndTax = 280
                where returnbuybilldetailid = 20;
UPDATE productunit SET proUnitBuyPrice  = 280 * productnumber WHERE productid = 868;
UPDATE storedetail SET  productquantity = '-1', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '868';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('868', '1', '31', '1', '5', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '30', '-1', '1', '2026-10-07 20:19:01','0','0'); -- id=2795
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('40049', '5', '22', '869', '25', '270', '6750', '0', '', '869','','','0','0','0','0','0','270','6750','0','0','0','0','0','0','0','1'); -- id=21
UPDATE product SET productName = 'جينز نيو سكاي', productDescription = '', productCatId = '22', productBuyPrice = '270.00', productSellAllPrice = '290.00', productSellUnitPrice = '0.00', productSellHalfPrice = '0.00', productDate = '2026-09-27', conditions = '0', userId = '1', limitamount = '0', parcode = '40049',type ='0', expireDate = '0' , dailyentryId = '224',isService = '0',isOptic = '0',lastbuyprice = '270',lastbuyprice_withDiscount = '270',meanbuyprice = '270',meanbuyprice_withDiscount = '270' , productbuypricereal = '270.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='40049',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='270',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='1',sellpercenttype='0',searchfiltersid='1',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='1',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '869';
UPDATE returnbuybilldetail SET  lastbuyprice = 270 , meanbuyprice = 270, lastbuyprice_withDiscount = 270, meanbuyprice_withDiscount = 270
        , lastbuyprice_withTax = 270, meanbuyprice_withTax = 270, lastbuyprice_withDiscountAndTax = 270
                where returnbuybilldetailid = 21;
UPDATE productunit SET proUnitBuyPrice  = 270 * productnumber WHERE productid = 869;
UPDATE storedetail SET  productquantity = '-1', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '869';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('869', '1', '25', '1', '5', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '24', '-1', '1', '2026-10-07 20:19:01','0','0'); -- id=2796
UPDATE supplier SET  suppliercurrentDebt = '159365',suppliercurrentDebtInCurrency= '159365' , userid = '1', supplierdate = '2026-10-07 20:21:57'   WHERE supplierid = '7';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('7', '186345.00', '26980', '1', 'اضافة فاتورة مردوات مشتريات', '5', '159365', '2026-10-07 20:19:01', '1', 'returnBuyBillController.php', 'اضافة فاتورة مردوات مشتريات', '0','', '0','1','1','26980','1','186345','26980','159365','0',''); -- id=214
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '26980', '26980', '2026-10-07', '1', '0', '0', '2026-10-07 20:21:57','اضافة فاتورة مردود مشتريات رقم 5','1','0',null,'0','5','returnBuyBillController.php?do=details&id=5'); -- id=1291
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1291', '426', '26980', '','0'); -- id=1301
UPDATE accountstree SET name = 'خالد الدولي - مورد', customName = 'خالد الدولي - مورد', customNameEn = 'خالد الدولي - مورد', nameEn = 'خالد الدولي - مورد', parent = '81', accountNature = '1', theValue = '-29280', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '426';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1291', '382', '26980', '','0'); -- id=1291
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18353223.04', 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 returnbuybill set dailyentryid='1291,0' where returnbuybillid=5;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:51:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:21:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:21:58', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=editprint&id=5'); -- id=4138
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:52:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:22:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:22:26', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=6'); -- id=4139
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:53:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:23:05", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 20:23:05', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4140
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:53:05";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 20:23:05", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 20:23:05', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4141
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:53:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:23:07", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 20:23:07', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4142
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:53:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:23:09", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 20:23:09', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=4143
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:53:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:23:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:23:45', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=6'); -- id=4144
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:53:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:23:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:23:47', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4145
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:53:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:23:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreport.php', '2026-10-07 20:23:48', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreport.php'); -- id=4146
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:53:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:23:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:23:50', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4147
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:54:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:24:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:24:15', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4148
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 513','','8','425','445','445','445','2026-10-07','0','1','0','09759','0','0','0','0','0','425','425','425','425','425','0','4.71','0','0','.','0','0','0','425','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','425','425','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','425','0','0','0','0','0','0','','','0','0','0','0'); -- id=1599
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1599', '1', '2026-10-07', '1', '0','0159901','445','445','445','425','','0','0','0','0','0','0','0','0','0','0'); -- id=1599
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1599', '1', '0', '1', '2026-10-07'); -- id=1624
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1599', '1', '0', '0', '1599', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2797
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1599, 1,'2026-10-07 20:24:15',1)
                ON DUPLICATE KEY UPDATE productid = 1599, edited = 1, sysdate = '2026-10-07 20:24:15', userid = 1; -- id=2414
UPDATE product SET productName = 'الدولي جينز 513', productDescription = '', productCatId = '8', productBuyPrice = '425.00', productSellAllPrice = '445.00', productSellUnitPrice = '445.00', productSellHalfPrice = '445.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09759',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '425',lastbuyprice_withDiscount = '425',meanbuyprice = '425',meanbuyprice_withDiscount = '425' , productbuypricereal = '425' , buypricereal_precentage = '0' , buytotal_precentage = '4.71' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='425',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='425',meanbuyprice_withTax='425',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='425',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1599';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:54:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:24:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:24:17', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4149
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:54:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:24:45", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnsellbillController.php', '2026-10-07 20:24:45', '2', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnsellbillController.php?do=showDetail&returnsellbillid=5'); -- id=4150
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:54:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:24:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:24:58', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4151
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:55:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:25:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:25:19', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4152
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 509','','8','445','465','465','465','2026-10-07','0','1','0','09386','0','0','0','0','0','445','445','445','445','445','0','4.49','0','0','.','0','0','0','445','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','445','445','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','445','0','0','0','0','0','0','','','0','0','0','0'); -- id=1600
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1600', '1', '2026-10-07', '1', '0','0160001','465','465','465','445','','0','0','0','0','0','0','0','0','0','0'); -- id=1600
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1600', '1', '0', '1', '2026-10-07'); -- id=1625
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1600', '1', '0', '0', '1600', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2798
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1600, 1,'2026-10-07 20:25:19',1)
                ON DUPLICATE KEY UPDATE productid = 1600, edited = 1, sysdate = '2026-10-07 20:25:19', userid = 1; -- id=2415
UPDATE product SET productName = 'الدولي جينز 509', productDescription = '', productCatId = '8', productBuyPrice = '445.00', productSellAllPrice = '465.00', productSellUnitPrice = '465.00', productSellHalfPrice = '465.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09386',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '445',lastbuyprice_withDiscount = '445',meanbuyprice = '445',meanbuyprice_withDiscount = '445' , productbuypricereal = '445' , buypricereal_precentage = '0' , buytotal_precentage = '4.49' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='445',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='445',meanbuyprice_withTax='445',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='445',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1600';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:55:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:25:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:25:21', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4153
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:55:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:25:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:25:57', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=6'); -- id=4154
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:55:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:25:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:25:59', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4155
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:56:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:26:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:26:04', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4156
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:56:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:26:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:26:32', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4157
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 512','','8','415','435','435','435','2026-10-07','0','1','0','09639','0','0','0','0','0','415','415','415','415','415','0','4.82','0','0','.','0','0','0','415','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','415','415','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','415','0','0','0','0','0','0','','','0','0','0','0'); -- id=1601
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1601', '1', '2026-10-07', '1', '0','0160101','435','435','435','415','','0','0','0','0','0','0','0','0','0','0'); -- id=1601
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1601', '1', '0', '1', '2026-10-07'); -- id=1626
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1601', '1', '0', '0', '1601', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2799
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1601, 1,'2026-10-07 20:26:32',1)
                ON DUPLICATE KEY UPDATE productid = 1601, edited = 1, sysdate = '2026-10-07 20:26:32', userid = 1; -- id=2416
UPDATE product SET productName = 'الدولي جينز 512', productDescription = '', productCatId = '8', productBuyPrice = '415.00', productSellAllPrice = '435.00', productSellUnitPrice = '435.00', productSellHalfPrice = '435.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09639',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '415',lastbuyprice_withDiscount = '415',meanbuyprice = '415',meanbuyprice_withDiscount = '415' , productbuypricereal = '415' , buypricereal_precentage = '0' , buytotal_precentage = '4.82' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='415',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='415',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1601';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:56:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:26:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:26:33', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4158
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:57:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:27:43", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 20:27:44', '6', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4159
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:57:44";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 20:27:44", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 20:27:44', '6', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4160
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:57:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:27:50", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 20:27:50', '6', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=4161
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:58:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:28:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:28:11', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4162
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 13754/1+3','','8','570','590','590','590','2026-10-07','0','1','0','05348','0','0','0','0','0','570','570','570','570','570','0','3.51','0','0','.','0','0','0','570','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','570','570','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','570','0','0','0','0','0','0','','','0','0','0','0'); -- id=1602
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1602', '1', '2026-10-07', '1', '0','0160201','590','590','590','570','','0','0','0','0','0','0','0','0','0','0'); -- id=1602
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1602', '1', '0', '1', '2026-10-07'); -- id=1627
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1602', '1', '0', '0', '1602', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2800
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1602, 1,'2026-10-07 20:28:11',1)
                ON DUPLICATE KEY UPDATE productid = 1602, edited = 1, sysdate = '2026-10-07 20:28:11', userid = 1; -- id=2417
UPDATE product SET productName = 'الدولي جينز 13754/1+3', productDescription = '', productCatId = '8', productBuyPrice = '570.00', productSellAllPrice = '590.00', productSellUnitPrice = '590.00', productSellHalfPrice = '590.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '05348',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '570',lastbuyprice_withDiscount = '570',meanbuyprice = '570',meanbuyprice_withDiscount = '570' , productbuypricereal = '570' , buypricereal_precentage = '0' , buytotal_precentage = '3.51' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='570',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='570',meanbuyprice_withTax='570',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='570',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1602';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:58:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:28:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:28:13', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4163
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:58:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:28:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:28:42', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4164
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:58:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:28:54", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 20:28:54', '6', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=4165
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:58:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:28:54", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 20:28:54', '6', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=4166
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:58:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:28:57", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 20:28:57', '6', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=113'); -- id=4167
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:59:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:29:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:29:07', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4168
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 506','','8','425','445','445','445','2026-10-07','0','1','0','09321','0','0','0','0','0','425','425','425','425','425','0','4.71','0','0','.','0','0','0','425','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','425','425','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','425','0','0','0','0','0','0','','','0','0','0','0'); -- id=1603
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1603', '1', '2026-10-07', '1', '0','0160301','445','445','445','425','','0','0','0','0','0','0','0','0','0','0'); -- id=1603
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1603', '1', '0', '1', '2026-10-07'); -- id=1628
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1603', '1', '0', '0', '1603', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2801
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1603, 1,'2026-10-07 20:29:07',1)
                ON DUPLICATE KEY UPDATE productid = 1603, edited = 1, sysdate = '2026-10-07 20:29:07', userid = 1; -- id=2418
UPDATE product SET productName = 'الدولي جينز 506', productDescription = '', productCatId = '8', productBuyPrice = '425.00', productSellAllPrice = '445.00', productSellUnitPrice = '445.00', productSellHalfPrice = '445.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09321',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '425',lastbuyprice_withDiscount = '425',meanbuyprice = '425',meanbuyprice_withDiscount = '425' , productbuypricereal = '425' , buypricereal_precentage = '0' , buytotal_precentage = '4.71' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='425',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='425',meanbuyprice_withTax='425',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='425',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1603';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:59:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:29:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:29:09', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4169
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:59:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:29:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:29:52', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4170
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 511','','8','430','450','450','450','2026-10-07','0','1','0','09588','0','0','0','0','0','430','430','430','430','430','0','4.65','0','0','.','0','0','0','430','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','430','430','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','430','0','0','0','0','0','0','','','0','0','0','0'); -- id=1604
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1604', '1', '2026-10-07', '1', '0','0160401','450','450','450','430','','0','0','0','0','0','0','0','0','0','0'); -- id=1604
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1604', '1', '0', '1', '2026-10-07'); -- id=1629
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1604', '1', '0', '0', '1604', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2802
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1604, 1,'2026-10-07 20:29:52',1)
                ON DUPLICATE KEY UPDATE productid = 1604, edited = 1, sysdate = '2026-10-07 20:29:52', userid = 1; -- id=2419
UPDATE product SET productName = 'الدولي جينز 511', productDescription = '', productCatId = '8', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09588',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430' , buypricereal_precentage = '0' , buytotal_precentage = '4.65' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1604';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 16:59:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:29:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:29:54', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4171
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:00:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:30:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:30:16', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=4172
BEGIN;
INSERT INTO returnbuybill (returnbuybillSerial, returnbuybilldate, returnbuybillsupplierid, returnbuybilltotaldeptbefor, returnbuybilltotaldeptafter, returnbuybilldiscount, returnbuybilldiscountrype, returnbuybilltotalbill, returnbuybillaftertotalbill, returnbuybilltotalpayed, returnbuybillfinalbill, returnbuybillstoreid, returnbuybillsysdate,comment, userid, conditions, returnbuybillclientname, returnbuybillsaveid, billnameid, returnbuybilldirectpayment,payedtax,costcenterid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,client,returnbuybilladdition,returnbuybilladditiontrype) VALUES ('06ac67fd2909b3', '2026-10-07 20:22:26', '26', '884045.00', '860040', '0', '0', '-24005.00', '-24005.00', '0', '-24005', '1', '2026-10-07 20:30:16', '', '1', '0', '', '1', '6','1','0.00','-1','0','1','0','0','0','0','0'); -- id=6
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09759', '6', '8', '1599', '15', '425', '6375', '0', '', '1599','','','0','0','0','0','0','425','6375','0','0','0','0','0','0','0','1'); -- id=22
UPDATE product SET productName = 'الدولي جينز 513', productDescription = '', productCatId = '8', productBuyPrice = '425.00', productSellAllPrice = '445.00', productSellUnitPrice = '445.00', productSellHalfPrice = '445.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09759',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '425',lastbuyprice_withDiscount = '425',meanbuyprice = '425',meanbuyprice_withDiscount = '425' , productbuypricereal = '425.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.71' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='425',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='425',meanbuyprice_withTax='425',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='425',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1599';
UPDATE returnbuybilldetail SET  lastbuyprice = 425 , meanbuyprice = 425, lastbuyprice_withDiscount = 425, meanbuyprice_withDiscount = 425
        , lastbuyprice_withTax = 425, meanbuyprice_withTax = 425, lastbuyprice_withDiscountAndTax = 425
                where returnbuybilldetailid = 22;
UPDATE productunit SET proUnitBuyPrice  = 425 * productnumber WHERE productid = 1599;
UPDATE storedetail SET  productquantity = '-15', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1624';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1599', '1', '15', '1', '6', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-15', '1', '2026-10-07 20:22:26','0','0'); -- id=2803
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09386', '6', '8', '1600', '10', '445', '4450', '0', '', '1600','','','0','0','0','0','0','445','4450','0','0','0','0','0','0','0','1'); -- id=23
UPDATE product SET productName = 'الدولي جينز 509', productDescription = '', productCatId = '8', productBuyPrice = '445.00', productSellAllPrice = '465.00', productSellUnitPrice = '465.00', productSellHalfPrice = '465.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09386',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '445',lastbuyprice_withDiscount = '445',meanbuyprice = '445',meanbuyprice_withDiscount = '445' , productbuypricereal = '445.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.49' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='445',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='445',meanbuyprice_withTax='445',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='445',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1600';
UPDATE returnbuybilldetail SET  lastbuyprice = 445 , meanbuyprice = 445, lastbuyprice_withDiscount = 445, meanbuyprice_withDiscount = 445
        , lastbuyprice_withTax = 445, meanbuyprice_withTax = 445, lastbuyprice_withDiscountAndTax = 445
                where returnbuybilldetailid = 23;
UPDATE productunit SET proUnitBuyPrice  = 445 * productnumber WHERE productid = 1600;
UPDATE storedetail SET  productquantity = '-10', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1625';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1600', '1', '10', '1', '6', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-10', '1', '2026-10-07 20:22:26','0','0'); -- id=2804
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09639', '6', '8', '1601', '8', '415', '3320', '0', '', '1601','','','0','0','0','0','0','415','3320','0','0','0','0','0','0','0','1'); -- id=24
UPDATE product SET productName = 'الدولي جينز 512', productDescription = '', productCatId = '8', productBuyPrice = '415.00', productSellAllPrice = '435.00', productSellUnitPrice = '435.00', productSellHalfPrice = '435.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09639',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '415',lastbuyprice_withDiscount = '415',meanbuyprice = '415',meanbuyprice_withDiscount = '415' , productbuypricereal = '415.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.82' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='415',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='415',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1601';
UPDATE returnbuybilldetail SET  lastbuyprice = 415 , meanbuyprice = 415, lastbuyprice_withDiscount = 415, meanbuyprice_withDiscount = 415
        , lastbuyprice_withTax = 415, meanbuyprice_withTax = 415, lastbuyprice_withDiscountAndTax = 415
                where returnbuybilldetailid = 24;
UPDATE productunit SET proUnitBuyPrice  = 415 * productnumber WHERE productid = 1601;
UPDATE storedetail SET  productquantity = '-8', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1626';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1601', '1', '8', '1', '6', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-8', '1', '2026-10-07 20:22:26','0','0'); -- id=2805
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('05348', '6', '8', '1602', '3', '570', '1710', '0', '', '1602','','','0','0','0','0','0','570','1710','0','0','0','0','0','0','0','1'); -- id=25
UPDATE product SET productName = 'الدولي جينز 13754/1+3', productDescription = '', productCatId = '8', productBuyPrice = '570.00', productSellAllPrice = '590.00', productSellUnitPrice = '590.00', productSellHalfPrice = '590.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '05348',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '570',lastbuyprice_withDiscount = '570',meanbuyprice = '570',meanbuyprice_withDiscount = '570' , productbuypricereal = '570.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.51' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='570',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='570',meanbuyprice_withTax='570',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='570',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1602';
UPDATE returnbuybilldetail SET  lastbuyprice = 570 , meanbuyprice = 570, lastbuyprice_withDiscount = 570, meanbuyprice_withDiscount = 570
        , lastbuyprice_withTax = 570, meanbuyprice_withTax = 570, lastbuyprice_withDiscountAndTax = 570
                where returnbuybilldetailid = 25;
UPDATE productunit SET proUnitBuyPrice  = 570 * productnumber WHERE productid = 1602;
UPDATE storedetail SET  productquantity = '-3', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1627';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1602', '1', '3', '1', '6', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-3', '1', '2026-10-07 20:22:26','0','0'); -- id=2806
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09321', '6', '8', '1603', '4', '425', '1700', '0', '', '1603','','','0','0','0','0','0','425','1700','0','0','0','0','0','0','0','1'); -- id=26
UPDATE product SET productName = 'الدولي جينز 506', productDescription = '', productCatId = '8', productBuyPrice = '425.00', productSellAllPrice = '445.00', productSellUnitPrice = '445.00', productSellHalfPrice = '445.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09321',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '425',lastbuyprice_withDiscount = '425',meanbuyprice = '425',meanbuyprice_withDiscount = '425' , productbuypricereal = '425.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.71' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='425',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='425',meanbuyprice_withTax='425',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='425',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1603';
UPDATE returnbuybilldetail SET  lastbuyprice = 425 , meanbuyprice = 425, lastbuyprice_withDiscount = 425, meanbuyprice_withDiscount = 425
        , lastbuyprice_withTax = 425, meanbuyprice_withTax = 425, lastbuyprice_withDiscountAndTax = 425
                where returnbuybilldetailid = 26;
UPDATE productunit SET proUnitBuyPrice  = 425 * productnumber WHERE productid = 1603;
UPDATE storedetail SET  productquantity = '-4', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1628';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1603', '1', '4', '1', '6', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-4', '1', '2026-10-07 20:22:26','0','0'); -- id=2807
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09588', '6', '8', '1604', '15', '430', '6450', '0', '', '1604','','','0','0','0','0','0','430','6450','0','0','0','0','0','0','0','1'); -- id=27
UPDATE product SET productName = 'الدولي جينز 511', productDescription = '', productCatId = '8', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09588',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.65' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1604';
UPDATE returnbuybilldetail SET  lastbuyprice = 430 , meanbuyprice = 430, lastbuyprice_withDiscount = 430, meanbuyprice_withDiscount = 430
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 430, lastbuyprice_withDiscountAndTax = 430
                where returnbuybilldetailid = 27;
UPDATE productunit SET proUnitBuyPrice  = 430 * productnumber WHERE productid = 1604;
UPDATE storedetail SET  productquantity = '-15', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1629';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1604', '1', '15', '1', '6', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-15', '1', '2026-10-07 20:22:26','0','0'); -- id=2808
UPDATE supplier SET  suppliercurrentDebt = '860040',suppliercurrentDebtInCurrency= '860040' , userid = '1', supplierdate = '2026-10-07 20:30:16'   WHERE supplierid = '26';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('26', '884045.00', '24005', '1', 'اضافة فاتورة مردوات مشتريات', '6', '860040', '2026-10-07 20:22:26', '1', 'returnBuyBillController.php', 'اضافة فاتورة مردوات مشتريات', '0','', '0','1','1','24005','1','884045','24005','860040','0',''); -- id=215
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '24005', '24005', '2026-10-07', '1', '0', '0', '2026-10-07 20:30:16','اضافة فاتورة مردود مشتريات رقم 6','1','0',null,'0','6','returnBuyBillController.php?do=details&id=6'); -- id=1292
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1292', '445', '24005', '','0'); -- id=1302
UPDATE accountstree SET name = 'الدولي - مورد', customName = 'الدولي - مورد', customNameEn = 'الدولي - مورد', nameEn = 'الدولي - مورد', parent = '81', accountNature = '1', theValue = '51245', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '445';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1292', '382', '24005', '','0'); -- id=1292
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18329218.04', 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 returnbuybill set dailyentryid='1292,0' where returnbuybillid=6;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:00:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:30:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:30:16', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=editprint&id=6'); -- id=4173
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:00:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:30:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:30:19', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=6'); -- id=4174
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:00:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:30:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:30:44', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4175
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:01:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:31:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:31:08', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4176
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('شورت باجي 6087 فيلو','','31','410','430','430','430','2026-10-07','0','1','0','09330','0','0','0','0','0','410','410','410','410','410','0','4.88','0','0','.','0','0','0','410','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','410','410','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','410','0','0','0','0','0','0','','','0','0','0','0'); -- id=1605
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1605', '1', '2026-10-07', '1', '0','0160501','430','430','430','410','','0','0','0','0','0','0','0','0','0','0'); -- id=1605
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1605', '1', '0', '1', '2026-10-07'); -- id=1630
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1605', '1', '0', '0', '1605', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2809
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1605, 1,'2026-10-07 20:31:08',1)
                ON DUPLICATE KEY UPDATE productid = 1605, edited = 1, sysdate = '2026-10-07 20:31:08', userid = 1; -- id=2420
UPDATE product SET productName = 'شورت باجي 6087 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '410.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09330',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410',meanbuyprice_withDiscount = '410' , productbuypricereal = '410' , buypricereal_precentage = '0' , buytotal_precentage = '4.88' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='410',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1605';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:01:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:31:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:31:10', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4177
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:02:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:32:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:32:14', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4178
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:02:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:32:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:32:35', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4179
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('شورت باجي 6307 فيلو','','31','420','440','440','440','2026-10-07','0','1','0','09335','0','0','0','0','0','420','420','420','420','420','0','4.76','0','0','.','0','0','0','420','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','420','420','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','420','0','0','0','0','0','0','','','0','0','0','0'); -- id=1606
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1606', '1', '2026-10-07', '1', '0','0160601','440','440','440','420','','0','0','0','0','0','0','0','0','0','0'); -- id=1606
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1606', '1', '0', '1', '2026-10-07'); -- id=1631
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1606', '1', '0', '0', '1606', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2810
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1606, 1,'2026-10-07 20:32:35',1)
                ON DUPLICATE KEY UPDATE productid = 1606, edited = 1, sysdate = '2026-10-07 20:32:35', userid = 1; -- id=2421
UPDATE product SET productName = 'شورت باجي 6307 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '420.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09335',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420' , buypricereal_precentage = '0' , buytotal_precentage = '4.76' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1606';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:02:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:32:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:32:37', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4180
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:04:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:34:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:34:04', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=4181
BEGIN;
INSERT INTO returnbuybill (returnbuybillSerial, returnbuybilldate, returnbuybillsupplierid, returnbuybilltotaldeptbefor, returnbuybilltotaldeptafter, returnbuybilldiscount, returnbuybilldiscountrype, returnbuybilltotalbill, returnbuybillaftertotalbill, returnbuybilltotalpayed, returnbuybillfinalbill, returnbuybillstoreid, returnbuybillsysdate,comment, userid, conditions, returnbuybillclientname, returnbuybillsaveid, billnameid, returnbuybilldirectpayment,payedtax,costcenterid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,client,returnbuybilladdition,returnbuybilladditiontrype) VALUES ('06ac681ab6c597', '2026-10-07 20:30:19', '6', '806945.00', '786765', '0', '0', '-20180.00', '-20180.00', '0', '-20180', '1', '2026-10-07 20:34:04', '', '1', '0', '', '1', '6','1','0.00','-1','0','1','0','0','0','0','0'); -- id=7
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09330', '7', '31', '1605', '40', '410', '16400', '0', '', '1605','','','0','0','0','0','0','410','16400','0','0','0','0','0','0','0','1'); -- id=28
UPDATE product SET productName = 'شورت باجي 6087 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '410.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09330',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410',meanbuyprice_withDiscount = '410' , productbuypricereal = '410.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.88' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='410',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1605';
UPDATE returnbuybilldetail SET  lastbuyprice = 410 , meanbuyprice = 410, lastbuyprice_withDiscount = 410, meanbuyprice_withDiscount = 410
        , lastbuyprice_withTax = 410, meanbuyprice_withTax = 410, lastbuyprice_withDiscountAndTax = 410
                where returnbuybilldetailid = 28;
UPDATE productunit SET proUnitBuyPrice  = 410 * productnumber WHERE productid = 1605;
UPDATE storedetail SET  productquantity = '-40', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1630';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1605', '1', '40', '1', '7', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-40', '1', '2026-10-07 20:30:19','0','0'); -- id=2811
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09335', '7', '31', '1606', '9', '420', '3780', '0', '', '1606','','','0','0','0','0','0','420','3780','0','0','0','0','0','0','0','1'); -- id=29
UPDATE product SET productName = 'شورت باجي 6307 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '420.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09335',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.76' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1606';
UPDATE returnbuybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 420, meanbuyprice_withDiscount = 420
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 420
                where returnbuybilldetailid = 29;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1606;
UPDATE storedetail SET  productquantity = '-9', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1631';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1606', '1', '9', '1', '7', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-9', '1', '2026-10-07 20:30:19','0','0'); -- id=2812
UPDATE supplier SET  suppliercurrentDebt = '1076272',suppliercurrentDebtInCurrency= '786765' , userid = '1', supplierdate = '2026-10-07 20:34:04'   WHERE supplierid = '6';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('6', '1096452.00', '20180', '1', 'اضافة فاتورة مردوات مشتريات', '7', '1076272', '2026-10-07 20:30:19', '1', 'returnBuyBillController.php', 'اضافة فاتورة مردوات مشتريات', '0','', '0','1','1','20180','1','806945','20180','786765','0',''); -- id=216
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '20180', '20180', '2026-10-07', '1', '0', '0', '2026-10-07 20:34:04','اضافة فاتورة مردود مشتريات رقم 7','1','0',null,'0','7','returnBuyBillController.php?do=details&id=7'); -- id=1293
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1293', '425', '20180', '','0'); -- id=1303
UPDATE accountstree SET name = 'فيلو - مورد', customName = 'فيلو - مورد', customNameEn = 'فيلو - مورد', nameEn = 'فيلو - مورد', parent = '81', accountNature = '1', theValue = '240735', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '425';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1293', '382', '20180', '','0'); -- id=1293
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18309038.04', 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 returnbuybill set dailyentryid='1293,0' where returnbuybillid=7;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:04:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:34:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:34:04', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=editprint&id=7'); -- id=4182
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:04:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:34:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:34:08', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=6'); -- id=4183
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:04:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:34:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:34:24', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=show'); -- id=4184
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:04:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:34:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:34:28', '1', 'editreturn', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editreturn&id=6'); -- id=4185
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:05:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:35:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:35:29', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4186
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('الدولي جينز 510','','8','440','460','460','460','2026-10-07','0','1','0','09450','0','0','0','0','0','440','440','440','440','440','0','4.55','0','0','.','0','0','0','440','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','440','440','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','440','0','0','0','0','0','0','','','0','0','0','0'); -- id=1607
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1607', '1', '2026-10-07', '1', '0','0160701','460','460','460','440','','0','0','0','0','0','0','0','0','0','0'); -- id=1607
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1607', '1', '0', '1', '2026-10-07'); -- id=1632
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1607', '1', '0', '0', '1607', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2813
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1607, 1,'2026-10-07 20:35:29',1)
                ON DUPLICATE KEY UPDATE productid = 1607, edited = 1, sysdate = '2026-10-07 20:35:29', userid = 1; -- id=2422
UPDATE product SET productName = 'الدولي جينز 510', productDescription = '', productCatId = '8', productBuyPrice = '440.00', productSellAllPrice = '460.00', productSellUnitPrice = '460.00', productSellHalfPrice = '460.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09450',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '440',lastbuyprice_withDiscount = '440',meanbuyprice = '440',meanbuyprice_withDiscount = '440' , productbuypricereal = '440' , buypricereal_precentage = '0' , buytotal_precentage = '4.55' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='440',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='440',meanbuyprice_withTax='440',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='440',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1607';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:05:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:35:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:35:31', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4187
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:05:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:35:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:35:42', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4188
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:07:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:37:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:37:45', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=4189
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:07:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:37:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:37:50', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=4190
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:09:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:39:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:39:55', '1', 'editreturn', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editreturn&id=6'); -- id=4191
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:10:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:40:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:40:10', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=update'); -- id=4192
BEGIN;
UPDATE costcenterdetail SET del = 1 WHERE type in( 4) and  modelid = 6;
UPDATE returnbuybill SET  returnbuybillsysdate = '2026-10-07 20:40:10', userid = null,delbyuserid = '1', conditions = '1' WHERE returnbuybillid = '6';
UPDATE returnbuybilldetail SET  lastbuyprice = 425.00 , meanbuyprice = 425.00, lastbuyprice_withDiscount = 425.00, meanbuyprice_withDiscount = 425.00
        , lastbuyprice_withTax = 425.00, meanbuyprice_withTax = 425.00, lastbuyprice_withDiscountAndTax = 425.00
                where returnbuybilldetailid = 22;
UPDATE product SET productName = 'الدولي جينز 513', productDescription = '', productCatId = '8', productBuyPrice = '425.00', productSellAllPrice = '445.00', productSellUnitPrice = '445.00', productSellHalfPrice = '445.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09759',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '425',lastbuyprice_withDiscount = '425',meanbuyprice = '425.00',meanbuyprice_withDiscount = '425' , productbuypricereal = '425.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.71' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='425',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='425',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='425',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1599';
UPDATE productunit SET proUnitBuyPrice  = 425 * productnumber WHERE productid = 1599;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1624';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1599', '1', '15', '0', '6', 'حذف فاتورة مردودات مشتريات', 'returnBuyBillController.php', '-15', '0', '1', '2026-10-07 20:22:26','0','0'); -- id=2814
UPDATE returnbuybilldetail SET  lastbuyprice = 445.00 , meanbuyprice = 445.00, lastbuyprice_withDiscount = 445.00, meanbuyprice_withDiscount = 445.00
        , lastbuyprice_withTax = 445.00, meanbuyprice_withTax = 445.00, lastbuyprice_withDiscountAndTax = 445.00
                where returnbuybilldetailid = 23;
UPDATE product SET productName = 'الدولي جينز 509', productDescription = '', productCatId = '8', productBuyPrice = '445.00', productSellAllPrice = '465.00', productSellUnitPrice = '465.00', productSellHalfPrice = '465.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09386',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '445',lastbuyprice_withDiscount = '445',meanbuyprice = '445.00',meanbuyprice_withDiscount = '445' , productbuypricereal = '445.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.49' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='445',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='445',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='445',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1600';
UPDATE productunit SET proUnitBuyPrice  = 445 * productnumber WHERE productid = 1600;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1625';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1600', '1', '10', '0', '6', 'حذف فاتورة مردودات مشتريات', 'returnBuyBillController.php', '-10', '0', '1', '2026-10-07 20:22:26','0','0'); -- id=2815
UPDATE returnbuybilldetail SET  lastbuyprice = 415.00 , meanbuyprice = 415.00, lastbuyprice_withDiscount = 415.00, meanbuyprice_withDiscount = 415.00
        , lastbuyprice_withTax = 415.00, meanbuyprice_withTax = 415.00, lastbuyprice_withDiscountAndTax = 415.00
                where returnbuybilldetailid = 24;
UPDATE product SET productName = 'الدولي جينز 512', productDescription = '', productCatId = '8', productBuyPrice = '415.00', productSellAllPrice = '435.00', productSellUnitPrice = '435.00', productSellHalfPrice = '435.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09639',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '415',lastbuyprice_withDiscount = '415',meanbuyprice = '415.00',meanbuyprice_withDiscount = '415' , productbuypricereal = '415.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.82' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='415',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1601';
UPDATE productunit SET proUnitBuyPrice  = 415 * productnumber WHERE productid = 1601;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1626';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1601', '1', '8', '0', '6', 'حذف فاتورة مردودات مشتريات', 'returnBuyBillController.php', '-8', '0', '1', '2026-10-07 20:22:26','0','0'); -- id=2816
UPDATE returnbuybilldetail SET  lastbuyprice = 570.00 , meanbuyprice = 570.00, lastbuyprice_withDiscount = 570.00, meanbuyprice_withDiscount = 570.00
        , lastbuyprice_withTax = 570.00, meanbuyprice_withTax = 570.00, lastbuyprice_withDiscountAndTax = 570.00
                where returnbuybilldetailid = 25;
UPDATE product SET productName = 'الدولي جينز 13754/1+3', productDescription = '', productCatId = '8', productBuyPrice = '570.00', productSellAllPrice = '590.00', productSellUnitPrice = '590.00', productSellHalfPrice = '590.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '05348',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '570',lastbuyprice_withDiscount = '570',meanbuyprice = '570.00',meanbuyprice_withDiscount = '570' , productbuypricereal = '570.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.51' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='570',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='570',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='570',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1602';
UPDATE productunit SET proUnitBuyPrice  = 570 * productnumber WHERE productid = 1602;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1627';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1602', '1', '3', '0', '6', 'حذف فاتورة مردودات مشتريات', 'returnBuyBillController.php', '-3', '0', '1', '2026-10-07 20:22:26','0','0'); -- id=2817
UPDATE returnbuybilldetail SET  lastbuyprice = 425.00 , meanbuyprice = 425.00, lastbuyprice_withDiscount = 425.00, meanbuyprice_withDiscount = 425.00
        , lastbuyprice_withTax = 425.00, meanbuyprice_withTax = 425.00, lastbuyprice_withDiscountAndTax = 425.00
                where returnbuybilldetailid = 26;
UPDATE product SET productName = 'الدولي جينز 506', productDescription = '', productCatId = '8', productBuyPrice = '425.00', productSellAllPrice = '445.00', productSellUnitPrice = '445.00', productSellHalfPrice = '445.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09321',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '425',lastbuyprice_withDiscount = '425',meanbuyprice = '425.00',meanbuyprice_withDiscount = '425' , productbuypricereal = '425.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.71' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='425',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='425',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='425',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1603';
UPDATE productunit SET proUnitBuyPrice  = 425 * productnumber WHERE productid = 1603;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1628';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1603', '1', '4', '0', '6', 'حذف فاتورة مردودات مشتريات', 'returnBuyBillController.php', '-4', '0', '1', '2026-10-07 20:22:26','0','0'); -- id=2818
UPDATE returnbuybilldetail SET  lastbuyprice = 430.00 , meanbuyprice = 430.00, lastbuyprice_withDiscount = 430.00, meanbuyprice_withDiscount = 430.00
        , lastbuyprice_withTax = 430.00, meanbuyprice_withTax = 430.00, lastbuyprice_withDiscountAndTax = 430.00
                where returnbuybilldetailid = 27;
UPDATE product SET productName = 'الدولي جينز 511', productDescription = '', productCatId = '8', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09588',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430.00',meanbuyprice_withDiscount = '430' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.65' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1604';
UPDATE productunit SET proUnitBuyPrice  = 430 * productnumber WHERE productid = 1604;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1629';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1604', '1', '15', '0', '6', 'حذف فاتورة مردودات مشتريات', 'returnBuyBillController.php', '-15', '0', '1', '2026-10-07 20:22:26','0','0'); -- id=2819
UPDATE supplier SET  suppliercurrentDebt = '884045',suppliercurrentDebtInCurrency= '884045' , userid = '1', supplierdate = '2026-10-07 20:40:10'   WHERE supplierid = '26';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('26', '860040.00', '24005', '0', 'حذف فاتورة مردودات مشتريات', '6', '884045', '2026-10-07 20:22:26', '1', 'returnBuyBillController.php', 'حذف فاتورة مردودات مشتريات', '0','', '0','1','1','24005','1','860040','-24005','884045','0',''); -- id=217
UPDATE save SET  savecurrentvalue = '-1462750',  userid = '1' WHERE saveid = '1';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('-1462750.00','0', '1', '1', 'حذف فاتورة مردودات مشتريات', '6', '-1462750', '2026-10-07 20:22:26', '1',  'returnBuyBillController.php','0','','0'); -- id=166
INSERT INTO returnbuybill (returnbuybillSerial, returnbuybilldate, returnbuybillsupplierid, returnbuybilltotaldeptbefor, returnbuybilltotaldeptafter, returnbuybilldiscount, returnbuybilldiscountrype, returnbuybilltotalbill, returnbuybillaftertotalbill, returnbuybilltotalpayed, returnbuybillfinalbill, returnbuybillstoreid, returnbuybillsysdate,comment, userid, conditions, returnbuybillclientname, returnbuybillsaveid, billnameid, returnbuybilldirectpayment,deletedbuyid,controlname,payedtax,costcenterid,currencyId,taxOfDiscountPer,taxOfDiscountVal,client,returnbuybilladdition,returnbuybilladditiontrype) VALUES ('06ac67fd2909b3', '2026-10-07 20:22:26', '26', '884045.00', '849040', '0', '0', '-35005.00', '-35005.00', '0.00', '-35005', '1', '2026-10-07 20:40:10', '', '1', '0', '', '1', '6' ,'1' ,'6','returnBuyBillController.php','0.00','-1','1','0','0','0','0','0'); -- id=8
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09759', '8', '8', '1599', '15.00', '425', '6375', '0.00', '', '1599','','','0','0','0','0','0','425','6375','0','0','0','0','0','0','0','1'); -- id=30
UPDATE product SET productName = 'الدولي جينز 513', productDescription = '', productCatId = '8', productBuyPrice = '425.00', productSellAllPrice = '445.00', productSellUnitPrice = '445.00', productSellHalfPrice = '445.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09759',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '425',lastbuyprice_withDiscount = '425',meanbuyprice = '425',meanbuyprice_withDiscount = '425' , productbuypricereal = '425.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.71' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='425',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='425',meanbuyprice_withTax='212.5',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='425',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1599';
UPDATE returnbuybilldetail SET  lastbuyprice = 425 , meanbuyprice = 425, lastbuyprice_withDiscount = 425, meanbuyprice_withDiscount = 425
        , lastbuyprice_withTax = 425, meanbuyprice_withTax = 212.5, lastbuyprice_withDiscountAndTax = 425
                where returnbuybilldetailid = 30;
UPDATE productunit SET proUnitBuyPrice  = 425 * productnumber WHERE productid = 1599;
UPDATE storedetail SET  productquantity = '-15', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1624';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1599', '1', '15', '1', '8', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-15', '1', '2026-10-07 20:22:26','0','0'); -- id=2820
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09386', '8', '8', '1600', '10.00', '445', '4450', '0.00', '', '1600','','','0','0','0','0','0','445','4450','0','0','0','0','0','0','0','1'); -- id=31
UPDATE product SET productName = 'الدولي جينز 509', productDescription = '', productCatId = '8', productBuyPrice = '445.00', productSellAllPrice = '465.00', productSellUnitPrice = '465.00', productSellHalfPrice = '465.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09386',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '445',lastbuyprice_withDiscount = '445',meanbuyprice = '445',meanbuyprice_withDiscount = '445' , productbuypricereal = '445.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.49' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='445',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='445',meanbuyprice_withTax='222.5',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='445',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1600';
UPDATE returnbuybilldetail SET  lastbuyprice = 445 , meanbuyprice = 445, lastbuyprice_withDiscount = 445, meanbuyprice_withDiscount = 445
        , lastbuyprice_withTax = 445, meanbuyprice_withTax = 222.5, lastbuyprice_withDiscountAndTax = 445
                where returnbuybilldetailid = 31;
UPDATE productunit SET proUnitBuyPrice  = 445 * productnumber WHERE productid = 1600;
UPDATE storedetail SET  productquantity = '-10', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1625';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1600', '1', '10', '1', '8', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-10', '1', '2026-10-07 20:22:26','0','0'); -- id=2821
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09639', '8', '8', '1601', '8.00', '415', '3320', '0.00', '', '1601','','','0','0','0','0','0','415','3320','0','0','0','0','0','0','0','1'); -- id=32
UPDATE product SET productName = 'الدولي جينز 512', productDescription = '', productCatId = '8', productBuyPrice = '415.00', productSellAllPrice = '435.00', productSellUnitPrice = '435.00', productSellHalfPrice = '435.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09639',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '415',lastbuyprice_withDiscount = '415',meanbuyprice = '415',meanbuyprice_withDiscount = '415' , productbuypricereal = '415.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.82' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='207.5',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='415',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1601';
UPDATE returnbuybilldetail SET  lastbuyprice = 415 , meanbuyprice = 415, lastbuyprice_withDiscount = 415, meanbuyprice_withDiscount = 415
        , lastbuyprice_withTax = 415, meanbuyprice_withTax = 207.5, lastbuyprice_withDiscountAndTax = 415
                where returnbuybilldetailid = 32;
UPDATE productunit SET proUnitBuyPrice  = 415 * productnumber WHERE productid = 1601;
UPDATE storedetail SET  productquantity = '-8', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1626';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1601', '1', '8', '1', '8', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-8', '1', '2026-10-07 20:22:26','0','0'); -- id=2822
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('05348', '8', '8', '1602', '3.00', '570', '1710', '0.00', '', '1602','','','0','0','0','0','0','570','1710','0','0','0','0','0','0','0','1'); -- id=33
UPDATE product SET productName = 'الدولي جينز 13754/1+3', productDescription = '', productCatId = '8', productBuyPrice = '570.00', productSellAllPrice = '590.00', productSellUnitPrice = '590.00', productSellHalfPrice = '590.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '05348',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '570',lastbuyprice_withDiscount = '570',meanbuyprice = '570',meanbuyprice_withDiscount = '570' , productbuypricereal = '570.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '3.51' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='570',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='570',meanbuyprice_withTax='285',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='570',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1602';
UPDATE returnbuybilldetail SET  lastbuyprice = 570 , meanbuyprice = 570, lastbuyprice_withDiscount = 570, meanbuyprice_withDiscount = 570
        , lastbuyprice_withTax = 570, meanbuyprice_withTax = 285, lastbuyprice_withDiscountAndTax = 570
                where returnbuybilldetailid = 33;
UPDATE productunit SET proUnitBuyPrice  = 570 * productnumber WHERE productid = 1602;
UPDATE storedetail SET  productquantity = '-3', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1627';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1602', '1', '3', '1', '8', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-3', '1', '2026-10-07 20:22:26','0','0'); -- id=2823
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09321', '8', '8', '1603', '4.00', '425', '1700', '0.00', '', '1603','','','0','0','0','0','0','425','1700','0','0','0','0','0','0','0','1'); -- id=34
UPDATE product SET productName = 'الدولي جينز 506', productDescription = '', productCatId = '8', productBuyPrice = '425.00', productSellAllPrice = '445.00', productSellUnitPrice = '445.00', productSellHalfPrice = '445.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09321',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '425',lastbuyprice_withDiscount = '425',meanbuyprice = '425',meanbuyprice_withDiscount = '425' , productbuypricereal = '425.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.71' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='425',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='425',meanbuyprice_withTax='212.5',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='425',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1603';
UPDATE returnbuybilldetail SET  lastbuyprice = 425 , meanbuyprice = 425, lastbuyprice_withDiscount = 425, meanbuyprice_withDiscount = 425
        , lastbuyprice_withTax = 425, meanbuyprice_withTax = 212.5, lastbuyprice_withDiscountAndTax = 425
                where returnbuybilldetailid = 34;
UPDATE productunit SET proUnitBuyPrice  = 425 * productnumber WHERE productid = 1603;
UPDATE storedetail SET  productquantity = '-4', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1628';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1603', '1', '4', '1', '8', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-4', '1', '2026-10-07 20:22:26','0','0'); -- id=2824
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09588', '8', '8', '1604', '15.00', '430', '6450', '0.00', '', '1604','','','0','0','0','0','0','430','6450','0','0','0','0','0','0','0','1'); -- id=35
UPDATE product SET productName = 'الدولي جينز 511', productDescription = '', productCatId = '8', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09588',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.65' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='215',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1604';
UPDATE returnbuybilldetail SET  lastbuyprice = 430 , meanbuyprice = 430, lastbuyprice_withDiscount = 430, meanbuyprice_withDiscount = 430
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 215, lastbuyprice_withDiscountAndTax = 430
                where returnbuybilldetailid = 35;
UPDATE productunit SET proUnitBuyPrice  = 430 * productnumber WHERE productid = 1604;
UPDATE storedetail SET  productquantity = '-15', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1629';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1604', '1', '15', '1', '8', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-15', '1', '2026-10-07 20:22:26','0','0'); -- id=2825
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09450', '8', '8', '1607', '25', '440', '11000', '0', '', '1607','','','0','0','0','0','0','440','11000','0','0','0','0','0','0','0','1'); -- id=36
UPDATE product SET productName = 'الدولي جينز 510', productDescription = '', productCatId = '8', productBuyPrice = '440.00', productSellAllPrice = '460.00', productSellUnitPrice = '460.00', productSellHalfPrice = '460.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09450',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '440',lastbuyprice_withDiscount = '440',meanbuyprice = '440',meanbuyprice_withDiscount = '440' , productbuypricereal = '440.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.55' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='440',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='440',meanbuyprice_withTax='440',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='440',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1607';
UPDATE returnbuybilldetail SET  lastbuyprice = 440 , meanbuyprice = 440, lastbuyprice_withDiscount = 440, meanbuyprice_withDiscount = 440
        , lastbuyprice_withTax = 440, meanbuyprice_withTax = 440, lastbuyprice_withDiscountAndTax = 440
                where returnbuybilldetailid = 36;
UPDATE productunit SET proUnitBuyPrice  = 440 * productnumber WHERE productid = 1607;
UPDATE storedetail SET  productquantity = '-25', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1632';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1607', '1', '25', '1', '8', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-25', '1', '2026-10-07 20:22:26','0','0'); -- id=2826
UPDATE supplier SET  suppliercurrentDebt = '849040',suppliercurrentDebtInCurrency= '849040' , userid = '1', supplierdate = '2026-10-07 20:40:10'   WHERE supplierid = '26';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('26', '884045.00', '35005', '1', 'اضافة فاتورة مردوات مشتريات', '8', '849040', '2026-10-07 20:22:26', '1', 'returnBuyBillController.php', 'اضافة فاتورة مردوات مشتريات', '0','', '0','1','1','24005','1','884045','35005','849040','0',''); -- id=218
UPDATE save SET  savecurrentvalue = '-1462750',  userid = '1' WHERE saveid = '1';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('-1462750.00','0', '0', '1', 'اضافة فاتورة مردوات مشتريات', '8', '-1462750', '2026-10-07 20:22:26', '1',  'returnBuyBillController.php','0','','0'); -- id=167
UPDATE dailyentry SET totalcreditor = '24005.00', totaldebtor = '24005.00', thedate = '2026-10-07', userid = '1', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-07 20:30:16', entryComment = 'اضافة فاتورة مردود مشتريات رقم 6', fromFlag = '1',related='0',isopeningentry='0',operationId='6',operationDetailLink='returnBuyBillController.php?do=details&id=6' WHERE id = '1292';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '24005.00', '24005.00', '2026-10-07', '1', '0', '1292', '2026-10-07 20:40:10','تم عكس القيد رقم 1292 ','1','0','0','0','0',''); -- id=1294
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1294', '445', '24005.00', '','0'); -- id=1294
UPDATE accountstree SET name = 'الدولي - مورد', customName = 'الدولي - مورد', customNameEn = 'الدولي - مورد', nameEn = 'الدولي - مورد', parent = '81', accountNature = '1', theValue = '75250', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '445';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1294', '382', '24005.00', '','0'); -- id=1304
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18333043.04', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '35005', '35005', '2026-10-07', '1', '0', '0', '2026-10-07 20:40:10','اضافة فاتورة مردود مشتريات رقم 8','1','0',null,'0','8','returnBuyBillController.php?do=details&id=8'); -- id=1295
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1295', '445', '35005', '','0'); -- id=1305
UPDATE accountstree SET name = 'الدولي - مورد', customName = 'الدولي - مورد', customNameEn = 'الدولي - مورد', nameEn = 'الدولي - مورد', parent = '81', accountNature = '1', theValue = '40245', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '445';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1295', '382', '35005', '','0'); -- id=1295
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18298038.04', 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 returnbuybill set dailyentryid='1295,0' where returnbuybillid=8;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:10:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:40:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:40:10', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=editprint&id=8'); -- id=4193
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:10:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:40:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:40:16', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=6'); -- id=4194
UPDATE user SET loginip = "" WHERE userid = 1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:10:34";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:10:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:40:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 20:40:36', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4195
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:10:36";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 20:40:36', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4196
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:10:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:40:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:40:44', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4197
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:11:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:41:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:41:46', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4198
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('شورت جبردين فيراري 330','','102','310','330','330','330','2026-10-07','0','1','0','08980','0','0','0','0','0','310','310','310','310','310','0','6.45','0','0','.','0','0','0','310','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','310','310','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','310','0','0','0','0','0','0','','','0','0','0','0'); -- id=1608
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1608', '1.00', '2026-10-07', '1', '0','0160801','330','330','330','310','','0','0','0','0','0','0','0','0','0','0'); -- id=1608
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1608', '1', '0', '1', '2026-10-07'); -- id=1633
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1608', '1', '0', '0', '1608', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2827
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1608, 1,'2026-10-07 20:41:46',1)
                ON DUPLICATE KEY UPDATE productid = 1608, edited = 1, sysdate = '2026-10-07 20:41:46', userid = 1; -- id=2423
UPDATE product SET productName = 'شورت جبردين فيراري 330', productDescription = '', productCatId = '102', productBuyPrice = '310.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '08980',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '310',lastbuyprice_withDiscount = '310',meanbuyprice = '310',meanbuyprice_withDiscount = '310' , productbuypricereal = '310' , buypricereal_precentage = '0' , buytotal_precentage = '6.45' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='310',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='310',meanbuyprice_withTax='310',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='310',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1608';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:11:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:41:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:41:48', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4199
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:12:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:42:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-07 20:42:10', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php'); -- id=4200
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:13:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:43:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-07 20:43:03', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=show'); -- id=4201
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:13:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:43:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-07 20:43:52', '1', 'deleteFinaly', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=deleteFinaly&id=114&action=0'); -- id=4202
UPDATE supplier SET conditions = 2, suppliername = "فيراري -del"
		        WHERE supplierid =114 ;
UPDATE accountstree SET name = 'فيراري ', customName = 'فيراري ', customNameEn = 'فيراري ', nameEn = 'فيراري ', parent = '81', accountNature = '1', theValue = '0.00', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '1', sysdate = '2026-10-07 20:01:08' WHERE id = '597';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:13:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:43:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-07 20:43:53', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=sucess'); -- id=4203
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:13:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:43:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-07 20:43:54', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=show'); -- id=4204
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:14:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:44:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-07 20:44:04', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php'); -- id=4205
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:14:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:44:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:44:08', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=4206
BEGIN;
INSERT INTO returnbuybill (returnbuybillSerial, returnbuybilldate, returnbuybillsupplierid, returnbuybilltotaldeptbefor, returnbuybilltotaldeptafter, returnbuybilldiscount, returnbuybilldiscountrype, returnbuybilltotalbill, returnbuybillaftertotalbill, returnbuybilltotalpayed, returnbuybillfinalbill, returnbuybillstoreid, returnbuybillsysdate,comment, userid, conditions, returnbuybillclientname, returnbuybillsaveid, billnameid, returnbuybilldirectpayment,payedtax,costcenterid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,client,returnbuybilladdition,returnbuybilladditiontrype) VALUES ('06ac6840101e45', '2026-10-07 20:40:17', '87', '234000.00', '224700', '0', '0', '-9300.00', '-9300.00', '0', '-9300', '1', '2026-10-07 20:44:08', '', '1', '0', '', '1', '6','1','0.00','-1','0','1','0','0','0','0','0'); -- id=9
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('08980', '9', '102', '1608', '30', '310', '9300', '0', '', '1608','','','0','0','0','0','0','310','9300','0','0','0','0','0','0','0','1'); -- id=37
UPDATE product SET productName = 'شورت جبردين فيراري 330', productDescription = '', productCatId = '102', productBuyPrice = '310.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '08980',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '310',lastbuyprice_withDiscount = '310',meanbuyprice = '310',meanbuyprice_withDiscount = '310' , productbuypricereal = '310.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.45' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='310',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='310',meanbuyprice_withTax='310',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='310',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1608';
UPDATE returnbuybilldetail SET  lastbuyprice = 310 , meanbuyprice = 310, lastbuyprice_withDiscount = 310, meanbuyprice_withDiscount = 310
        , lastbuyprice_withTax = 310, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 310
                where returnbuybilldetailid = 37;
UPDATE productunit SET proUnitBuyPrice  = 310 * productnumber WHERE productid = 1608;
UPDATE storedetail SET  productquantity = '-30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1633';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1608', '1', '30', '1', '9', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-30', '1', '2026-10-07 20:40:17','0','0'); -- id=2828
UPDATE supplier SET  suppliercurrentDebt = '224700',suppliercurrentDebtInCurrency= '224700' , userid = '1', supplierdate = '2026-10-07 20:44:08'   WHERE supplierid = '87';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('87', '234000.00', '9300', '1', 'اضافة فاتورة مردوات مشتريات', '9', '224700', '2026-10-07 20:40:17', '1', 'returnBuyBillController.php', 'اضافة فاتورة مردوات مشتريات', '0','', '0','1','1','9300','1','234000','9300','224700','0',''); -- id=219
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '9300', '9300', '2026-10-07', '1', '0', '0', '2026-10-07 20:44:08','اضافة فاتورة مردود مشتريات رقم 9','1','0',null,'0','9','returnBuyBillController.php?do=details&id=9'); -- id=1296
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1296', '567', '9300', '','0'); -- id=1306
UPDATE accountstree SET name = 'فيراري - مورد', customName = 'فيراري - مورد', customNameEn = 'فيراري - مورد', nameEn = 'فيراري - مورد', parent = '81', accountNature = '1', theValue = '224700', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-05 19:15:51' WHERE id = '567';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1296', '382', '9300', '','0'); -- id=1296
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18288738.04', 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 returnbuybill set dailyentryid='1296,0' where returnbuybillid=9;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:14:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:44:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:44:08', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=editprint&id=9'); -- id=4207
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:14:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:44:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-07 20:44:11', '1', 'supplierShow2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php?do=supplierShow2'); -- id=4208
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:14:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:44:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:44:12', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=show'); -- id=4209
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:14:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:44:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:44:17', '1', 'editreturn', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editreturn&id=7'); -- id=4210
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:14:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:44:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:44:24', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=editprint&id=9'); -- id=4211
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:14:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:44:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:44:47', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4212
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:14:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:44:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 20:44:52', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=4213
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:15:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:45:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:45:12', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4214
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:15:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:45:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:45:59', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4215
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('شورت مورق جبردين فيلو','','31','270','295','295','295','2026-10-07','0','1','0','','0','0','0','0','0','270','270','270','270','270','0','9.26','0','0','.','0','0','0','270','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','270','270','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','270','0','0','0','0','0','0','','','0','0','0','0'); -- id=1609
UPDATE product SET productName = 'شورت مورق جبردين فيلو', productDescription = '', productCatId = '31', productBuyPrice = '270', productSellAllPrice = '295', productSellUnitPrice = '295', productSellHalfPrice = '295', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01609',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270',lastbuyprice_withDiscount = '270',meanbuyprice = '270',meanbuyprice_withDiscount = '270' , productbuypricereal = '270' , buypricereal_precentage = '0' , buytotal_precentage = '9.26' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='270',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1609';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1609', '1', '2026-10-07', '1', '0','0160901','295','295','295','270','','0','0','0','0','0','0','0','0','0','0'); -- id=1609
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1609', '1', '0', '1', '2026-10-07'); -- id=1634
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1609', '1', '0', '0', '1609', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2829
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1609, 1,'2026-10-07 20:45:59',1)
                ON DUPLICATE KEY UPDATE productid = 1609, edited = 1, sysdate = '2026-10-07 20:45:59', userid = 1; -- id=2424
UPDATE product SET productName = 'شورت مورق جبردين فيلو', productDescription = '', productCatId = '31', productBuyPrice = '270.00', productSellAllPrice = '295.00', productSellUnitPrice = '295.00', productSellHalfPrice = '295.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01609',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270',lastbuyprice_withDiscount = '270',meanbuyprice = '270',meanbuyprice_withDiscount = '270' , productbuypricereal = '270' , buypricereal_precentage = '0' , buytotal_precentage = '9.26' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='270',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1609';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:16:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:46:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:46:01', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4216
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:16:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:46:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:46:16', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=update'); -- id=4217
BEGIN;
UPDATE costcenterdetail SET del = 1 WHERE type in( 4) and  modelid = 7;
UPDATE returnbuybill SET  returnbuybillsysdate = '2026-10-07 20:46:16', userid = null,delbyuserid = '1', conditions = '1' WHERE returnbuybillid = '7';
UPDATE returnbuybilldetail SET  lastbuyprice = 410.00 , meanbuyprice = 410.00, lastbuyprice_withDiscount = 410.00, meanbuyprice_withDiscount = 410.00
        , lastbuyprice_withTax = 410.00, meanbuyprice_withTax = 410.00, lastbuyprice_withDiscountAndTax = 410.00
                where returnbuybilldetailid = 28;
UPDATE product SET productName = 'شورت باجي 6087 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '410.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09330',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410.00',meanbuyprice_withDiscount = '410' , productbuypricereal = '410.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.88' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1605';
UPDATE productunit SET proUnitBuyPrice  = 410 * productnumber WHERE productid = 1605;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1630';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1605', '1', '40', '0', '7', 'حذف فاتورة مردودات مشتريات', 'returnBuyBillController.php', '-40', '0', '1', '2026-10-07 20:30:19','0','0'); -- id=2830
UPDATE returnbuybilldetail SET  lastbuyprice = 420.00 , meanbuyprice = 420.00, lastbuyprice_withDiscount = 420.00, meanbuyprice_withDiscount = 420.00
        , lastbuyprice_withTax = 420.00, meanbuyprice_withTax = 420.00, lastbuyprice_withDiscountAndTax = 420.00
                where returnbuybilldetailid = 29;
UPDATE product SET productName = 'شورت باجي 6307 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '420.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09335',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420.00',meanbuyprice_withDiscount = '420' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.76' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1606';
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1606;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1631';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1606', '1', '9', '0', '7', 'حذف فاتورة مردودات مشتريات', 'returnBuyBillController.php', '-9', '0', '1', '2026-10-07 20:30:19','0','0'); -- id=2831
UPDATE supplier SET  suppliercurrentDebt = '1096452',suppliercurrentDebtInCurrency= '806945' , userid = '1', supplierdate = '2026-10-07 20:46:16'   WHERE supplierid = '6';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('6', '1076272.00', '20180', '0', 'حذف فاتورة مردودات مشتريات', '7', '1096452', '2026-10-07 20:30:19', '1', 'returnBuyBillController.php', 'حذف فاتورة مردودات مشتريات', '0','', '0','1','1','20180','1','786765','-20180','806945','0',''); -- id=220
UPDATE save SET  savecurrentvalue = '-1462750',  userid = '1' WHERE saveid = '1';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('-1462750.00','0', '1', '1', 'حذف فاتورة مردودات مشتريات', '7', '-1462750', '2026-10-07 20:30:19', '1',  'returnBuyBillController.php','0','','0'); -- id=168
INSERT INTO returnbuybill (returnbuybillSerial, returnbuybilldate, returnbuybillsupplierid, returnbuybilltotaldeptbefor, returnbuybilltotaldeptafter, returnbuybilldiscount, returnbuybilldiscountrype, returnbuybilltotalbill, returnbuybillaftertotalbill, returnbuybilltotalpayed, returnbuybillfinalbill, returnbuybillstoreid, returnbuybillsysdate,comment, userid, conditions, returnbuybillclientname, returnbuybillsaveid, billnameid, returnbuybilldirectpayment,deletedbuyid,controlname,payedtax,costcenterid,currencyId,taxOfDiscountPer,taxOfDiscountVal,client,returnbuybilladdition,returnbuybilladditiontrype) VALUES ('06ac681ab6c597', '2026-10-07 20:30:19', '6', '806945.00', '782715', '0', '0', '-24230.00', '-24230.00', '0.00', '-24230', '1', '2026-10-07 20:46:16', '', '1', '0', '', '1', '6' ,'1' ,'7','returnBuyBillController.php','0.00','-1','1','0','0','0','0','0'); -- id=10
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09330', '10', '31', '1605', '40.00', '410', '16400', '0.00', '', '1605','','','0','0','0','0','0','410','16400','0','0','0','0','0','0','0','1'); -- id=38
UPDATE product SET productName = 'شورت باجي 6087 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '410.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09330',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410',meanbuyprice_withDiscount = '410' , productbuypricereal = '410.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.88' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='205',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1605';
UPDATE returnbuybilldetail SET  lastbuyprice = 410 , meanbuyprice = 410, lastbuyprice_withDiscount = 410, meanbuyprice_withDiscount = 410
        , lastbuyprice_withTax = 410, meanbuyprice_withTax = 205, lastbuyprice_withDiscountAndTax = 410
                where returnbuybilldetailid = 38;
UPDATE productunit SET proUnitBuyPrice  = 410 * productnumber WHERE productid = 1605;
UPDATE storedetail SET  productquantity = '-40', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1630';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1605', '1', '40', '1', '10', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-40', '1', '2026-10-07 20:30:19','0','0'); -- id=2832
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09335', '10', '31', '1606', '9.00', '420', '3780', '0.00', '', '1606','','','0','0','0','0','0','420','3780','0','0','0','0','0','0','0','1'); -- id=39
UPDATE product SET productName = 'شورت باجي 6307 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '420.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09335',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.76' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='210',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1606';
UPDATE returnbuybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 420, meanbuyprice_withDiscount = 420
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 210, lastbuyprice_withDiscountAndTax = 420
                where returnbuybilldetailid = 39;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1606;
UPDATE storedetail SET  productquantity = '-9', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1631';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1606', '1', '9', '1', '10', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-9', '1', '2026-10-07 20:30:19','0','0'); -- id=2833
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01609', '10', '31', '1609', '15', '270', '4050', '0', '', '1609','','','0','0','0','0','0','270','4050','0','0','0','0','0','0','0','1'); -- id=40
UPDATE product SET productName = 'شورت مورق جبردين فيلو', productDescription = '', productCatId = '31', productBuyPrice = '270.00', productSellAllPrice = '295.00', productSellUnitPrice = '295.00', productSellHalfPrice = '295.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01609',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270',lastbuyprice_withDiscount = '270',meanbuyprice = '270',meanbuyprice_withDiscount = '270' , productbuypricereal = '270.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '9.26' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='270',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1609';
UPDATE returnbuybilldetail SET  lastbuyprice = 270 , meanbuyprice = 270, lastbuyprice_withDiscount = 270, meanbuyprice_withDiscount = 270
        , lastbuyprice_withTax = 270, meanbuyprice_withTax = 270, lastbuyprice_withDiscountAndTax = 270
                where returnbuybilldetailid = 40;
UPDATE productunit SET proUnitBuyPrice  = 270 * productnumber WHERE productid = 1609;
UPDATE storedetail SET  productquantity = '-15', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1634';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1609', '1', '15', '1', '10', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-15', '1', '2026-10-07 20:30:19','0','0'); -- id=2834
UPDATE supplier SET  suppliercurrentDebt = '1072222',suppliercurrentDebtInCurrency= '782715' , userid = '1', supplierdate = '2026-10-07 20:46:16'   WHERE supplierid = '6';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('6', '1096452.00', '24230', '1', 'اضافة فاتورة مردوات مشتريات', '10', '1072222', '2026-10-07 20:30:19', '1', 'returnBuyBillController.php', 'اضافة فاتورة مردوات مشتريات', '0','', '0','1','1','20180','1','806945','24230','782715','0',''); -- id=221
UPDATE save SET  savecurrentvalue = '-1462750',  userid = '1' WHERE saveid = '1';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('-1462750.00','0', '0', '1', 'اضافة فاتورة مردوات مشتريات', '10', '-1462750', '2026-10-07 20:30:19', '1',  'returnBuyBillController.php','0','','0'); -- id=169
UPDATE dailyentry SET totalcreditor = '20180.00', totaldebtor = '20180.00', thedate = '2026-10-07', userid = '1', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-07 20:34:04', entryComment = 'اضافة فاتورة مردود مشتريات رقم 7', fromFlag = '1',related='0',isopeningentry='0',operationId='7',operationDetailLink='returnBuyBillController.php?do=details&id=7' WHERE id = '1293';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '20180.00', '20180.00', '2026-10-07', '1', '0', '1293', '2026-10-07 20:46:16','تم عكس القيد رقم 1293 ','1','0','0','0','0',''); -- id=1297
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1297', '425', '20180.00', '','0'); -- id=1297
UPDATE accountstree SET name = 'فيلو - مورد', customName = 'فيلو - مورد', customNameEn = 'فيلو - مورد', nameEn = 'فيلو - مورد', parent = '81', accountNature = '1', theValue = '260915', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '425';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1297', '382', '20180.00', '','0'); -- id=1307
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18308918.04', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '24230', '24230', '2026-10-07', '1', '0', '0', '2026-10-07 20:46:16','اضافة فاتورة مردود مشتريات رقم 10','1','0',null,'0','10','returnBuyBillController.php?do=details&id=10'); -- id=1298
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1298', '425', '24230', '','0'); -- id=1308
UPDATE accountstree SET name = 'فيلو - مورد', customName = 'فيلو - مورد', customNameEn = 'فيلو - مورد', nameEn = 'فيلو - مورد', parent = '81', accountNature = '1', theValue = '236685', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '425';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1298', '382', '24230', '','0'); -- id=1298
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18284688.04', 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 returnbuybill set dailyentryid='1298,0' where returnbuybillid=10;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:16:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:46:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:46:16', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=editprint&id=10'); -- id=4218
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:16:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:46:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:46:22', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=6'); -- id=4219
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:16:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:46:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:46:51', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=6'); -- id=4220
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:17:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:47:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:47:00', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4221
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:17:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:47:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:47:32', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4222
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('شورت تطريز جوفا','','20','320','345','345','345','2026-10-07','0','1','0','','0','0','0','0','0','320','320','320','320','320','0','7.81','0','0','.','0','0','0','320','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','320','320','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','320','0','0','0','0','0','0','','','0','0','0','0'); -- id=1610
UPDATE product SET productName = 'شورت تطريز جوفا', productDescription = '', productCatId = '20', productBuyPrice = '320', productSellAllPrice = '345', productSellUnitPrice = '345', productSellHalfPrice = '345', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01610',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '7.81' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1610';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1610', '1', '2026-10-07', '1', '0','0161001','345','345','345','320','','0','0','0','0','0','0','0','0','0','0'); -- id=1610
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1610', '1', '0', '1', '2026-10-07'); -- id=1635
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1610', '1', '0', '0', '1610', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2835
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1610, 1,'2026-10-07 20:47:32',1)
                ON DUPLICATE KEY UPDATE productid = 1610, edited = 1, sysdate = '2026-10-07 20:47:32', userid = 1; -- id=2425
UPDATE product SET productName = 'شورت تطريز جوفا', productDescription = '', productCatId = '20', productBuyPrice = '320.00', productSellAllPrice = '345.00', productSellUnitPrice = '345.00', productSellHalfPrice = '345.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01610',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '7.81' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1610';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:17:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:47:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:47:34', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4223
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:17:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:47:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:47:50', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=4224
BEGIN;
INSERT INTO returnbuybill (returnbuybillSerial, returnbuybilldate, returnbuybillsupplierid, returnbuybilltotaldeptbefor, returnbuybilltotaldeptafter, returnbuybilldiscount, returnbuybilldiscountrype, returnbuybilltotalbill, returnbuybillaftertotalbill, returnbuybilltotalpayed, returnbuybillfinalbill, returnbuybillstoreid, returnbuybillsysdate,comment, userid, conditions, returnbuybillclientname, returnbuybillsaveid, billnameid, returnbuybilldirectpayment,payedtax,costcenterid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,client,returnbuybilladdition,returnbuybilladditiontrype) VALUES ('06ac6856e6eedb', '2026-10-07 20:46:22', '69', '546030.00', '539630', '0', '0', '-6400.00', '-6400.00', '0', '-6400', '1', '2026-10-07 20:47:50', '', '1', '0', '', '1', '6','1','0.00','-1','0','1','0','0','0','0','0'); -- id=11
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01610', '11', '20', '1610', '20', '320', '6400', '0', '', '1610','','','0','0','0','0','0','320','6400','0','0','0','0','0','0','0','1'); -- id=41
UPDATE product SET productName = 'شورت تطريز جوفا', productDescription = '', productCatId = '20', productBuyPrice = '320.00', productSellAllPrice = '345.00', productSellUnitPrice = '345.00', productSellHalfPrice = '345.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01610',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '7.81' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1610';
UPDATE returnbuybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 320, meanbuyprice_withDiscount = 320
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 320
                where returnbuybilldetailid = 41;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1610;
UPDATE storedetail SET  productquantity = '-20', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1635';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1610', '1', '20', '1', '11', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-20', '1', '2026-10-07 20:46:22','0','0'); -- id=2836
UPDATE supplier SET  suppliercurrentDebt = '149940',suppliercurrentDebtInCurrency= '539630' , userid = '1', supplierdate = '2026-10-07 20:47:50'   WHERE supplierid = '69';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('69', '156340.00', '6400', '1', 'اضافة فاتورة مردوات مشتريات', '11', '149940', '2026-10-07 20:46:22', '1', 'returnBuyBillController.php', 'اضافة فاتورة مردوات مشتريات', '0','', '0','1','1','6400','1','546030','6400','539630','0',''); -- id=222
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '6400', '6400', '2026-10-07', '1', '0', '0', '2026-10-07 20:47:50','اضافة فاتورة مردود مشتريات رقم 11','1','0',null,'0','11','returnBuyBillController.php?do=details&id=11'); -- id=1299
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1299', '488', '6400', '','0'); -- id=1309
UPDATE accountstree SET name = 'جوفا - مورد', customName = 'جوفا - مورد', customNameEn = 'جوفا - مورد', nameEn = 'جوفا - مورد', parent = '81', accountNature = '1', theValue = '-6400', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '488';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1299', '382', '6400', '','0'); -- id=1299
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18278288.04', 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 returnbuybill set dailyentryid='1299,0' where returnbuybillid=11;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:17:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:47:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:47:50', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=editprint&id=11'); -- id=4225
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:17:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:47:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:47:59', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=6'); -- id=4226
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:18:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:48:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:48:58', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=4227
BEGIN;
INSERT INTO returnbuybill (returnbuybillSerial, returnbuybilldate, returnbuybillsupplierid, returnbuybilltotaldeptbefor, returnbuybilltotaldeptafter, returnbuybilldiscount, returnbuybilldiscountrype, returnbuybilltotalbill, returnbuybillaftertotalbill, returnbuybilltotalpayed, returnbuybillfinalbill, returnbuybillstoreid, returnbuybillsysdate,comment, userid, conditions, returnbuybillclientname, returnbuybillsaveid, billnameid, returnbuybilldirectpayment,payedtax,costcenterid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,client,returnbuybilladdition,returnbuybilladditiontrype) VALUES ('06ac685cf9269a', '2026-10-07 20:47:59', '24', '546030.00', '543030', '0', '0', '-3000.00', '-3000.00', '0', '-3000', '1', '2026-10-07 20:48:59', '', '1', '0', '', '1', '6','1','0.00','-1','0','1','0','0','0','0','0'); -- id=12
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('08675', '12', '34', '1060', '8', '375', '3000', '0', '', '1060','','','0','0','0','0','0','375','3000','0','0','0','0','0','0','0','1'); -- id=42
UPDATE product SET productName = 'شورت سلوشي 1640 مارادونا', productDescription = '', productCatId = '34', productBuyPrice = '375.00', productSellAllPrice = '395.00', productSellUnitPrice = '0.00', productSellHalfPrice = '0.00', productDate = '2026-09-27', conditions = '0', userId = '1', limitamount = '0', parcode = '08675',type ='0', expireDate = '0' , dailyentryId = '415',isService = '0',isOptic = '0',lastbuyprice = '375',lastbuyprice_withDiscount = '375',meanbuyprice = '375.00',meanbuyprice_withDiscount = '375' , productbuypricereal = '375.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='375',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='8675',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='375',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='1',sellpercenttype='0',searchfiltersid='1',lastbuyprice_withDiscountAndTax='375',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='1',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1060';
UPDATE returnbuybilldetail SET  lastbuyprice = 375 , meanbuyprice = 375.00, lastbuyprice_withDiscount = 375, meanbuyprice_withDiscount = 375.00
        , lastbuyprice_withTax = 375, lastbuyprice_withDiscountAndTax = 375
                where returnbuybilldetailid = 42;
UPDATE productunit SET proUnitBuyPrice  = 375 * productnumber WHERE productid = 1060;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1060';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1060', '1', '8', '1', '12', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '8', '0', '1', '2026-10-07 20:47:59','0','0'); -- id=2837
UPDATE supplier SET  suppliercurrentDebt = '311860',suppliercurrentDebtInCurrency= '543030' , userid = '1', supplierdate = '2026-10-07 20:48:59'   WHERE supplierid = '24';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('24', '314860.00', '3000', '1', 'اضافة فاتورة مردوات مشتريات', '12', '311860', '2026-10-07 20:47:59', '1', 'returnBuyBillController.php', 'اضافة فاتورة مردوات مشتريات', '0','', '0','1','1','3000','1','546030','3000','543030','0',''); -- id=223
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3000', '3000', '2026-10-07', '1', '0', '0', '2026-10-07 20:48:59','اضافة فاتورة مردود مشتريات رقم 12','1','0',null,'0','12','returnBuyBillController.php?do=details&id=12'); -- id=1300
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1300', '443', '3000', '','0'); -- id=1310
UPDATE accountstree SET name = 'مارادونا - مورد', customName = 'مارادونا - مورد', customNameEn = 'مارادونا - مورد', nameEn = 'مارادونا - مورد', parent = '81', accountNature = '1', theValue = '-3000', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '443';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1300', '382', '3000', '','0'); -- id=1300
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18275288.04', 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 returnbuybill set dailyentryid='1300,0' where returnbuybillid=12;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:18:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:48:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:48:59', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=editprint&id=12'); -- id=4228
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:19:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:49:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:49:07', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=show'); -- id=4229
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:19:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:49:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:49:13', '1', 'editreturn', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editreturn&id=10'); -- id=4230
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:19:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:49:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:49:25', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4231
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:19:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:49:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 20:49:40', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=4232
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('احمد شعبان','2026-10-07','','96', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=119
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (119, 1,'2026-10-07 20:49:40',1)
                ON DUPLICATE KEY UPDATE catid = 119, edited = 1, sysdate = '2026-10-07 20:49:40', userid = 1; -- id=122
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '119', '1', '2026-10-07', '1', '0'); -- id=34
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:19:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:49:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 20:49:41', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=4233
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:19:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:49:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 20:49:42', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=4234
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:19:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:49:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:49:47', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4235
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('شورت باجي 6302 فيلو','','31','430','450','450','450','2026-10-07','0','1','0','09012','0','0','0','0','0','430','430','430','430','430','0','4.65','0','0','.','0','0','0','430','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','430','430','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','430','0','0','0','0','0','0','','','0','0','0','0'); -- id=1611
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1611', '1', '2026-10-07', '1', '0','0161101','450','450','450','430','','0','0','0','0','0','0','0','0','0','0'); -- id=1611
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1611', '1', '0', '1', '2026-10-07'); -- id=1636
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1611', '1', '0', '0', '1611', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2838
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1611, 1,'2026-10-07 20:49:47',1)
                ON DUPLICATE KEY UPDATE productid = 1611, edited = 1, sysdate = '2026-10-07 20:49:47', userid = 1; -- id=2426
UPDATE product SET productName = 'شورت باجي 6302 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09012',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430' , buypricereal_precentage = '0' , buytotal_precentage = '4.65' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1611';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:19:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:49:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:49:47', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4236
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:19:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:49:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:49:49', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4237
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:20:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:50:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:50:01', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=update'); -- id=4238
BEGIN;
UPDATE costcenterdetail SET del = 1 WHERE type in( 4) and  modelid = 10;
UPDATE returnbuybill SET  returnbuybillsysdate = '2026-10-07 20:50:01', userid = null,delbyuserid = '1', conditions = '1' WHERE returnbuybillid = '10';
UPDATE returnbuybilldetail SET  lastbuyprice = 410.00 , meanbuyprice = 410.00, lastbuyprice_withDiscount = 410.00, meanbuyprice_withDiscount = 410.00
        , lastbuyprice_withTax = 410.00, meanbuyprice_withTax = 205.00, lastbuyprice_withDiscountAndTax = 410.00
                where returnbuybilldetailid = 38;
UPDATE product SET productName = 'شورت باجي 6087 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '410.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09330',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410.00',meanbuyprice_withDiscount = '410' , productbuypricereal = '410.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.88' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1605';
UPDATE productunit SET proUnitBuyPrice  = 410 * productnumber WHERE productid = 1605;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1630';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1605', '1', '40', '0', '10', 'حذف فاتورة مردودات مشتريات', 'returnBuyBillController.php', '-40', '0', '1', '2026-10-07 20:30:19','0','0'); -- id=2839
UPDATE returnbuybilldetail SET  lastbuyprice = 420.00 , meanbuyprice = 420.00, lastbuyprice_withDiscount = 420.00, meanbuyprice_withDiscount = 420.00
        , lastbuyprice_withTax = 420.00, meanbuyprice_withTax = 210.00, lastbuyprice_withDiscountAndTax = 420.00
                where returnbuybilldetailid = 39;
UPDATE product SET productName = 'شورت باجي 6307 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '420.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09335',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420.00',meanbuyprice_withDiscount = '420' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.76' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1606';
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1606;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1631';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1606', '1', '9', '0', '10', 'حذف فاتورة مردودات مشتريات', 'returnBuyBillController.php', '-9', '0', '1', '2026-10-07 20:30:19','0','0'); -- id=2840
UPDATE returnbuybilldetail SET  lastbuyprice = 270.00 , meanbuyprice = 270.00, lastbuyprice_withDiscount = 270.00, meanbuyprice_withDiscount = 270.00
        , lastbuyprice_withTax = 270.00, meanbuyprice_withTax = 270.00, lastbuyprice_withDiscountAndTax = 270.00
                where returnbuybilldetailid = 40;
UPDATE product SET productName = 'شورت مورق جبردين فيلو', productDescription = '', productCatId = '31', productBuyPrice = '270.00', productSellAllPrice = '295.00', productSellUnitPrice = '295.00', productSellHalfPrice = '295.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01609',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270',lastbuyprice_withDiscount = '270',meanbuyprice = '270.00',meanbuyprice_withDiscount = '270' , productbuypricereal = '270.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '9.26' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1609';
UPDATE productunit SET proUnitBuyPrice  = 270 * productnumber WHERE productid = 1609;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1634';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1609', '1', '15', '0', '10', 'حذف فاتورة مردودات مشتريات', 'returnBuyBillController.php', '-15', '0', '1', '2026-10-07 20:30:19','0','0'); -- id=2841
UPDATE supplier SET  suppliercurrentDebt = '1096452',suppliercurrentDebtInCurrency= '806945' , userid = '1', supplierdate = '2026-10-07 20:50:01'   WHERE supplierid = '6';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('6', '1072222.00', '24230', '0', 'حذف فاتورة مردودات مشتريات', '10', '1096452', '2026-10-07 20:30:19', '1', 'returnBuyBillController.php', 'حذف فاتورة مردودات مشتريات', '0','', '0','1','1','24230','1','782715','-24230','806945','0',''); -- id=224
UPDATE save SET  savecurrentvalue = '-1462750',  userid = '1' WHERE saveid = '1';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('-1462750.00','0', '1', '1', 'حذف فاتورة مردودات مشتريات', '10', '-1462750', '2026-10-07 20:30:19', '1',  'returnBuyBillController.php','0','','0'); -- id=170
INSERT INTO returnbuybill (returnbuybillSerial, returnbuybilldate, returnbuybillsupplierid, returnbuybilltotaldeptbefor, returnbuybilltotaldeptafter, returnbuybilldiscount, returnbuybilldiscountrype, returnbuybilltotalbill, returnbuybillaftertotalbill, returnbuybilltotalpayed, returnbuybillfinalbill, returnbuybillstoreid, returnbuybillsysdate,comment, userid, conditions, returnbuybillclientname, returnbuybillsaveid, billnameid, returnbuybilldirectpayment,deletedbuyid,controlname,payedtax,costcenterid,currencyId,taxOfDiscountPer,taxOfDiscountVal,client,returnbuybilladdition,returnbuybilladditiontrype) VALUES ('06ac681ab6c597', '2026-10-07 20:30:19', '6', '806945.00', '780135', '0', '0', '-26810.00', '-26810.00', '0.00', '-26810', '1', '2026-10-07 20:50:01', '', '1', '0', '', '1', '6' ,'1' ,'10','returnBuyBillController.php','0.00','-1','1','0','0','0','0','0'); -- id=13
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09330', '13', '31', '1605', '40.00', '410', '16400', '0.00', '', '1605','','','0','0','0','0','0','410','16400','0','0','0','0','0','0','0','1'); -- id=43
UPDATE product SET productName = 'شورت باجي 6087 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '410.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09330',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '410',lastbuyprice_withDiscount = '410',meanbuyprice = '410',meanbuyprice_withDiscount = '410' , productbuypricereal = '410.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.88' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='410',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='410',meanbuyprice_withTax='205',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='410',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1605';
UPDATE returnbuybilldetail SET  lastbuyprice = 410 , meanbuyprice = 410, lastbuyprice_withDiscount = 410, meanbuyprice_withDiscount = 410
        , lastbuyprice_withTax = 410, meanbuyprice_withTax = 205, lastbuyprice_withDiscountAndTax = 410
                where returnbuybilldetailid = 43;
UPDATE productunit SET proUnitBuyPrice  = 410 * productnumber WHERE productid = 1605;
UPDATE storedetail SET  productquantity = '-40', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1630';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1605', '1', '40', '1', '13', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-40', '1', '2026-10-07 20:30:19','0','0'); -- id=2842
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09335', '13', '31', '1606', '9.00', '420', '3780', '0.00', '', '1606','','','0','0','0','0','0','420','3780','0','0','0','0','0','0','0','1'); -- id=44
UPDATE product SET productName = 'شورت باجي 6307 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '420.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09335',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '420',lastbuyprice_withDiscount = '420',meanbuyprice = '420',meanbuyprice_withDiscount = '420' , productbuypricereal = '420.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.76' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='210',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1606';
UPDATE returnbuybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 420, meanbuyprice_withDiscount = 420
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 210, lastbuyprice_withDiscountAndTax = 420
                where returnbuybilldetailid = 44;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1606;
UPDATE storedetail SET  productquantity = '-9', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1631';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1606', '1', '9', '1', '13', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-9', '1', '2026-10-07 20:30:19','0','0'); -- id=2843
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01609', '13', '31', '1609', '15.00', '270', '4050', '0.00', '', '1609','','','0','0','0','0','0','270','4050','0','0','0','0','0','0','0','1'); -- id=45
UPDATE product SET productName = 'شورت مورق جبردين فيلو', productDescription = '', productCatId = '31', productBuyPrice = '270.00', productSellAllPrice = '295.00', productSellUnitPrice = '295.00', productSellHalfPrice = '295.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01609',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '270',lastbuyprice_withDiscount = '270',meanbuyprice = '270',meanbuyprice_withDiscount = '270' , productbuypricereal = '270.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '9.26' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='270',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='270',meanbuyprice_withTax='135',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='270',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1609';
UPDATE returnbuybilldetail SET  lastbuyprice = 270 , meanbuyprice = 270, lastbuyprice_withDiscount = 270, meanbuyprice_withDiscount = 270
        , lastbuyprice_withTax = 270, meanbuyprice_withTax = 135, lastbuyprice_withDiscountAndTax = 270
                where returnbuybilldetailid = 45;
UPDATE productunit SET proUnitBuyPrice  = 270 * productnumber WHERE productid = 1609;
UPDATE storedetail SET  productquantity = '-15', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1634';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1609', '1', '15', '1', '13', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-15', '1', '2026-10-07 20:30:19','0','0'); -- id=2844
INSERT INTO returnbuybilldetail (Parcode, returnbuybillid, returnbuybilldetailcatid, returnbuybilldetailproductid, returnbuybilldetailquantity, returnbuybilldetailprice, returnbuybilldetailtotalprice, discountvalue, note, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid, returnbuybilldetailpriceC, returnbuybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09012', '13', '31', '1611', '6', '430', '2580', '0', '', '1611','','','0','0','0','0','0','430','2580','0','0','0','0','0','0','0','1'); -- id=46
UPDATE product SET productName = 'شورت باجي 6302 فيلو', productDescription = '', productCatId = '31', productBuyPrice = '430.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '09012',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '430',lastbuyprice_withDiscount = '430',meanbuyprice = '430',meanbuyprice_withDiscount = '430' , productbuypricereal = '430.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '4.65' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='430',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='430',meanbuyprice_withTax='430',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='430',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1611';
UPDATE returnbuybilldetail SET  lastbuyprice = 430 , meanbuyprice = 430, lastbuyprice_withDiscount = 430, meanbuyprice_withDiscount = 430
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 430, lastbuyprice_withDiscountAndTax = 430
                where returnbuybilldetailid = 46;
UPDATE productunit SET proUnitBuyPrice  = 430 * productnumber WHERE productid = 1611;
UPDATE storedetail SET  productquantity = '-6', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1636';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1611', '1', '6', '1', '13', 'اضافة فاتورة مردودات مشتريات', 'returnBuyBillController.php', '0', '-6', '1', '2026-10-07 20:30:19','0','0'); -- id=2845
UPDATE supplier SET  suppliercurrentDebt = '1069642',suppliercurrentDebtInCurrency= '780135' , userid = '1', supplierdate = '2026-10-07 20:50:01'   WHERE supplierid = '6';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('6', '1096452.00', '26810', '1', 'اضافة فاتورة مردوات مشتريات', '13', '1069642', '2026-10-07 20:30:19', '1', 'returnBuyBillController.php', 'اضافة فاتورة مردوات مشتريات', '0','', '0','1','1','24230','1','806945','26810','780135','0',''); -- id=225
UPDATE save SET  savecurrentvalue = '-1462750',  userid = '1' WHERE saveid = '1';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('-1462750.00','0', '0', '1', 'اضافة فاتورة مردوات مشتريات', '13', '-1462750', '2026-10-07 20:30:19', '1',  'returnBuyBillController.php','0','','0'); -- id=171
UPDATE dailyentry SET totalcreditor = '24230.00', totaldebtor = '24230.00', thedate = '2026-10-07', userid = '1', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-07 20:46:16', entryComment = 'اضافة فاتورة مردود مشتريات رقم 10', fromFlag = '1',related='0',isopeningentry='0',operationId='10',operationDetailLink='returnBuyBillController.php?do=details&id=10' WHERE id = '1298';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '24230.00', '24230.00', '2026-10-07', '1', '0', '1298', '2026-10-07 20:50:01','تم عكس القيد رقم 1298 ','1','0','0','0','0',''); -- id=1301
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1301', '425', '24230.00', '','0'); -- id=1301
UPDATE accountstree SET name = 'فيلو - مورد', customName = 'فيلو - مورد', customNameEn = 'فيلو - مورد', nameEn = 'فيلو - مورد', parent = '81', accountNature = '1', theValue = '260915', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '425';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1301', '382', '24230.00', '','0'); -- id=1311
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18299518.04', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '26810', '26810', '2026-10-07', '1', '0', '0', '2026-10-07 20:50:01','اضافة فاتورة مردود مشتريات رقم 13','1','0',null,'0','13','returnBuyBillController.php?do=details&id=13'); -- id=1302
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1302', '425', '26810', '','0'); -- id=1312
UPDATE accountstree SET name = 'فيلو - مورد', customName = 'فيلو - مورد', customNameEn = 'فيلو - مورد', nameEn = 'فيلو - مورد', parent = '81', accountNature = '1', theValue = '234105', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '425';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1302', '382', '26810', '','0'); -- id=1302
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18272708.04', 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 returnbuybill set dailyentryid='1302,0' where returnbuybillid=13;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:20:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:50:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 20:50:01', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=editprint&id=13'); -- id=4239
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:21:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:51:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-07 20:51:05', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=4240
UPDATE user SET loginip = "" WHERE userid = 1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:23:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:53:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:53:18', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4241
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('قميص جينز مطبوع ','','119','330','330','330','330','2026-10-07','0','1','0','','0','0','0','0','0','330','330','330','330','330','0','0','0','0','.','0','0','0','330','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','330','330','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','330','0','0','0','0','0','0','','','0','0','0','0'); -- id=1612
UPDATE product SET productName = 'قميص جينز مطبوع ', productDescription = '', productCatId = '119', productBuyPrice = '330', productSellAllPrice = '330', productSellUnitPrice = '330', productSellHalfPrice = '330', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01612',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1612';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1612', '1.00', '2026-10-07', '1', '0','0161201','330','330','330','330','','0','0','0','0','0','0','0','0','0','0'); -- id=1612
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1612', '1', '0', '1', '2026-10-07'); -- id=1637
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1612', '1', '0', '0', '1612', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2846
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1612, 1,'2026-10-07 20:53:18',1)
                ON DUPLICATE KEY UPDATE productid = 1612, edited = 1, sysdate = '2026-10-07 20:53:18', userid = 1; -- id=2427
UPDATE product SET productName = 'قميص جينز مطبوع ', productDescription = '', productCatId = '119', productBuyPrice = '330.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01612',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1612';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('قميص دبل فيس ليزر كابسين','','119','330','330','330','330','2026-10-07','0','1','0','','0','0','0','0','0','330','330','330','330','330','0','0','0','0','.','0','0','0','330','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','330','330','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','330','0','0','0','0','0','0','','','0','0','0','0'); -- id=1613
UPDATE product SET productName = 'قميص دبل فيس ليزر كابسين', productDescription = '', productCatId = '119', productBuyPrice = '330', productSellAllPrice = '330', productSellUnitPrice = '330', productSellHalfPrice = '330', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01613',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1613';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1613', '1.00', '2026-10-07', '1', '0','0161301','330','330','330','330','','0','0','0','0','0','0','0','0','0','0'); -- id=1613
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1613', '1', '0', '1', '2026-10-07'); -- id=1638
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1613', '1', '0', '0', '1613', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2847
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1613, 1,'2026-10-07 20:53:18',1)
                ON DUPLICATE KEY UPDATE productid = 1613, edited = 1, sysdate = '2026-10-07 20:53:18', userid = 1; -- id=2428
UPDATE product SET productName = 'قميص دبل فيس ليزر كابسين', productDescription = '', productCatId = '119', productBuyPrice = '330.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01613',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1613';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('دبل فيس ليزر 2 جيب','','119','350','350','350','350','2026-10-07','0','1','0','','0','0','0','0','0','350','350','350','350','350','0','0','0','0','.','0','0','0','350','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','350','350','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','350','0','0','0','0','0','0','','','0','0','0','0'); -- id=1614
UPDATE product SET productName = 'دبل فيس ليزر 2 جيب', productDescription = '', productCatId = '119', productBuyPrice = '350', productSellAllPrice = '350', productSellUnitPrice = '350', productSellHalfPrice = '350', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01614',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '350',lastbuyprice_withDiscount = '350',meanbuyprice = '350',meanbuyprice_withDiscount = '350' , productbuypricereal = '350' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='350',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='350',meanbuyprice_withTax='350',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='350',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1614';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1614', '1.00', '2026-10-07', '1', '0','0161401','350','350','350','350','','0','0','0','0','0','0','0','0','0','0'); -- id=1614
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1614', '1', '0', '1', '2026-10-07'); -- id=1639
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1614', '1', '0', '0', '1614', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2848
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1614, 1,'2026-10-07 20:53:18',1)
                ON DUPLICATE KEY UPDATE productid = 1614, edited = 1, sysdate = '2026-10-07 20:53:18', userid = 1; -- id=2429
UPDATE product SET productName = 'دبل فيس ليزر 2 جيب', productDescription = '', productCatId = '119', productBuyPrice = '350.00', productSellAllPrice = '350.00', productSellUnitPrice = '350.00', productSellHalfPrice = '350.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01614',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '350',lastbuyprice_withDiscount = '350',meanbuyprice = '350',meanbuyprice_withDiscount = '350' , productbuypricereal = '350' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='350',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='350',meanbuyprice_withTax='350',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='350',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1614';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('محجر باندا ','','119','290','290','290','290','2026-10-07','0','1','0','','0','0','0','0','0','290','290','290','290','290','0','0','0','0','.','0','0','0','290','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','290','290','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','290','0','0','0','0','0','0','','','0','0','0','0'); -- id=1615
UPDATE product SET productName = 'محجر باندا ', productDescription = '', productCatId = '119', productBuyPrice = '290', productSellAllPrice = '290', productSellUnitPrice = '290', productSellHalfPrice = '290', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01615',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '290',lastbuyprice_withDiscount = '290',meanbuyprice = '290',meanbuyprice_withDiscount = '290' , productbuypricereal = '290' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='290',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='290',meanbuyprice_withTax='290',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='290',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1615';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1615', '1.00', '2026-10-07', '1', '0','0161501','290','290','290','290','','0','0','0','0','0','0','0','0','0','0'); -- id=1615
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1615', '1', '0', '1', '2026-10-07'); -- id=1640
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1615', '1', '0', '0', '1615', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2849
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1615, 1,'2026-10-07 20:53:18',1)
                ON DUPLICATE KEY UPDATE productid = 1615, edited = 1, sysdate = '2026-10-07 20:53:18', userid = 1; -- id=2430
UPDATE product SET productName = 'محجر باندا ', productDescription = '', productCatId = '119', productBuyPrice = '290.00', productSellAllPrice = '290.00', productSellUnitPrice = '290.00', productSellHalfPrice = '290.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01615',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '290',lastbuyprice_withDiscount = '290',meanbuyprice = '290',meanbuyprice_withDiscount = '290' , productbuypricereal = '290' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='290',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='290',meanbuyprice_withTax='290',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='290',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1615';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('محجر 2 جيب قميص','','119','310','310','310','310','2026-10-07','0','1','0','','0','0','0','0','0','310','310','310','310','310','0','0','0','0','.','0','0','0','310','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','310','310','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','310','0','0','0','0','0','0','','','0','0','0','0'); -- id=1616
UPDATE product SET productName = 'محجر 2 جيب قميص', productDescription = '', productCatId = '119', productBuyPrice = '310', productSellAllPrice = '310', productSellUnitPrice = '310', productSellHalfPrice = '310', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01616',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '310',lastbuyprice_withDiscount = '310',meanbuyprice = '310',meanbuyprice_withDiscount = '310' , productbuypricereal = '310' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='310',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='310',meanbuyprice_withTax='310',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='310',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1616';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1616', '1.00', '2026-10-07', '1', '0','0161601','310','310','310','310','','0','0','0','0','0','0','0','0','0','0'); -- id=1616
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1616', '1', '0', '1', '2026-10-07'); -- id=1641
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1616', '1', '0', '0', '1616', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2850
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1616, 1,'2026-10-07 20:53:18',1)
                ON DUPLICATE KEY UPDATE productid = 1616, edited = 1, sysdate = '2026-10-07 20:53:18', userid = 1; -- id=2431
UPDATE product SET productName = 'محجر 2 جيب قميص', productDescription = '', productCatId = '119', productBuyPrice = '310.00', productSellAllPrice = '310.00', productSellUnitPrice = '310.00', productSellHalfPrice = '310.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01616',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '310',lastbuyprice_withDiscount = '310',meanbuyprice = '310',meanbuyprice_withDiscount = '310' , productbuypricereal = '310' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='310',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='310',meanbuyprice_withTax='310',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='310',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1616';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('قميص جبردين جيب ','','119','300','300','300','300','2026-10-07','0','1','0','','0','0','0','0','0','300','300','300','300','300','0','0','0','0','.','0','0','0','300','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','300','300','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','300','0','0','0','0','0','0','','','0','0','0','0'); -- id=1617
UPDATE product SET productName = 'قميص جبردين جيب ', productDescription = '', productCatId = '119', productBuyPrice = '300', productSellAllPrice = '300', productSellUnitPrice = '300', productSellHalfPrice = '300', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01617',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '300',lastbuyprice_withDiscount = '300',meanbuyprice = '300',meanbuyprice_withDiscount = '300' , productbuypricereal = '300' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='300',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='300',meanbuyprice_withTax='300',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='300',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1617';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1617', '1.00', '2026-10-07', '1', '0','0161701','300','300','300','300','','0','0','0','0','0','0','0','0','0','0'); -- id=1617
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1617', '1', '0', '1', '2026-10-07'); -- id=1642
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1617', '1', '0', '0', '1617', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2851
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1617, 1,'2026-10-07 20:53:18',1)
                ON DUPLICATE KEY UPDATE productid = 1617, edited = 1, sysdate = '2026-10-07 20:53:18', userid = 1; -- id=2432
UPDATE product SET productName = 'قميص جبردين جيب ', productDescription = '', productCatId = '119', productBuyPrice = '300.00', productSellAllPrice = '300.00', productSellUnitPrice = '300.00', productSellHalfPrice = '300.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01617',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '300',lastbuyprice_withDiscount = '300',meanbuyprice = '300',meanbuyprice_withDiscount = '300' , productbuypricereal = '300' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='300',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='300',meanbuyprice_withTax='300',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='300',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1617';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('قميص جينز محجر تطريز','','119','320','320','320','320','2026-10-07','0','1','0','','0','0','0','0','0','320','320','320','320','320','0','0','0','0','.','0','0','0','320','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','320','320','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','320','0','0','0','0','0','0','','','0','0','0','0'); -- id=1618
UPDATE product SET productName = 'قميص جينز محجر تطريز', productDescription = '', productCatId = '119', productBuyPrice = '320', productSellAllPrice = '320', productSellUnitPrice = '320', productSellHalfPrice = '320', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01618',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1618';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1618', '1.00', '2026-10-07', '1', '0','0161801','320','320','320','320','','0','0','0','0','0','0','0','0','0','0'); -- id=1618
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1618', '1', '0', '1', '2026-10-07'); -- id=1643
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1618', '1', '0', '0', '1618', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2852
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1618, 1,'2026-10-07 20:53:19',1)
                ON DUPLICATE KEY UPDATE productid = 1618, edited = 1, sysdate = '2026-10-07 20:53:19', userid = 1; -- id=2433
UPDATE product SET productName = 'قميص جينز محجر تطريز', productDescription = '', productCatId = '119', productBuyPrice = '320.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01618',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1618';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('قميص بولن 3 جيب','','119','275','275','275','275','2026-10-07','0','1','0','','0','0','0','0','0','275','275','275','275','275','0','0','0','0','.','0','0','0','275','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','275','275','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','275','0','0','0','0','0','0','','','0','0','0','0'); -- id=1619
UPDATE product SET productName = 'قميص بولن 3 جيب', productDescription = '', productCatId = '119', productBuyPrice = '275', productSellAllPrice = '275', productSellUnitPrice = '275', productSellHalfPrice = '275', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01619',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '275',lastbuyprice_withDiscount = '275',meanbuyprice = '275',meanbuyprice_withDiscount = '275' , productbuypricereal = '275' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='275',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='275',meanbuyprice_withTax='275',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='275',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1619';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1619', '1.00', '2026-10-07', '1', '0','0161901','275','275','275','275','','0','0','0','0','0','0','0','0','0','0'); -- id=1619
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1619', '1', '0', '1', '2026-10-07'); -- id=1644
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1619', '1', '0', '0', '1619', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2853
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1619, 1,'2026-10-07 20:53:19',1)
                ON DUPLICATE KEY UPDATE productid = 1619, edited = 1, sysdate = '2026-10-07 20:53:19', userid = 1; -- id=2434
UPDATE product SET productName = 'قميص بولن 3 جيب', productDescription = '', productCatId = '119', productBuyPrice = '275.00', productSellAllPrice = '275.00', productSellUnitPrice = '275.00', productSellHalfPrice = '275.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01619',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '275',lastbuyprice_withDiscount = '275',meanbuyprice = '275',meanbuyprice_withDiscount = '275' , productbuypricereal = '275' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='275',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='275',meanbuyprice_withTax='275',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='275',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1619';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:23:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:53:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:53:20', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4242
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:23:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:53:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:53:39', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=4243
INSERT INTO supplier (suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate, dailyentryid, category_id, typesupplier_id,linkedClientId,inUse,suppliercode,goverareaid,namepayeecheck,suppliermobile,warrantyOfficer,warrantymobile,sellername,sellermobile,taxnumber,supplierTypeForTree,treeId,sullpierCurrencyid,suppliercurrentDebtInCurrency,webApiId,shippingDiscountPer) VALUES ('احمد شعبان', '', '', '', '', '0', '1', '2026-10-07 20:56:58', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=116
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('116', '0', '', '0', 'إضافة مورد جديد', '116', '', '2026-10-07 20:56:58', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=226
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('احمد شعبان', 'احمد شعبان', 'احمد شعبان', 'احمد شعبان', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-07 20:56:58'); -- id=599
UPDATE supplier SET suppliername = 'احمد شعبان', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-07', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='599',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '116';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:27:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:57:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:57:06', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=4244
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac6872341e43', '2026-10-07 20:53:39', '116', '0.00', '231343.2', '8', '1', '251460.00',  '231343.20', '0', '231343.2', '1', '2026-10-07 20:57:06', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=61
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01612', '61', '119', '1612', '140', '330', '46200.00', '0', '', '2026-10-07 20:57:06', '1612','','','0','0','0','0','0',null,'330','46200','0','0','0','0','0','0','0','0','1'); -- id=363
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 20:53:39', 1, 1612, 0, 0
                    , 303.6, 140, 0, 0, 1, '2026-10-07 20:57:06')
                ON DUPLICATE KEY UPDATE buyprice = 303.6,
                        buyQuantity =buyQuantity+140, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 20:57:06' ; -- id=455
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1612', '330', '140', '0', 'buyBillController.php', '363', '', '0', '0'); -- id=306
UPDATE product SET  productBuyPrice = "330" WHERE productId = 1612 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 363 ;
UPDATE product SET productName = 'قميص جينز مطبوع ', productDescription = '', productCatId = '119', productBuyPrice = '330.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01612',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '303.6',meanbuyprice = '330',meanbuyprice_withDiscount = '303.6' , productbuypricereal = '330.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='303.6',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1612';
UPDATE buybilldetail SET  lastbuyprice = 330 , meanbuyprice = 330, lastbuyprice_withDiscount = 303.6, meanbuyprice_withDiscount = 303.6
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 303.6
                where buybilldetailid = 363;
UPDATE productunit SET proUnitBuyPrice  = 330 * productnumber WHERE productid = 1612;
UPDATE storedetail SET  productquantity = '140', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1637';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1612', '1', '140', '0', '61', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '140', '1', '2026-10-07 20:53:39','0','0'); -- id=2854
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01613', '61', '119', '1613', '128', '330', '42240.00', '0', '', '2026-10-07 20:57:06', '1613','','','0','0','0','0','0',null,'330','42240','0','0','0','0','0','0','0','0','1'); -- id=364
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 20:53:39', 1, 1613, 0, 0
                    , 303.6, 128, 0, 0, 1, '2026-10-07 20:57:06')
                ON DUPLICATE KEY UPDATE buyprice = 303.6,
                        buyQuantity =buyQuantity+128, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 20:57:06' ; -- id=456
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1613', '330', '128', '0', 'buyBillController.php', '364', '', '0', '0'); -- id=307
UPDATE product SET  productBuyPrice = "330" WHERE productId = 1613 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 364 ;
UPDATE product SET productName = 'قميص دبل فيس ليزر كابسين', productDescription = '', productCatId = '119', productBuyPrice = '330.00', productSellAllPrice = '330.00', productSellUnitPrice = '330.00', productSellHalfPrice = '330.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01613',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '303.6',meanbuyprice = '330',meanbuyprice_withDiscount = '303.6' , productbuypricereal = '330.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='303.6',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1613';
UPDATE buybilldetail SET  lastbuyprice = 330 , meanbuyprice = 330, lastbuyprice_withDiscount = 303.6, meanbuyprice_withDiscount = 303.6
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 303.6
                where buybilldetailid = 364;
UPDATE productunit SET proUnitBuyPrice  = 330 * productnumber WHERE productid = 1613;
UPDATE storedetail SET  productquantity = '128', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1638';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1613', '1', '128', '0', '61', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '128', '1', '2026-10-07 20:53:39','0','0'); -- id=2855
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01614', '61', '119', '1614', '76', '350', '26600.00', '0', '', '2026-10-07 20:57:06', '1614','','','0','0','0','0','0',null,'350','26600','0','0','0','0','0','0','0','0','1'); -- id=365
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 20:53:39', 1, 1614, 0, 0
                    , 322, 76, 0, 0, 1, '2026-10-07 20:57:06')
                ON DUPLICATE KEY UPDATE buyprice = 322,
                        buyQuantity =buyQuantity+76, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 20:57:06' ; -- id=457
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1614', '350', '76', '0', 'buyBillController.php', '365', '', '0', '0'); -- id=308
UPDATE product SET  productBuyPrice = "350" WHERE productId = 1614 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 365 ;
UPDATE product SET productName = 'دبل فيس ليزر 2 جيب', productDescription = '', productCatId = '119', productBuyPrice = '350.00', productSellAllPrice = '350.00', productSellUnitPrice = '350.00', productSellHalfPrice = '350.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01614',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '350',lastbuyprice_withDiscount = '322',meanbuyprice = '350',meanbuyprice_withDiscount = '322' , productbuypricereal = '350.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='350',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='350',meanbuyprice_withTax='350',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='322',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1614';
UPDATE buybilldetail SET  lastbuyprice = 350 , meanbuyprice = 350, lastbuyprice_withDiscount = 322, meanbuyprice_withDiscount = 322
        , lastbuyprice_withTax = 350, meanbuyprice_withTax = 350, lastbuyprice_withDiscountAndTax = 322
                where buybilldetailid = 365;
UPDATE productunit SET proUnitBuyPrice  = 350 * productnumber WHERE productid = 1614;
UPDATE storedetail SET  productquantity = '76', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1639';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1614', '1', '76', '0', '61', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '76', '1', '2026-10-07 20:53:39','0','0'); -- id=2856
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01615', '61', '119', '1615', '104', '290', '30160.00', '0', '', '2026-10-07 20:57:06', '1615','','','0','0','0','0','0',null,'290','30160','0','0','0','0','0','0','0','0','1'); -- id=366
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 20:53:39', 1, 1615, 0, 0
                    , 266.8, 104, 0, 0, 1, '2026-10-07 20:57:06')
                ON DUPLICATE KEY UPDATE buyprice = 266.8,
                        buyQuantity =buyQuantity+104, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 20:57:06' ; -- id=458
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1615', '290', '104', '0', 'buyBillController.php', '366', '', '0', '0'); -- id=309
UPDATE product SET  productBuyPrice = "290" WHERE productId = 1615 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 366 ;
UPDATE product SET productName = 'محجر باندا ', productDescription = '', productCatId = '119', productBuyPrice = '290.00', productSellAllPrice = '290.00', productSellUnitPrice = '290.00', productSellHalfPrice = '290.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01615',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '290',lastbuyprice_withDiscount = '266.8',meanbuyprice = '290',meanbuyprice_withDiscount = '266.8' , productbuypricereal = '290.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='290',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='290',meanbuyprice_withTax='290',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='266.8',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1615';
UPDATE buybilldetail SET  lastbuyprice = 290 , meanbuyprice = 290, lastbuyprice_withDiscount = 266.8, meanbuyprice_withDiscount = 266.8
        , lastbuyprice_withTax = 290, meanbuyprice_withTax = 290, lastbuyprice_withDiscountAndTax = 266.8
                where buybilldetailid = 366;
UPDATE productunit SET proUnitBuyPrice  = 290 * productnumber WHERE productid = 1615;
UPDATE storedetail SET  productquantity = '104', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1640';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1615', '1', '104', '0', '61', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '104', '1', '2026-10-07 20:53:39','0','0'); -- id=2857
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01616', '61', '119', '1616', '64', '310', '19840.00', '0', '', '2026-10-07 20:57:06', '1616','','','0','0','0','0','0',null,'310','19840','0','0','0','0','0','0','0','0','1'); -- id=367
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 20:53:39', 1, 1616, 0, 0
                    , 285.2, 64, 0, 0, 1, '2026-10-07 20:57:06')
                ON DUPLICATE KEY UPDATE buyprice = 285.2,
                        buyQuantity =buyQuantity+64, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 20:57:06' ; -- id=459
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1616', '310', '64', '0', 'buyBillController.php', '367', '', '0', '0'); -- id=310
UPDATE product SET  productBuyPrice = "310" WHERE productId = 1616 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 367 ;
UPDATE product SET productName = 'محجر 2 جيب قميص', productDescription = '', productCatId = '119', productBuyPrice = '310.00', productSellAllPrice = '310.00', productSellUnitPrice = '310.00', productSellHalfPrice = '310.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01616',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '310',lastbuyprice_withDiscount = '285.2',meanbuyprice = '310',meanbuyprice_withDiscount = '285.2' , productbuypricereal = '310.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='310',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='310',meanbuyprice_withTax='310',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='285.2',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1616';
UPDATE buybilldetail SET  lastbuyprice = 310 , meanbuyprice = 310, lastbuyprice_withDiscount = 285.2, meanbuyprice_withDiscount = 285.2
        , lastbuyprice_withTax = 310, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 285.2
                where buybilldetailid = 367;
UPDATE productunit SET proUnitBuyPrice  = 310 * productnumber WHERE productid = 1616;
UPDATE storedetail SET  productquantity = '64', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1641';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1616', '1', '64', '0', '61', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '64', '1', '2026-10-07 20:53:39','0','0'); -- id=2858
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01617', '61', '119', '1617', '224', '300', '67200.00', '0', '', '2026-10-07 20:57:06', '1617','','','0','0','0','0','0',null,'300','67200','0','0','0','0','0','0','0','0','1'); -- id=368
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 20:53:39', 1, 1617, 0, 0
                    , 276, 224, 0, 0, 1, '2026-10-07 20:57:06')
                ON DUPLICATE KEY UPDATE buyprice = 276,
                        buyQuantity =buyQuantity+224, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 20:57:06' ; -- id=460
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1617', '300', '224', '0', 'buyBillController.php', '368', '', '0', '0'); -- id=311
UPDATE product SET  productBuyPrice = "300" WHERE productId = 1617 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 368 ;
UPDATE product SET productName = 'قميص جبردين جيب ', productDescription = '', productCatId = '119', productBuyPrice = '300.00', productSellAllPrice = '300.00', productSellUnitPrice = '300.00', productSellHalfPrice = '300.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01617',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '300',lastbuyprice_withDiscount = '276',meanbuyprice = '300',meanbuyprice_withDiscount = '276' , productbuypricereal = '300.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='300',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='300',meanbuyprice_withTax='300',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='276',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1617';
UPDATE buybilldetail SET  lastbuyprice = 300 , meanbuyprice = 300, lastbuyprice_withDiscount = 276, meanbuyprice_withDiscount = 276
        , lastbuyprice_withTax = 300, meanbuyprice_withTax = 300, lastbuyprice_withDiscountAndTax = 276
                where buybilldetailid = 368;
UPDATE productunit SET proUnitBuyPrice  = 300 * productnumber WHERE productid = 1617;
UPDATE storedetail SET  productquantity = '224', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1642';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1617', '1', '224', '0', '61', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '224', '1', '2026-10-07 20:53:39','0','0'); -- id=2859
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01618', '61', '119', '1618', '36', '320', '11520.00', '0', '', '2026-10-07 20:57:06', '1618','','','0','0','0','0','0',null,'320','11520','0','0','0','0','0','0','0','0','1'); -- id=369
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 20:53:39', 1, 1618, 0, 0
                    , 294.4, 36, 0, 0, 1, '2026-10-07 20:57:06')
                ON DUPLICATE KEY UPDATE buyprice = 294.4,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 20:57:06' ; -- id=461
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1618', '320', '36', '0', 'buyBillController.php', '369', '', '0', '0'); -- id=312
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1618 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 369 ;
UPDATE product SET productName = 'قميص جينز محجر تطريز', productDescription = '', productCatId = '119', productBuyPrice = '320.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01618',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '294.4',meanbuyprice = '320',meanbuyprice_withDiscount = '294.4' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='294.4',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1618';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 294.4, meanbuyprice_withDiscount = 294.4
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 294.4
                where buybilldetailid = 369;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1618;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1643';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1618', '1', '36', '0', '61', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 20:53:39','0','0'); -- id=2860
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01619', '61', '119', '1619', '28', '275', '7700.00', '0', '', '2026-10-07 20:57:06', '1619','','','0','0','0','0','0',null,'275','7700','0','0','0','0','0','0','0','0','1'); -- id=370
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 20:53:39', 1, 1619, 0, 0
                    , 253, 28, 0, 0, 1, '2026-10-07 20:57:06')
                ON DUPLICATE KEY UPDATE buyprice = 253,
                        buyQuantity =buyQuantity+28, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 20:57:06' ; -- id=462
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1619', '275', '28', '0', 'buyBillController.php', '370', '', '0', '0'); -- id=313
UPDATE product SET  productBuyPrice = "275" WHERE productId = 1619 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 370 ;
UPDATE product SET productName = 'قميص بولن 3 جيب', productDescription = '', productCatId = '119', productBuyPrice = '275.00', productSellAllPrice = '275.00', productSellUnitPrice = '275.00', productSellHalfPrice = '275.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01619',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '275',lastbuyprice_withDiscount = '253',meanbuyprice = '275',meanbuyprice_withDiscount = '253' , productbuypricereal = '275.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='275',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='275',meanbuyprice_withTax='275',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='253',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1619';
UPDATE buybilldetail SET  lastbuyprice = 275 , meanbuyprice = 275, lastbuyprice_withDiscount = 253, meanbuyprice_withDiscount = 253
        , lastbuyprice_withTax = 275, meanbuyprice_withTax = 275, lastbuyprice_withDiscountAndTax = 253
                where buybilldetailid = 370;
UPDATE productunit SET proUnitBuyPrice  = 275 * productnumber WHERE productid = 1619;
UPDATE storedetail SET  productquantity = '28', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1644';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1619', '1', '28', '0', '61', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '28', '1', '2026-10-07 20:53:39','0','0'); -- id=2861
UPDATE supplier SET  suppliercurrentDebt = '231343.2',suppliercurrentDebtInCurrency= '231343.2' , userid = '1', supplierdate = '2026-10-07 20:57:06'   WHERE supplierid = '116';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('116', '0.00', '231343.2', '0', 'اضافة فاتورة مشتريات', '61', '231343.2', '2026-10-07 20:53:39', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','231343.2','1','0','231343.2','231343.2','0',''); -- id=227
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '231343.2', '231343.2', '2026-10-07', '1', '0', '0', '2026-10-07 20:57:06','اضافة فاتورة مشتريات رقم 61','1','0',null,'0','61','buyBillController.php?do=details&id=61'); -- id=1303
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1303', '382', '231343.2', '','0'); -- id=1313
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18504051.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1303', '599', '231343.2', '','0'); -- id=1303
UPDATE accountstree SET name = 'احمد شعبان', customName = 'احمد شعبان', customNameEn = 'احمد شعبان', nameEn = 'احمد شعبان', parent = '81', accountNature = '1', theValue = '231343.2', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 20:56:58' WHERE id = '599';
update buybill set dailyentryid='1303,0' where buybillid=61;
COMMIT;
UPDATE product SET overAllAveragePrice = 303.6 WHERE productId = 1612;UPDATE product SET overAllAveragePrice = 303.6 WHERE productId = 1613;UPDATE product SET overAllAveragePrice = 322 WHERE productId = 1614;UPDATE product SET overAllAveragePrice = 266.8 WHERE productId = 1615;UPDATE product SET overAllAveragePrice = 285.2 WHERE productId = 1616;UPDATE product SET overAllAveragePrice = 276 WHERE productId = 1617;UPDATE product SET overAllAveragePrice = 294.4 WHERE productId = 1618;UPDATE product SET overAllAveragePrice = 253 WHERE productId = 1619;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:27:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:57:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 20:57:06', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=61'); -- id=4245
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:27:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:57:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:57:09', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=61&type=2'); -- id=4246
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:28:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:58:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:58:56', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=61&type=2'); -- id=4247
UPDATE user SET loginip = "" WHERE userid = 6;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:29:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:59:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 20:59:17', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php'); -- id=4248
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:29:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:59:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 20:59:17', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=4249
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:29:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:59:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 20:59:28', '1', 'details', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=details&id=61'); -- id=4250
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:29:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 20:59:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 20:59:43', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=61&type=2'); -- id=4251
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:32:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:02:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:02:53', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=61&type=2'); -- id=4252
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:33:05";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:33:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:03:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 21:03:07', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4253
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:33:07";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 21:03:07', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4254
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:33:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:03:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:03:32', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=4255
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:33:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:03:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:03:43', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=4256
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:37:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:07:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('returnBuyBillController.php', '2026-10-07 21:07:51', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/returnBuyBillController.php?do=show'); -- id=4257
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:39:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:09:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:09:07', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=61&type=2'); -- id=4258
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:39:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:09:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:09:18', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4259
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:40:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:10:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:10:38', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4260
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('وايد ليج ساده','','32','275','295','295','295','2026-10-07','0','1','0','','0','0','0','0','0','275','275','275','275','275','0','7.27','0','0','.','0','0','0','275','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','275','275','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','275','0','0','0','0','0','0','','','0','0','0','0'); -- id=1620
UPDATE product SET productName = 'وايد ليج ساده', productDescription = '', productCatId = '32', productBuyPrice = '275', productSellAllPrice = '295', productSellUnitPrice = '295', productSellHalfPrice = '295', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01620',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '275',lastbuyprice_withDiscount = '275',meanbuyprice = '275',meanbuyprice_withDiscount = '275' , productbuypricereal = '275' , buypricereal_precentage = '0' , buytotal_precentage = '7.27' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='275',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='275',meanbuyprice_withTax='275',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='275',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1620';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1620', '1', '2026-10-07', '1', '0','0162001','295','295','295','275','','0','0','0','0','0','0','0','0','0','0'); -- id=1620
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1620', '1', '0', '1', '2026-10-07'); -- id=1645
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1620', '1', '0', '0', '1620', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2862
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1620, 1,'2026-10-07 21:10:38',1)
                ON DUPLICATE KEY UPDATE productid = 1620, edited = 1, sysdate = '2026-10-07 21:10:38', userid = 1; -- id=2435
UPDATE product SET productName = 'وايد ليج ساده', productDescription = '', productCatId = '32', productBuyPrice = '275.00', productSellAllPrice = '295.00', productSellUnitPrice = '295.00', productSellHalfPrice = '295.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01620',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '275',lastbuyprice_withDiscount = '275',meanbuyprice = '275',meanbuyprice_withDiscount = '275' , productbuypricereal = '275' , buypricereal_precentage = '0' , buytotal_precentage = '7.27' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='275',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='275',meanbuyprice_withTax='275',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='275',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1620';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('وايد ليج خاص','','32','315','335','335','335','2026-10-07','0','1','0','','0','0','0','0','0','315','315','315','315','315','0','6.35','0','0','.','0','0','0','315','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','315','315','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','315','0','0','0','0','0','0','','','0','0','0','0'); -- id=1621
UPDATE product SET productName = 'وايد ليج خاص', productDescription = '', productCatId = '32', productBuyPrice = '315', productSellAllPrice = '335', productSellUnitPrice = '335', productSellHalfPrice = '335', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01621',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '315',lastbuyprice_withDiscount = '315',meanbuyprice = '315',meanbuyprice_withDiscount = '315' , productbuypricereal = '315' , buypricereal_precentage = '0' , buytotal_precentage = '6.35' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='315',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='315',meanbuyprice_withTax='315',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='315',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1621';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1621', '1', '2026-10-07', '1', '0','0162101','335','335','335','315','','0','0','0','0','0','0','0','0','0','0'); -- id=1621
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1621', '1', '0', '1', '2026-10-07'); -- id=1646
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1621', '1', '0', '0', '1621', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2863
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1621, 1,'2026-10-07 21:10:38',1)
                ON DUPLICATE KEY UPDATE productid = 1621, edited = 1, sysdate = '2026-10-07 21:10:38', userid = 1; -- id=2436
UPDATE product SET productName = 'وايد ليج خاص', productDescription = '', productCatId = '32', productBuyPrice = '315.00', productSellAllPrice = '335.00', productSellUnitPrice = '335.00', productSellHalfPrice = '335.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01621',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '315',lastbuyprice_withDiscount = '315',meanbuyprice = '315',meanbuyprice_withDiscount = '315' , productbuypricereal = '315' , buypricereal_precentage = '0' , buytotal_precentage = '6.35' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='315',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='315',meanbuyprice_withTax='315',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='315',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1621';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:40:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:10:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:10:40', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4261
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:40:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:10:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:10:41', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4262
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:41:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:11:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:11:26', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4263
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:41:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:11:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-07 21:11:48', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=4264
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:42:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:12:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:12:08', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=4265
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('بالون فيت','','32','320','340','340','340','2026-10-07','0','1','0','','0','0','0','0','0','320','320','320','320','320','0','6.25','0','0','.','0','0','0','320','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','320','320','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','320','0','0','0','0','0','0','','','0','0','0','0'); -- id=1622
UPDATE product SET productName = 'بالون فيت', productDescription = '', productCatId = '32', productBuyPrice = '320', productSellAllPrice = '340', productSellUnitPrice = '340', productSellHalfPrice = '340', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01622',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '6.25' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1622';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1622', '1', '2026-10-07', '1', '0','0162201','340','340','340','320','','0','0','0','0','0','0','0','0','0','0'); -- id=1622
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1622', '1', '0', '1', '2026-10-07'); -- id=1647
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1622', '1', '0', '0', '1622', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2864
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1622, 1,'2026-10-07 21:12:08',1)
                ON DUPLICATE KEY UPDATE productid = 1622, edited = 1, sysdate = '2026-10-07 21:12:08', userid = 1; -- id=2437
UPDATE product SET productName = 'بالون فيت', productDescription = '', productCatId = '32', productBuyPrice = '320.00', productSellAllPrice = '340.00', productSellUnitPrice = '340.00', productSellHalfPrice = '340.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01622',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '6.25' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1622';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('سوبر باجي كوين','','32','320','340','340','340','2026-10-07','0','1','0','','0','0','0','0','0','320','320','320','320','320','0','6.25','0','0','.','0','0','0','320','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','320','320','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','320','0','0','0','0','0','0','','','0','0','0','0'); -- id=1623
UPDATE product SET productName = 'سوبر باجي كوين', productDescription = '', productCatId = '32', productBuyPrice = '320', productSellAllPrice = '340', productSellUnitPrice = '340', productSellHalfPrice = '340', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01623',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '6.25' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1623';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1623', '1', '2026-10-07', '1', '0','0162301','340','340','340','320','','0','0','0','0','0','0','0','0','0','0'); -- id=1623
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1623', '1', '0', '1', '2026-10-07'); -- id=1648
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1623', '1', '0', '0', '1623', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2865
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1623, 1,'2026-10-07 21:12:08',1)
                ON DUPLICATE KEY UPDATE productid = 1623, edited = 1, sysdate = '2026-10-07 21:12:08', userid = 1; -- id=2438
UPDATE product SET productName = 'سوبر باجي كوين', productDescription = '', productCatId = '32', productBuyPrice = '320.00', productSellAllPrice = '340.00', productSellUnitPrice = '340.00', productSellHalfPrice = '340.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01623',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320' , buypricereal_precentage = '0' , buytotal_precentage = '6.25' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1623';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('فلير قصات','','32','330','350','350','350','2026-10-07','0','1','0','','0','0','0','0','0','330','330','330','330','330','0','6.06','0','0','.','0','0','0','330','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','330','330','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','330','0','0','0','0','0','0','','','0','0','0','0'); -- id=1624
UPDATE product SET productName = 'فلير قصات', productDescription = '', productCatId = '32', productBuyPrice = '330', productSellAllPrice = '350', productSellUnitPrice = '350', productSellHalfPrice = '350', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01624',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330' , buypricereal_precentage = '0' , buytotal_precentage = '6.06' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1624';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1624', '1', '2026-10-07', '1', '0','0162401','350','350','350','330','','0','0','0','0','0','0','0','0','0','0'); -- id=1624
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1624', '1', '0', '1', '2026-10-07'); -- id=1649
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1624', '1', '0', '0', '1624', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2866
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1624, 1,'2026-10-07 21:12:08',1)
                ON DUPLICATE KEY UPDATE productid = 1624, edited = 1, sysdate = '2026-10-07 21:12:08', userid = 1; -- id=2439
UPDATE product SET productName = 'فلير قصات', productDescription = '', productCatId = '32', productBuyPrice = '330.00', productSellAllPrice = '350.00', productSellUnitPrice = '350.00', productSellHalfPrice = '350.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01624',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330' , buypricereal_precentage = '0' , buytotal_precentage = '6.06' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1624';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('سوبر باجي قصات','','32','330','350','350','350','2026-10-07','0','1','0','','0','0','0','0','0','330','330','330','330','330','0','6.06','0','0','.','0','0','0','330','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','330','330','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','330','0','0','0','0','0','0','','','0','0','0','0'); -- id=1625
UPDATE product SET productName = 'سوبر باجي قصات', productDescription = '', productCatId = '32', productBuyPrice = '330', productSellAllPrice = '350', productSellUnitPrice = '350', productSellHalfPrice = '350', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01625',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330' , buypricereal_precentage = '0' , buytotal_precentage = '6.06' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1625';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1625', '1', '2026-10-07', '1', '0','0162501','350','350','350','330','','0','0','0','0','0','0','0','0','0','0'); -- id=1625
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1625', '1', '0', '1', '2026-10-07'); -- id=1650
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1625', '1', '0', '0', '1625', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2867
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1625, 1,'2026-10-07 21:12:08',1)
                ON DUPLICATE KEY UPDATE productid = 1625, edited = 1, sysdate = '2026-10-07 21:12:08', userid = 1; -- id=2440
UPDATE product SET productName = 'سوبر باجي قصات', productDescription = '', productCatId = '32', productBuyPrice = '330.00', productSellAllPrice = '350.00', productSellUnitPrice = '350.00', productSellHalfPrice = '350.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01625',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330' , buypricereal_precentage = '0' , buytotal_precentage = '6.06' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1625';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:42:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:12:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:12:09', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4266
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:42:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:12:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:12:24', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=4267
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:42:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:12:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 21:12:50', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php'); -- id=4268
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:42:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:12:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 21:12:50', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=4269
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:43:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:13:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 21:13:03', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=show'); -- id=4270
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:43:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:13:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 21:13:19', '1', 'details', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillreportController.php?do=details&id=28'); -- id=4271
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:43:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:13:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 21:13:27', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/billsettingsController.php?do=show'); -- id=4272
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:43:38";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:43:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:13:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:13:38', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4273
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:43:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:13:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:13:53', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4274
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:44:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:14:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:14:07', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4275
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:44:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:14:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:14:12', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4276
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:44:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:14:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:14:15', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=4277
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac68b8877523', '2026-10-07 21:12:24', '40', '584030.00', '801770', '0', '0', '217740.00',  '217740.00', '0', '217740', '1', '2026-10-07 21:14:15', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=62
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01620', '62', '32', '1620', '192', '275', '52800.00', '0', '', '2026-10-07 21:14:15', '1620','','','0','0','0','0','0',null,'275','52800','0','0','0','0','0','0','0','0','1'); -- id=371
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 21:12:24', 1, 1620, 0, 0
                    , 275, 192, 0, 0, 1, '2026-10-07 21:14:15')
                ON DUPLICATE KEY UPDATE buyprice = 275,
                        buyQuantity =buyQuantity+192, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:14:15' ; -- id=463
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1620', '275', '192', '0', 'buyBillController.php', '371', '', '0', '0'); -- id=314
UPDATE product SET  productBuyPrice = "275" WHERE productId = 1620 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 371 ;
UPDATE product SET productName = 'وايد ليج ساده', productDescription = '', productCatId = '32', productBuyPrice = '275.00', productSellAllPrice = '295.00', productSellUnitPrice = '295.00', productSellHalfPrice = '295.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01620',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '275',lastbuyprice_withDiscount = '275',meanbuyprice = '275',meanbuyprice_withDiscount = '275' , productbuypricereal = '275.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '7.27' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='275',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='275',meanbuyprice_withTax='275',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='275',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1620';
UPDATE buybilldetail SET  lastbuyprice = 275 , meanbuyprice = 275, lastbuyprice_withDiscount = 275, meanbuyprice_withDiscount = 275
        , lastbuyprice_withTax = 275, meanbuyprice_withTax = 275, lastbuyprice_withDiscountAndTax = 275
                where buybilldetailid = 371;
UPDATE productunit SET proUnitBuyPrice  = 275 * productnumber WHERE productid = 1620;
UPDATE storedetail SET  productquantity = '192', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1645';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1620', '1', '192', '0', '62', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '192', '1', '2026-10-07 21:12:24','0','0'); -- id=2868
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01621', '62', '32', '1621', '96', '315', '30240.00', '0', '', '2026-10-07 21:14:15', '1621','','','0','0','0','0','0',null,'315','30240','0','0','0','0','0','0','0','0','1'); -- id=372
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 21:12:24', 1, 1621, 0, 0
                    , 315, 96, 0, 0, 1, '2026-10-07 21:14:15')
                ON DUPLICATE KEY UPDATE buyprice = 315,
                        buyQuantity =buyQuantity+96, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:14:15' ; -- id=464
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1621', '315', '96', '0', 'buyBillController.php', '372', '', '0', '0'); -- id=315
UPDATE product SET  productBuyPrice = "315" WHERE productId = 1621 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 372 ;
UPDATE product SET productName = 'وايد ليج خاص', productDescription = '', productCatId = '32', productBuyPrice = '315.00', productSellAllPrice = '335.00', productSellUnitPrice = '335.00', productSellHalfPrice = '335.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01621',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '315',lastbuyprice_withDiscount = '315',meanbuyprice = '315',meanbuyprice_withDiscount = '315' , productbuypricereal = '315.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.35' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='315',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='315',meanbuyprice_withTax='315',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='315',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1621';
UPDATE buybilldetail SET  lastbuyprice = 315 , meanbuyprice = 315, lastbuyprice_withDiscount = 315, meanbuyprice_withDiscount = 315
        , lastbuyprice_withTax = 315, meanbuyprice_withTax = 315, lastbuyprice_withDiscountAndTax = 315
                where buybilldetailid = 372;
UPDATE productunit SET proUnitBuyPrice  = 315 * productnumber WHERE productid = 1621;
UPDATE storedetail SET  productquantity = '96', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1646';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1621', '1', '96', '0', '62', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '96', '1', '2026-10-07 21:12:24','0','0'); -- id=2869
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01622', '62', '32', '1622', '96', '320', '30720.00', '0', '', '2026-10-07 21:14:15', '1622','','','0','0','0','0','0',null,'320','30720','0','0','0','0','0','0','0','0','1'); -- id=373
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 21:12:24', 1, 1622, 0, 0
                    , 320, 96, 0, 0, 1, '2026-10-07 21:14:15')
                ON DUPLICATE KEY UPDATE buyprice = 320,
                        buyQuantity =buyQuantity+96, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:14:15' ; -- id=465
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1622', '320', '96', '0', 'buyBillController.php', '373', '', '0', '0'); -- id=316
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1622 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 373 ;
UPDATE product SET productName = 'بالون فيت', productDescription = '', productCatId = '32', productBuyPrice = '320.00', productSellAllPrice = '340.00', productSellUnitPrice = '340.00', productSellHalfPrice = '340.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01622',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.25' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1622';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 320, meanbuyprice_withDiscount = 320
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 320
                where buybilldetailid = 373;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1622;
UPDATE storedetail SET  productquantity = '96', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1647';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1622', '1', '96', '0', '62', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '96', '1', '2026-10-07 21:12:24','0','0'); -- id=2870
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01623', '62', '32', '1623', '96', '320', '30720.00', '0', '', '2026-10-07 21:14:15', '1623','','','0','0','0','0','0',null,'320','30720','0','0','0','0','0','0','0','0','1'); -- id=374
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 21:12:24', 1, 1623, 0, 0
                    , 320, 96, 0, 0, 1, '2026-10-07 21:14:15')
                ON DUPLICATE KEY UPDATE buyprice = 320,
                        buyQuantity =buyQuantity+96, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:14:15' ; -- id=466
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1623', '320', '96', '0', 'buyBillController.php', '374', '', '0', '0'); -- id=317
UPDATE product SET  productBuyPrice = "320" WHERE productId = 1623 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 374 ;
UPDATE product SET productName = 'سوبر باجي كوين', productDescription = '', productCatId = '32', productBuyPrice = '320.00', productSellAllPrice = '340.00', productSellUnitPrice = '340.00', productSellHalfPrice = '340.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01623',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '320',lastbuyprice_withDiscount = '320',meanbuyprice = '320',meanbuyprice_withDiscount = '320' , productbuypricereal = '320.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.25' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='320',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='320',meanbuyprice_withTax='320',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='320',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1623';
UPDATE buybilldetail SET  lastbuyprice = 320 , meanbuyprice = 320, lastbuyprice_withDiscount = 320, meanbuyprice_withDiscount = 320
        , lastbuyprice_withTax = 320, meanbuyprice_withTax = 320, lastbuyprice_withDiscountAndTax = 320
                where buybilldetailid = 374;
UPDATE productunit SET proUnitBuyPrice  = 320 * productnumber WHERE productid = 1623;
UPDATE storedetail SET  productquantity = '96', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1648';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1623', '1', '96', '0', '62', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '96', '1', '2026-10-07 21:12:24','0','0'); -- id=2871
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01624', '62', '32', '1624', '48', '330', '15840.00', '0', '', '2026-10-07 21:14:15', '1624','','','0','0','0','0','0',null,'330','15840','0','0','0','0','0','0','0','0','1'); -- id=375
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 21:12:24', 1, 1624, 0, 0
                    , 330, 48, 0, 0, 1, '2026-10-07 21:14:15')
                ON DUPLICATE KEY UPDATE buyprice = 330,
                        buyQuantity =buyQuantity+48, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:14:15' ; -- id=467
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1624', '330', '48', '0', 'buyBillController.php', '375', '', '0', '0'); -- id=318
UPDATE product SET  productBuyPrice = "330" WHERE productId = 1624 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 375 ;
UPDATE product SET productName = 'فلير قصات', productDescription = '', productCatId = '32', productBuyPrice = '330.00', productSellAllPrice = '350.00', productSellUnitPrice = '350.00', productSellHalfPrice = '350.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01624',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.06' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1624';
UPDATE buybilldetail SET  lastbuyprice = 330 , meanbuyprice = 330, lastbuyprice_withDiscount = 330, meanbuyprice_withDiscount = 330
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where buybilldetailid = 375;
UPDATE productunit SET proUnitBuyPrice  = 330 * productnumber WHERE productid = 1624;
UPDATE storedetail SET  productquantity = '48', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1649';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1624', '1', '48', '0', '62', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '48', '1', '2026-10-07 21:12:24','0','0'); -- id=2872
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01625', '62', '32', '1625', '174', '330', '57420.00', '0', '', '2026-10-07 21:14:15', '1625','','','0','0','0','0','0',null,'330','57420','0','0','0','0','0','0','0','0','1'); -- id=376
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 21:12:24', 1, 1625, 0, 0
                    , 330, 174, 0, 0, 1, '2026-10-07 21:14:15')
                ON DUPLICATE KEY UPDATE buyprice = 330,
                        buyQuantity =buyQuantity+174, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:14:15' ; -- id=468
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1625', '330', '174', '0', 'buyBillController.php', '376', '', '0', '0'); -- id=319
UPDATE product SET  productBuyPrice = "330" WHERE productId = 1625 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 376 ;
UPDATE product SET productName = 'سوبر باجي قصات', productDescription = '', productCatId = '32', productBuyPrice = '330.00', productSellAllPrice = '350.00', productSellUnitPrice = '350.00', productSellHalfPrice = '350.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '01625',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '330',lastbuyprice_withDiscount = '330',meanbuyprice = '330',meanbuyprice_withDiscount = '330' , productbuypricereal = '330.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.06' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='330',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='330',meanbuyprice_withTax='330',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='330',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1625';
UPDATE buybilldetail SET  lastbuyprice = 330 , meanbuyprice = 330, lastbuyprice_withDiscount = 330, meanbuyprice_withDiscount = 330
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where buybilldetailid = 376;
UPDATE productunit SET proUnitBuyPrice  = 330 * productnumber WHERE productid = 1625;
UPDATE storedetail SET  productquantity = '174', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1650';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1625', '1', '174', '0', '62', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '174', '1', '2026-10-07 21:12:24','0','0'); -- id=2873
UPDATE supplier SET  suppliercurrentDebt = '627480',suppliercurrentDebtInCurrency= '801770' , userid = '1', supplierdate = '2026-10-07 21:14:15'   WHERE supplierid = '40';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('40', '409740.00', '217740', '0', 'اضافة فاتورة مشتريات', '62', '627480', '2026-10-07 21:12:24', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','217740','1','584030','217740','801770','0',''); -- id=228
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '217740', '217740', '2026-10-07', '1', '0', '0', '2026-10-07 21:14:15','اضافة فاتورة مشتريات رقم 62','1','0',null,'0','62','buyBillController.php?do=details&id=62'); -- id=1304
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1304', '382', '217740', '','0'); -- id=1314
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18721791.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1304', '459', '217740', '','0'); -- id=1304
UPDATE accountstree SET name = 'كوين - مورد', customName = 'كوين - مورد', customNameEn = 'كوين - مورد', nameEn = 'كوين - مورد', parent = '81', accountNature = '1', theValue = '255740', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '459';
update buybill set dailyentryid='1304,0' where buybillid=62;
COMMIT;
UPDATE product SET overAllAveragePrice = 275 WHERE productId = 1620;UPDATE product SET overAllAveragePrice = 315 WHERE productId = 1621;UPDATE product SET overAllAveragePrice = 320 WHERE productId = 1622;UPDATE product SET overAllAveragePrice = 320 WHERE productId = 1623;UPDATE product SET overAllAveragePrice = 330 WHERE productId = 1624;UPDATE product SET overAllAveragePrice = 330 WHERE productId = 1625;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:44:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:14:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:14:15', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=62'); -- id=4278
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:44:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:14:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:14:20', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4279
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:44:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:14:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:14:20', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=62&type=2'); -- id=4280
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:44:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:14:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:14:31', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4281
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:44:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:14:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:14:41', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4282
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:44:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:14:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:14:50', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4283
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:44:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:14:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:14:55', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=show'); -- id=4284
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:44:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:14:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:14:59', '1', 'editbill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editbill&id=28'); -- id=4285
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:45:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:15:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:15:33', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=update'); -- id=4286
BEGIN;
UPDATE costcenterdetail SET del = 1 WHERE type in( 3) and  modelid = 28;
UPDATE buybill SET  buybillsysdate = '2026-10-07 21:15:33', userid = '1',delbyuserid = '1', conditions = '1' WHERE buybillid = '28';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1410, 0, 0
                    , 800, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-36, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=178
UPDATE buybilldetail SET  lastbuyprice = 800.00 , meanbuyprice = 800.00, lastbuyprice_withDiscount = 720.00, meanbuyprice_withDiscount = 720.00
        , lastbuyprice_withTax = 800.00, meanbuyprice_withTax = 800.00, lastbuyprice_withDiscountAndTax = 720.00
                where buybilldetailid = 120;
UPDATE product SET productName = 'جلد ممشط الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01410',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '0',meanbuyprice = '800.00',meanbuyprice_withDiscount = '800' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1410';
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1410;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1423';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1410', '1', '36', '1', '28', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '36', '0', '1', '2026-10-03 18:46:28','0','0'); -- id=2874
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1411, 0, 0
                    , 800, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-36, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=179
UPDATE buybilldetail SET  lastbuyprice = 800.00 , meanbuyprice = 800.00, lastbuyprice_withDiscount = 720.00, meanbuyprice_withDiscount = 720.00
        , lastbuyprice_withTax = 800.00, meanbuyprice_withTax = 800.00, lastbuyprice_withDiscountAndTax = 720.00
                where buybilldetailid = 121;
UPDATE product SET productName = 'جلد سمبوكسه الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01411',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '0',meanbuyprice = '800.00',meanbuyprice_withDiscount = '800' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1411';
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1411;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1424';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1411', '1', '36', '1', '28', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '36', '0', '1', '2026-10-03 18:46:28','0','0'); -- id=2875
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1412, 0, 0
                    , 800, 27, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-27, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=180
UPDATE buybilldetail SET  lastbuyprice = 800.00 , meanbuyprice = 800.00, lastbuyprice_withDiscount = 720.00, meanbuyprice_withDiscount = 720.00
        , lastbuyprice_withTax = 800.00, meanbuyprice_withTax = 800.00, lastbuyprice_withDiscountAndTax = 720.00
                where buybilldetailid = 122;
UPDATE product SET productName = 'جلد بيندا الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01412',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '0',meanbuyprice = '800.00',meanbuyprice_withDiscount = '800' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1412';
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1412;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1425';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1412', '1', '27', '1', '28', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '27', '0', '1', '2026-10-03 18:46:28','0','0'); -- id=2876
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1413, 0, 0
                    , 800, 30, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-30, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=181
UPDATE buybilldetail SET  lastbuyprice = 800.00 , meanbuyprice = 800.00, lastbuyprice_withDiscount = 720.00, meanbuyprice_withDiscount = 720.00
        , lastbuyprice_withTax = 800.00, meanbuyprice_withTax = 800.00, lastbuyprice_withDiscountAndTax = 720.00
                where buybilldetailid = 123;
UPDATE product SET productName = 'جلد دبل سوسته الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01413',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '0',meanbuyprice = '800.00',meanbuyprice_withDiscount = '800' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1413';
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1413;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1426';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1413', '1', '30', '1', '28', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '30', '0', '1', '2026-10-03 18:46:28','0','0'); -- id=2877
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1414, 0, 0
                    , 800, 30, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-30, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=182
UPDATE buybilldetail SET  lastbuyprice = 800.00 , meanbuyprice = 800.00, lastbuyprice_withDiscount = 720.00, meanbuyprice_withDiscount = 720.00
        , lastbuyprice_withTax = 800.00, meanbuyprice_withTax = 800.00, lastbuyprice_withDiscountAndTax = 720.00
                where buybilldetailid = 124;
UPDATE product SET productName = 'جلد محجر الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01414',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '0',meanbuyprice = '800.00',meanbuyprice_withDiscount = '800' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1414';
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1414;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1427';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1414', '1', '30', '1', '28', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '30', '0', '1', '2026-10-03 18:46:28','0','0'); -- id=2878
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1415, 0, 0
                    , 800, 30, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-30, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=183
UPDATE buybilldetail SET  lastbuyprice = 800.00 , meanbuyprice = 800.00, lastbuyprice_withDiscount = 720.00, meanbuyprice_withDiscount = 720.00
        , lastbuyprice_withTax = 800.00, meanbuyprice_withTax = 800.00, lastbuyprice_withDiscountAndTax = 720.00
                where buybilldetailid = 125;
UPDATE product SET productName = 'جلد 2 جيب الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01415',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '0',meanbuyprice = '800.00',meanbuyprice_withDiscount = '800' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1415';
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1415;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1428';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1415', '1', '30', '1', '28', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '30', '0', '1', '2026-10-03 18:46:28','0','0'); -- id=2879
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1416, 0, 0
                    , 800, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-36, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=184
UPDATE buybilldetail SET  lastbuyprice = 800.00 , meanbuyprice = 800.00, lastbuyprice_withDiscount = 720.00, meanbuyprice_withDiscount = 720.00
        , lastbuyprice_withTax = 800.00, meanbuyprice_withTax = 800.00, lastbuyprice_withDiscountAndTax = 720.00
                where buybilldetailid = 126;
UPDATE product SET productName = 'جلد ساده بيزك الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01416',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '0',meanbuyprice = '800.00',meanbuyprice_withDiscount = '800' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1416';
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1416;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1429';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1416', '1', '36', '1', '28', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '36', '0', '1', '2026-10-03 18:46:28','0','0'); -- id=2880
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1417, 0, 0
                    , 550, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-36, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=185
UPDATE buybilldetail SET  lastbuyprice = 550.00 , meanbuyprice = 550.00, lastbuyprice_withDiscount = 495.00, meanbuyprice_withDiscount = 495.00
        , lastbuyprice_withTax = 550.00, meanbuyprice_withTax = 550.00, lastbuyprice_withDiscountAndTax = 495.00
                where buybilldetailid = 127;
UPDATE product SET productName = 'جاكت جوخ الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01417',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '0',meanbuyprice = '550.00',meanbuyprice_withDiscount = '550' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1417';
UPDATE productunit SET proUnitBuyPrice  = 550 * productnumber WHERE productid = 1417;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1430';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1417', '1', '36', '1', '28', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '36', '0', '1', '2026-10-03 18:46:28','0','0'); -- id=2881
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1418, 0, 0
                    , 620, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-36, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=186
UPDATE buybilldetail SET  lastbuyprice = 620.00 , meanbuyprice = 620.00, lastbuyprice_withDiscount = 558.00, meanbuyprice_withDiscount = 558.00
        , lastbuyprice_withTax = 620.00, meanbuyprice_withTax = 620.00, lastbuyprice_withDiscountAndTax = 558.00
                where buybilldetailid = 128;
UPDATE product SET productName = 'جاكت وتر جلد محجر الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '620.00', productSellAllPrice = '620.00', productSellUnitPrice = '620.00', productSellHalfPrice = '620.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01418',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '620',lastbuyprice_withDiscount = '0',meanbuyprice = '620.00',meanbuyprice_withDiscount = '620' , productbuypricereal = '620.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='558',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='620',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1418';
UPDATE productunit SET proUnitBuyPrice  = 620 * productnumber WHERE productid = 1418;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1431';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1418', '1', '36', '1', '28', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '36', '0', '1', '2026-10-03 18:46:28','0','0'); -- id=2882
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1419, 0, 0
                    , 550, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-36, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=187
UPDATE buybilldetail SET  lastbuyprice = 550.00 , meanbuyprice = 550.00, lastbuyprice_withDiscount = 495.00, meanbuyprice_withDiscount = 495.00
        , lastbuyprice_withTax = 550.00, meanbuyprice_withTax = 550.00, lastbuyprice_withDiscountAndTax = 495.00
                where buybilldetailid = 129;
UPDATE product SET productName = 'جاكت وتر جلد ال في الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01419',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '0',meanbuyprice = '550.00',meanbuyprice_withDiscount = '550' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1419';
UPDATE productunit SET proUnitBuyPrice  = 550 * productnumber WHERE productid = 1419;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1432';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1419', '1', '36', '1', '28', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '36', '0', '1', '2026-10-03 18:46:28','0','0'); -- id=2883
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1420, 0, 0
                    , 550, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-36, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=188
UPDATE buybilldetail SET  lastbuyprice = 550.00 , meanbuyprice = 550.00, lastbuyprice_withDiscount = 495.00, meanbuyprice_withDiscount = 495.00
        , lastbuyprice_withTax = 550.00, meanbuyprice_withTax = 550.00, lastbuyprice_withDiscountAndTax = 495.00
                where buybilldetailid = 130;
UPDATE product SET productName = 'جاكت وتر جلد ديور الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01420',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '0',meanbuyprice = '550.00',meanbuyprice_withDiscount = '550' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='0',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='0',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1420';
UPDATE productunit SET proUnitBuyPrice  = 550 * productnumber WHERE productid = 1420;
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1433';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1420', '1', '36', '1', '28', 'حذف فاتورة مشتريات - للتعديل', 'buyBillController.php', '36', '0', '1', '2026-10-03 18:46:28','0','0'); -- id=2884
UPDATE supplier SET  suppliercurrentDebt = '0',suppliercurrentDebtInCurrency= '0' , userid = '1', supplierdate = '2026-10-07 21:15:33'   WHERE supplierid = '83';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('83', '235548.00', '235548.00', '1', 'حذف فاتورة مشتريات - للتعديل', '28', '0', '2026-10-03 18:46:28', '1', 'buyBillController.php', 'حذف فاتورة مشتريات - للتعديل', '0','', '0','1','1','235548','1','235548','235548','0','0',''); -- id=229
UPDATE productserial SET del = 1
		 WHERE billid = 28;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,deletedbuyid,controlname,payedtax,costcenterid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac1235463466', '2026-10-03 18:46:28', '83', '0.00', '235728', '10', '1', '261920.00', '235728.00', '0.00', '235728', '1', '2026-10-07 21:15:33', '', '1', '0', '', '1', '1','1','28','buyBillController.php','0.00','-1','1','0','0','.','0','0','0','0','0','0'); -- id=63
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01410', '63', '98', '1410', '36.00', '800', '28800.00', '0.00', '', '2026-10-07 21:15:33', '1410','','','0','0','0','0','0',null,'800','28800','0','0','0','0','0','0','0','0','1'); -- id=377
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1410, 0, 0
                    , 720, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyprice = 720,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=178
UPDATE product SET  productBuyPrice = "800" WHERE productId = 1410 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 377 ;
UPDATE product SET productName = 'جلد ممشط الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01410',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '720',meanbuyprice = '800',meanbuyprice_withDiscount = '760' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1410';
UPDATE buybilldetail SET  lastbuyprice = 800 , meanbuyprice = 800, lastbuyprice_withDiscount = 720, meanbuyprice_withDiscount = 760
        , lastbuyprice_withTax = 800, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 720
                where buybilldetailid = 377;
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1410;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1423';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1410', '1', '36', '0', '63', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-03 18:46:28','0','0'); -- id=2885
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01411', '63', '98', '1411', '36.00', '800', '28800.00', '0.00', '', '2026-10-07 21:15:33', '1411','','','0','0','0','0','0',null,'800','28800','0','0','0','0','0','0','0','0','1'); -- id=378
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1411, 0, 0
                    , 720, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyprice = 720,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=179
UPDATE product SET  productBuyPrice = "800" WHERE productId = 1411 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 378 ;
UPDATE product SET productName = 'جلد سمبوكسه الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01411',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '720',meanbuyprice = '800',meanbuyprice_withDiscount = '760' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1411';
UPDATE buybilldetail SET  lastbuyprice = 800 , meanbuyprice = 800, lastbuyprice_withDiscount = 720, meanbuyprice_withDiscount = 760
        , lastbuyprice_withTax = 800, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 720
                where buybilldetailid = 378;
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1411;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1424';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1411', '1', '36', '0', '63', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-03 18:46:28','0','0'); -- id=2886
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01412', '63', '98', '1412', '27.00', '800', '21600.00', '0.00', '', '2026-10-07 21:15:33', '1412','','','0','0','0','0','0',null,'800','21600','0','0','0','0','0','0','0','0','1'); -- id=379
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1412, 0, 0
                    , 720, 27, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyprice = 720,
                        buyQuantity =buyQuantity+27, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=180
UPDATE product SET  productBuyPrice = "800" WHERE productId = 1412 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 379 ;
UPDATE product SET productName = 'جلد بيندا الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01412',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '720',meanbuyprice = '800',meanbuyprice_withDiscount = '760' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1412';
UPDATE buybilldetail SET  lastbuyprice = 800 , meanbuyprice = 800, lastbuyprice_withDiscount = 720, meanbuyprice_withDiscount = 760
        , lastbuyprice_withTax = 800, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 720
                where buybilldetailid = 379;
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1412;
UPDATE storedetail SET  productquantity = '27', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1425';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1412', '1', '27', '0', '63', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '27', '1', '2026-10-03 18:46:28','0','0'); -- id=2887
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01413', '63', '98', '1413', '27.00', '800', '21600.00', '0.00', '', '2026-10-07 21:15:33', '1413','','','0','0','0','0','0',null,'800','21600','0','0','0','0','0','0','0','0','1'); -- id=380
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1413, 0, 0
                    , 720, 27, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyprice = 720,
                        buyQuantity =buyQuantity+27, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=181
UPDATE product SET  productBuyPrice = "800" WHERE productId = 1413 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 380 ;
UPDATE product SET productName = 'جلد دبل سوسته الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01413',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '720',meanbuyprice = '800',meanbuyprice_withDiscount = '762.11' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='378.95',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1413';
UPDATE buybilldetail SET  lastbuyprice = 800 , meanbuyprice = 800, lastbuyprice_withDiscount = 720, meanbuyprice_withDiscount = 762.11
        , lastbuyprice_withTax = 800, meanbuyprice_withTax = 378.95, lastbuyprice_withDiscountAndTax = 720
                where buybilldetailid = 380;
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1413;
UPDATE storedetail SET  productquantity = '27', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1426';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1413', '1', '27', '0', '63', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '27', '1', '2026-10-03 18:46:28','0','0'); -- id=2888
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01414', '63', '98', '1414', '30.00', '800', '24000.00', '0.00', '', '2026-10-07 21:15:33', '1414','','','0','0','0','0','0',null,'800','24000','0','0','0','0','0','0','0','0','1'); -- id=381
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1414, 0, 0
                    , 720, 30, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyprice = 720,
                        buyQuantity =buyQuantity+30, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=182
UPDATE product SET  productBuyPrice = "800" WHERE productId = 1414 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 381 ;
UPDATE product SET productName = 'جلد محجر الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01414',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '720',meanbuyprice = '800',meanbuyprice_withDiscount = '760' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1414';
UPDATE buybilldetail SET  lastbuyprice = 800 , meanbuyprice = 800, lastbuyprice_withDiscount = 720, meanbuyprice_withDiscount = 760
        , lastbuyprice_withTax = 800, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 720
                where buybilldetailid = 381;
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1414;
UPDATE storedetail SET  productquantity = '30', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1427';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1414', '1', '30', '0', '63', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '30', '1', '2026-10-03 18:46:28','0','0'); -- id=2889
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01415', '63', '98', '1415', '36.00', '800', '28800.00', '0.00', '', '2026-10-07 21:15:33', '1415','','','0','0','0','0','0',null,'800','28800','0','0','0','0','0','0','0','0','1'); -- id=382
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1415, 0, 0
                    , 720, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyprice = 720,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=183
UPDATE product SET  productBuyPrice = "800" WHERE productId = 1415 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 382 ;
UPDATE product SET productName = 'جلد 2 جيب الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01415',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '720',meanbuyprice = '800',meanbuyprice_withDiscount = '756.36' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='436.36',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1415';
UPDATE buybilldetail SET  lastbuyprice = 800 , meanbuyprice = 800, lastbuyprice_withDiscount = 720, meanbuyprice_withDiscount = 756.36
        , lastbuyprice_withTax = 800, meanbuyprice_withTax = 436.36, lastbuyprice_withDiscountAndTax = 720
                where buybilldetailid = 382;
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1415;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1428';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1415', '1', '36', '0', '63', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-03 18:46:28','0','0'); -- id=2890
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01416', '63', '98', '1416', '36.00', '800', '28800.00', '0.00', '', '2026-10-07 21:15:33', '1416','','','0','0','0','0','0',null,'800','28800','0','0','0','0','0','0','0','0','1'); -- id=383
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1416, 0, 0
                    , 720, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyprice = 720,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=184
UPDATE product SET  productBuyPrice = "800" WHERE productId = 1416 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 383 ;
UPDATE product SET productName = 'جلد ساده بيزك الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '800.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01416',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '720',meanbuyprice = '800',meanbuyprice_withDiscount = '760' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='720',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='720',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1416';
UPDATE buybilldetail SET  lastbuyprice = 800 , meanbuyprice = 800, lastbuyprice_withDiscount = 720, meanbuyprice_withDiscount = 760
        , lastbuyprice_withTax = 800, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 720
                where buybilldetailid = 383;
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1416;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1429';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1416', '1', '36', '0', '63', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-03 18:46:28','0','0'); -- id=2891
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01417', '63', '98', '1417', '32.00', '550', '17600.00', '0.00', '', '2026-10-07 21:15:33', '1417','','','0','0','0','0','0',null,'550','17600','0','0','0','0','0','0','0','0','1'); -- id=384
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1417, 0, 0
                    , 495, 32, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyprice = 495,
                        buyQuantity =buyQuantity+32, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=185
UPDATE product SET  productBuyPrice = "550" WHERE productId = 1417 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 384 ;
UPDATE product SET productName = 'جاكت جوخ الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01417',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '495',meanbuyprice = '550',meanbuyprice_withDiscount = '524.12' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='258.82',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1417';
UPDATE buybilldetail SET  lastbuyprice = 550 , meanbuyprice = 550, lastbuyprice_withDiscount = 495, meanbuyprice_withDiscount = 524.12
        , lastbuyprice_withTax = 550, meanbuyprice_withTax = 258.82, lastbuyprice_withDiscountAndTax = 495
                where buybilldetailid = 384;
UPDATE productunit SET proUnitBuyPrice  = 550 * productnumber WHERE productid = 1417;
UPDATE storedetail SET  productquantity = '32', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1430';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1417', '1', '32', '0', '63', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '32', '1', '2026-10-03 18:46:28','0','0'); -- id=2892
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01418', '63', '98', '1418', '36.00', '620', '22320.00', '0.00', '', '2026-10-07 21:15:33', '1418','','','0','0','0','0','0',null,'620','22320','0','0','0','0','0','0','0','0','1'); -- id=385
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1418, 0, 0
                    , 558, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyprice = 558,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=186
UPDATE product SET  productBuyPrice = "620" WHERE productId = 1418 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 385 ;
UPDATE product SET productName = 'جاكت وتر جلد محجر الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '620.00', productSellAllPrice = '620.00', productSellUnitPrice = '620.00', productSellHalfPrice = '620.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01418',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '620',lastbuyprice_withDiscount = '558',meanbuyprice = '620',meanbuyprice_withDiscount = '589' , productbuypricereal = '620.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='558',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='620',meanbuyprice_withTax='310',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='558',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1418';
UPDATE buybilldetail SET  lastbuyprice = 620 , meanbuyprice = 620, lastbuyprice_withDiscount = 558, meanbuyprice_withDiscount = 589
        , lastbuyprice_withTax = 620, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 558
                where buybilldetailid = 385;
UPDATE productunit SET proUnitBuyPrice  = 620 * productnumber WHERE productid = 1418;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1431';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1418', '1', '36', '0', '63', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-03 18:46:28','0','0'); -- id=2893
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01419', '63', '98', '1419', '36.00', '550', '19800.00', '0.00', '', '2026-10-07 21:15:33', '1419','','','0','0','0','0','0',null,'550','19800','0','0','0','0','0','0','0','0','1'); -- id=386
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1419, 0, 0
                    , 495, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyprice = 495,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=187
UPDATE product SET  productBuyPrice = "550" WHERE productId = 1419 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 386 ;
UPDATE product SET productName = 'جاكت وتر جلد ال في الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01419',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '495',meanbuyprice = '550',meanbuyprice_withDiscount = '522.5' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='275',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1419';
UPDATE buybilldetail SET  lastbuyprice = 550 , meanbuyprice = 550, lastbuyprice_withDiscount = 495, meanbuyprice_withDiscount = 522.5
        , lastbuyprice_withTax = 550, meanbuyprice_withTax = 275, lastbuyprice_withDiscountAndTax = 495
                where buybilldetailid = 386;
UPDATE productunit SET proUnitBuyPrice  = 550 * productnumber WHERE productid = 1419;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1432';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1419', '1', '36', '0', '63', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-03 18:46:28','0','0'); -- id=2894
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('01420', '63', '98', '1420', '36.00', '550', '19800.00', '0.00', '', '2026-10-07 21:15:33', '1420','','','0','0','0','0','0',null,'550','19800','0','0','0','0','0','0','0','0','1'); -- id=387
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-03 18:46:28', 1, 1420, 0, 0
                    , 495, 36, 0, 0, 1, '2026-10-07 21:15:33')
                ON DUPLICATE KEY UPDATE buyprice = 495,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:15:33' ; -- id=188
UPDATE product SET  productBuyPrice = "550" WHERE productId = 1420 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 387 ;
UPDATE product SET productName = 'جاكت وتر جلد ديور الاستاذ', productDescription = '', productCatId = '98', productBuyPrice = '550.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-03', conditions = '0', userId = '1', limitamount = '0', parcode = '01420',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '550',lastbuyprice_withDiscount = '495',meanbuyprice = '550',meanbuyprice_withDiscount = '522.5' , productbuypricereal = '550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='495',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='550',meanbuyprice_withTax='275',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='495',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1420';
UPDATE buybilldetail SET  lastbuyprice = 550 , meanbuyprice = 550, lastbuyprice_withDiscount = 495, meanbuyprice_withDiscount = 522.5
        , lastbuyprice_withTax = 550, meanbuyprice_withTax = 275, lastbuyprice_withDiscountAndTax = 495
                where buybilldetailid = 387;
UPDATE productunit SET proUnitBuyPrice  = 550 * productnumber WHERE productid = 1420;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1433';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1420', '1', '36', '0', '63', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-03 18:46:28','0','0'); -- id=2895
DELETE FROM productserial WHERE billid = 28
		and type =0 
		;
UPDATE supplier SET  suppliercurrentDebt = '235728',suppliercurrentDebtInCurrency= '235728' , userid = '1', supplierdate = '2026-10-07 21:15:33'   WHERE supplierid = '83';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('83', '0.00', '235728', '0', 'اضافة فاتورة مشتريات', '63', '235728', '2026-10-07 21:15:33', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','235548','1','0','235728','235728','0',''); -- id=230
UPDATE dailyentry SET totalcreditor = '235548.00', totaldebtor = '235548.00', thedate = '2026-10-03', userid = '1', `condition` = '0', reverseofid = '-10', dDateTime = '2026-10-03 18:50:33', entryComment = 'اضافة فاتورة مشتريات رقم 28', fromFlag = '1',related='0',isopeningentry='0',operationId='28',operationDetailLink='buyBillController.php?do=details&id=28' WHERE id = '1062';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '235548.00', '235548.00', '2026-10-07', '1', '0', '1062', '2026-10-07 21:15:33','تم عكس القيد رقم 1062 ','1','0','0','0','0',''); -- id=1305
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1305', '382', '235548.00', '','0'); -- id=1305
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18486243.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1305', '561', '235548.00', '','0'); -- id=1315
UPDATE accountstree SET name = 'الاستاذ', customName = 'الاستاذ', customNameEn = 'الاستاذ', nameEn = 'الاستاذ', parent = '81', accountNature = '1', theValue = '0', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-03 18:47:03' WHERE id = '561';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '235728', '235728', '2026-10-07', '1', '0', '0', '2026-10-07 21:15:33','اضافة فاتورة مشتريات رقم 63','1','0',null,'0','63','buyBillController.php?do=details&id=63'); -- id=1306
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1306', '382', '235728', '','0'); -- id=1316
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18721971.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1306', '561', '235728', '','0'); -- id=1306
UPDATE accountstree SET name = 'الاستاذ', customName = 'الاستاذ', customNameEn = 'الاستاذ', nameEn = 'الاستاذ', parent = '81', accountNature = '1', theValue = '235728', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-03 18:47:03' WHERE id = '561';
update buybill set dailyentryid='1306,0' where buybillid=63;
UPDATE product SET overAllAveragePrice = 720 WHERE productId = 1410;UPDATE product SET overAllAveragePrice = 720 WHERE productId = 1411;UPDATE product SET overAllAveragePrice = 720 WHERE productId = 1412;UPDATE product SET overAllAveragePrice = 720 WHERE productId = 1413;UPDATE product SET overAllAveragePrice = 720 WHERE productId = 1414;UPDATE product SET overAllAveragePrice = 720 WHERE productId = 1415;UPDATE product SET overAllAveragePrice = 720 WHERE productId = 1416;UPDATE product SET overAllAveragePrice = 495 WHERE productId = 1417;UPDATE product SET overAllAveragePrice = 558 WHERE productId = 1418;UPDATE product SET overAllAveragePrice = 495 WHERE productId = 1419;UPDATE product SET overAllAveragePrice = 495 WHERE productId = 1420;;
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:45:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:15:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:15:34', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=63'); -- id=4287
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:48:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:18:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:18:12', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=62&type=2'); -- id=4288
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:48:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:18:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:18:19', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=4289
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:48:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:18:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:18:22', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=62&type=2'); -- id=4290
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:48:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:18:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:18:24', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=62'); -- id=4291
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:48:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:18:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:18:55', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=62'); -- id=4292
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:48:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:18:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:18:58', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=4293
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:51:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:21:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 21:21:39', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=4294
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:51:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:21:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 21:21:54', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php?do=show'); -- id=4295
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:52:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:22:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:22:27', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=4296
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:52:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:22:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:22:57', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=4297
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:00:00";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:00:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:30:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 21:30:09', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4298
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:00:09";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 21:30:09', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4299
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:00:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:30:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:30:16', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=4300
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:00:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:30:54", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 21:30:54', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4301
UPDATE productunit SET unitid = '1', productid = '850', productnumber = '1.00', productunitdate = '2026-09-27', userid = '1', conditions = '0',proUnitParcode='',proUnitSellAllPrice='415',proUnitSellHalfPrice='0',proUnitSellUnitPrice ='0',proUnitBuyPrice='395',unitInTax='',proUnitPrice4='0',proUnitPrice5='0',proUnitPrice6='0',proUnitPrice7='0',proUnitPrice8='0',proUnitPrice9='0',proUnitPrice10='0',proUnitPrice11='0',proUnitPrice12='0',proUnitPrice13='0' WHERE productunitid = '850';
UPDATE product SET productName = 'سليكون ساده جوفا 415', productDescription = '', productCatId = '20', productBuyPrice = '390', productSellAllPrice = '415', productSellUnitPrice = '0', productSellHalfPrice = '0', productDate = '2026-09-27', conditions = '0', userId = '1', limitamount = '0', parcode = '09673',type ='0', expireDate = '0' , dailyentryId = '205',isService = '0',isOptic = '0',lastbuyprice = '395.00',lastbuyprice_withDiscount = '395',meanbuyprice = '395.00',meanbuyprice_withDiscount = '395' , productbuypricereal = '395' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='395',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='9673',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='395',meanbuyprice_withTax='395',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='1',sellpercenttype='0',searchfiltersid='1',lastbuyprice_withDiscountAndTax='395',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='1',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '850';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:01:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:31:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:31:12', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=4302
BEGIN;
INSERT INTO buybill (buybillSerial, buybilldate, buybillsupplierid, buybilltotaldeptbefor, buybilltotaldeptafter, buybilldiscount, buybilldiscountrype, buybilltotalbill, buybillaftertotalbill, buybilltotalpayed, buybillfinalbill, buybillstoreid, buybillsysdate,comment, userid, conditions, buybillclientname, buybillsaveid, buybilldirectpayment, billnameid,payedtax,costcenterid,dailyentryid,delbyuserid,currencyId,taxOfDiscountPer,taxOfDiscountVal,files,client,totalBuyDiscountVal,webApiId,buybilladdition,buybilladditiontrype,tagids) VALUES ('06ac68fb84bc1c', '2026-10-07 21:30:16', '69', '539630.00', '568880', '0', '0', '29250.00',  '29250.00', '0', '29250', '1', '2026-10-07 21:31:12', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=64
INSERT INTO buybilldetail (Parcode, buybillid, buybilldetailcatid, buybilldetailproductid, buybilldetailquantity, buybilldetailprice, buybilldetailtotalprice, discountvalue, note, buybilldetaildate, productunitid,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,quantitybefore, buybilldetailpriceC, buybilldetailtotalpriceC, discountvalueC,discounttype,rowtaxval,rowtaxper,lastbuyprice_withTax,meanbuyprice_withTax,probuyDiscountPer,lastbuyprice_withDiscountAndTax,storeid) VALUES ('09673', '64', '20', '850', '75', '390', '29250.00', '0', '', '2026-10-07 21:31:12', '850','','','0','0','0','0','0',null,'390','29250','0','0','0','0','0','0','0','0','1'); -- id=388
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 21:30:16', 1, 850, 0, 0
                    , 390, 75, 0, 0, 1, '2026-10-07 21:31:12')
                ON DUPLICATE KEY UPDATE buyprice = 390,
                        buyQuantity =buyQuantity+75, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 21:31:12' ; -- id=491
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('850', '390', '75', '0', 'buyBillController.php', '388', '', '0', '0'); -- id=320
UPDATE product SET  productBuyPrice = "390" WHERE productId = 850 ;
UPDATE buybilldetail SET  quantitybefore = 85 WHERE buybilldetailid = 388 ;
UPDATE product SET productName = 'سليكون ساده جوفا 415', productDescription = '', productCatId = '20', productBuyPrice = '390.00', productSellAllPrice = '415.00', productSellUnitPrice = '0.00', productSellHalfPrice = '0.00', productDate = '2026-09-27', conditions = '0', userId = '1', limitamount = '0', parcode = '09673',type ='0', expireDate = '0' , dailyentryId = '205',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '392.66',meanbuyprice_withDiscount = '392.66' , productbuypricereal = '395.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '0.00' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='395',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='9673',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='392.66',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='1',sellpercenttype='0',searchfiltersid='1',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='1',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '850';
UPDATE buybilldetail SET  lastbuyprice = 390 , meanbuyprice = 392.66, lastbuyprice_withDiscount = 390, meanbuyprice_withDiscount = 392.66
        , lastbuyprice_withTax = 390, meanbuyprice_withTax = 392.66, lastbuyprice_withDiscountAndTax = 390
                where buybilldetailid = 388;
UPDATE productunit SET proUnitBuyPrice  = 390 * productnumber WHERE productid = 850;
UPDATE storedetail SET  productquantity = '160', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '850';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('850', '1', '75', '0', '64', 'اضافة فاتورة مشتريات', 'buyBillController.php', '85', '160', '1', '2026-10-07 21:30:16','0','0'); -- id=2896
UPDATE supplier SET  suppliercurrentDebt = '179190',suppliercurrentDebtInCurrency= '568880' , userid = '1', supplierdate = '2026-10-07 21:31:12'   WHERE supplierid = '69';
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('69', '149940.00', '29250', '0', 'اضافة فاتورة مشتريات', '64', '179190', '2026-10-07 21:30:16', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','29250','1','539630','29250','568880','0',''); -- id=231
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '29250', '29250', '2026-10-07', '1', '0', '0', '2026-10-07 21:31:12','اضافة فاتورة مشتريات رقم 64','1','0',null,'0','64','buyBillController.php?do=details&id=64'); -- id=1307
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1307', '382', '29250', '','0'); -- id=1317
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18751221.24', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1307', '488', '29250', '','0'); -- id=1307
UPDATE accountstree SET name = 'جوفا - مورد', customName = 'جوفا - مورد', customNameEn = 'جوفا - مورد', nameEn = 'جوفا - مورد', parent = '81', accountNature = '1', theValue = '22850', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-29 13:17:33' WHERE id = '488';
update buybill set dailyentryid='1307,0' where buybillid=64;
COMMIT;
UPDATE product SET overAllAveragePrice = 390 WHERE productId = 850;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:01:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:31:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 21:31:12', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=64'); -- id=4303
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:01:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:31:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:31:15', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=64&type=2'); -- id=4304
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:02:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:32:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 21:32:14', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=64&type=2'); -- id=4305
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:24:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 21:54:48", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 21:54:48', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=4306
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:39:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 22:09:17", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 22:09:17', '2', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=128'); -- id=4307
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-10-07 18:41:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 22:11:16", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 22:11:16', '6', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=4308
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:41:16";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 22:11:16", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 22:11:16', '6', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4309
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:41:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 22:11:23", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 22:11:23', '6', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=4310
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 18:41:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-07 22:11:26", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 22:11:26', '6', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=4311
