-- ALTER TABLE elarabygt4it_erp.accountmovement AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.accountmovementkind AUTO_INCREMENT = 4;
-- ALTER TABLE elarabygt4it_erp.accountstree AUTO_INCREMENT = 562;
-- 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 = 29;
-- ALTER TABLE elarabygt4it_erp.buybillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buybilldetail AUTO_INCREMENT = 131;
-- ALTER TABLE elarabygt4it_erp.buybilldetailoffer AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buybilloffer AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.buypriceshistorybook AUTO_INCREMENT = 189;
-- 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 = 60;
-- ALTER TABLE elarabygt4it_erp.clientarea AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.clientdebtchange AUTO_INCREMENT = 158;
-- 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 = 1087;
-- ALTER TABLE elarabygt4it_erp.dailyentrycreditor AUTO_INCREMENT = 1087;
-- ALTER TABLE elarabygt4it_erp.dailyentrydebtor AUTO_INCREMENT = 1090;
-- 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 = 99;
-- 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 = 2677;
-- 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 = 101;
-- 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 = 2185;
-- 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 = 1421;
-- ALTER TABLE elarabygt4it_erp.productcat AUTO_INCREMENT = 100;
-- ALTER TABLE elarabygt4it_erp.productcatunit AUTO_INCREMENT = 13;
-- 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 = 1421;
-- 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 = 96;
-- ALTER TABLE elarabygt4it_erp.quickprofitday AUTO_INCREMENT = 96;
-- ALTER TABLE elarabygt4it_erp.quickprofitgeneral AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.quickprofitproduct AUTO_INCREMENT = 472;
-- ALTER TABLE elarabygt4it_erp.quickprofitstore AUTO_INCREMENT = 472;
-- ALTER TABLE elarabygt4it_erp.religions AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.relusergroupproperties AUTO_INCREMENT = 4109;
-- 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 = 3;
-- ALTER TABLE elarabygt4it_erp.returnsellbillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.returnsellbilldetail AUTO_INCREMENT = 3;
-- 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 = 4;
-- ALTER TABLE elarabygt4it_erp.savedaily AUTO_INCREMENT = 97;
-- ALTER TABLE elarabygt4it_erp.sellandruternbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE elarabygt4it_erp.sellbill AUTO_INCREMENT = 77;
-- 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 = 338;
-- 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 = 3;
-- ALTER TABLE elarabygt4it_erp.storedetail AUTO_INCREMENT = 1434;
-- ALTER TABLE elarabygt4it_erp.storemovement AUTO_INCREMENT = 14;
-- ALTER TABLE elarabygt4it_erp.storereport AUTO_INCREMENT = 2115;
-- 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 = 84;
-- ALTER TABLE elarabygt4it_erp.supplierdebtchange AUTO_INCREMENT = 132;
-- 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 = 59;
-- 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 = 6;
-- ALTER TABLE elarabygt4it_erp.usergroup AUTO_INCREMENT = 5;
-- ALTER TABLE elarabygt4it_erp.usergroupadmin AUTO_INCREMENT = 1244;
-- 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 = 77;
-- 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 = 12;
-- ALTER TABLE elarabygt4it_erp.qrerpuserpass AUTO_INCREMENT = 2;
-- ALTER TABLE elarabygt4it_erp.availableparcode AUTO_INCREMENT = 100001;
-- ALTER TABLE elarabygt4it_erp.sellbillstatushistory AUTO_INCREMENT = 66;
-- ALTER TABLE elarabygt4it_erp.clientdetails AUTO_INCREMENT = 3;
-- ALTER TABLE elarabygt4it_erp.productstore AUTO_INCREMENT = 202;
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-04',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-05 05:07:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 08:37:27", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 08:37:27', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2677
UPDATE programsettings SET companyname = 'سنتر احمد العربي', address = 'ش الترعة البولاقيه - امام قسم شبرا - مول العتبه', specializtion = 'ملابس جملة', phone = '01064062900', faxnumber = '', email = '', website = '', logo = '4a754be7e82553f312ecf932e16cce7d.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '-1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '', commercialregistration = '', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-05',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='0',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='1',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='83b7fcbc8ec5f6680b38c85c5097af3b8f9e24beb34e300c92da2aed73200ef3508d6b04b93e1301b69bf990665657d386b98aa70faa9951dfc2289ed943c6cd',associatedtags='0',commentClientChasis='0',dollarExType='64',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0' WHERE programsettingsid = '1';
UPDATE 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-05 05:07:27";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-05 08:37:27", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 08:37:27', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2678
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 05:07:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 08:37:29", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 08:37:29', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2679
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 05:15: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-05 05:16:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 08:46:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 08:46:05', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2680
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-05 05:16:05";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 08:46:06', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2681
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 05:16:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 08:46:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 08:46:09', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2682
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:17: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-05 06:17:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 09:47:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 09:47:52', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2683
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-05 06:17:53";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 09:47:53', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2684
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:17:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 09:47:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 09:47:55', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2685
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:34:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:04:20", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 10:04:20', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=2686

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac337999a003
-- ----------------------------------------------------------------------------------------------------

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-05 10:04:20', '06ac337999a003', '1', '0.00', '0', '20', '1', '14670.00', '14650', '14650', '0', '1', '2026-10-05 10:04:20', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '30' ,'0','','','','','-1','0','0','0','0','0','14650','0','','0','0','14650','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=77
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','اضافة فاتورة مبيعات','77', '0', '2026-10-05 10:04:20', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '14650', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 10:04:20','0','0','',''); -- id=158
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+12 where id = 56;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('420','01371', '77', '91', '1371', '12', '500', '6000', '0', '', '0', '2026-10-05 10:04:20', '1371', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','56-12,','1','1','0','0','500','6000','0','','0','','0','0','0','0'); -- id=338
UPDATE sellbilldetail SET  lastbuyprice = 420.00 , meanbuyprice = 420.00, lastbuyprice_withDiscount = 420.00, meanbuyprice_withDiscount = 420.00
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 420
                where sellbilldetailid = 338;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1371, '2026-10-05', 5991.8200408998, 5040, 5040
                    , 5040, 5040, 5040, 5040
                    , 0, 0, 0, 0
                    , 0, 0, 0, 12, 0, 5040, 5040, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5991.8200408998, sellCostBuyPrice =sellCostBuyPrice+5040
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5040, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5040
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5040, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5040
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5040
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5040
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5040
                        , returnSellVal = returnSellVal+0, 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-05', 5991.8200408998, 5040, 5040
                    , 5040, 5040, 5040, 5040
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5040, 5040, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5991.8200408998, sellCostBuyPrice =sellCostBuyPrice+5040
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5040, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5040
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5040, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5040
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5040
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5040
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5040
                        , returnSellVal = returnSellVal+0, 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 = '78', userid = '2', storedetaildate = '2026-10-05 10:04:20' WHERE storedetailid = '1371';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1371', '1', '12', '1', '77', 'اضافة فاتورة مبيعات', 'sellbillController.php', '90', '78', '2', '2026-10-05 10:04:20','0','0'); -- id=2115
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 55;
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 ('440','01370', '77', '91', '1370', '9', '500', '4500', '0', '', '0', '2026-10-05 10:04:20', '1370', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','55-9,','1','1','0','0','500','4500','0','','0','','0','0','0','0'); -- id=339
UPDATE sellbilldetail SET  lastbuyprice = 440.00 , meanbuyprice = 440.00, lastbuyprice_withDiscount = 440.00, meanbuyprice_withDiscount = 440.00
        , lastbuyprice_withTax = 440, meanbuyprice_withTax = 440, lastbuyprice_withDiscountAndTax = 440
                where sellbilldetailid = 339;
 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 (1370, '2026-10-05', 4493.8650306748, 3960, 3960
                    , 3960, 3960, 3960, 3960
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 3960, 3960, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4493.8650306748, sellCostBuyPrice =sellCostBuyPrice+3960
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3960, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3960
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3960, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3960
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3960
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3960
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3960
                        , returnSellVal = returnSellVal+0, 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-05', 4493.8650306748, 3960, 3960
                    , 3960, 3960, 3960, 3960
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3960, 3960, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4493.8650306748, sellCostBuyPrice =sellCostBuyPrice+3960
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3960, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3960
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3960, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3960
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3960
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3960
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3960
                        , returnSellVal = returnSellVal+0, 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 = '111', userid = '2', storedetaildate = '2026-10-05 10:04:20' WHERE storedetailid = '1370';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1370', '1', '9', '1', '77', 'اضافة فاتورة مبيعات', 'sellbillController.php', '120', '111', '2', '2026-10-05 10:04:20','0','0'); -- id=2116
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 where id = 58;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('410','01373', '77', '91', '1373', '6', '470', '2820', '0', '', '0', '2026-10-05 10:04:20', '1373', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','58-6,','1','1','0','0','470','2820','0','','0','','0','0','0','0'); -- id=340
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 = 340;
 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 (1373, '2026-10-05', 2816.1554192229, 2460, 2460
                    , 2460, 2460, 2460, 2460
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 2460, 2460, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2816.1554192229, sellCostBuyPrice =sellCostBuyPrice+2460
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2460, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2460
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2460, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2460
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2460
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2460
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2460
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+6
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 2816.1554192229, 2460, 2460
                    , 2460, 2460, 2460, 2460
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2460, 2460, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2816.1554192229, sellCostBuyPrice =sellCostBuyPrice+2460
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2460, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2460
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2460, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2460
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2460
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2460
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2460
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '84', userid = '2', storedetaildate = '2026-10-05 10:04:20' WHERE storedetailid = '1373';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1373', '1', '6', '1', '77', 'اضافة فاتورة مبيعات', 'sellbillController.php', '90', '84', '2', '2026-10-05 10:04:20','0','0'); -- id=2117
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 59;
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','01374', '77', '91', '1374', '3', '450', '1350', '0', '', '0', '2026-10-05 10:04:20', '1374', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','59-3,','1','1','0','0','450','1350','0','','0','','0','0','0','0'); -- id=341
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 = 341;
 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 (1374, '2026-10-05', 1348.1595092025, 1170, 1170
                    , 1170, 1170, 1170, 1170
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1170, 1170, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1348.1595092025, sellCostBuyPrice =sellCostBuyPrice+1170
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1170, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1170
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1170, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1170
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1170
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1170
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1170
                        , returnSellVal = returnSellVal+0, 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-05', 1348.1595092025, 1170, 1170
                    , 1170, 1170, 1170, 1170
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1170, 1170, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1348.1595092025, sellCostBuyPrice =sellCostBuyPrice+1170
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1170, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1170
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1170, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1170
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1170
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1170
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1170
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '57', userid = '2', storedetaildate = '2026-10-05 10:04:20' WHERE storedetailid = '1374';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1374', '1', '3', '1', '77', 'اضافة فاتورة مبيعات', 'sellbillController.php', '60', '57', '2', '2026-10-05 10:04:20','0','0'); -- id=2118
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '271655',  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 ('257005','14650', '0', '2', 'اضافة فاتورة مبيعات', '77', '271655', '2026-10-05 10:04:20', '2',  'sellbillController.php','1','','0'); -- id=97
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '14670', '14670', '2026-10-05', '2', '0', '0', '2026-10-05 10:04:20','اضافة فاتورة مبيعات رقم 77','1','0',null,'0','77','sellbillController.php?do=showDetail&sellbillid=77'); -- id=1087
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1087', '419', '14650', '','0'); -- id=1090
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '271655', 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 ('1087', '398', '20', '','0'); -- id=1091
UPDATE accountstree SET name = 'خصم مسموح به', customName = 'خصم مسموح به', customNameEn = '', nameEn = '', parent = '158', accountNature = '0', theValue = '130758', 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 ('1087', '143', '14670', '','0'); -- id=1087
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '874595', 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 ( '12630', '12630', '2026-10-05', '2', '0', '0', '2026-10-05 10:04:20','اضافة فاتورة مبيعات رقم 77 - صرف البضاعة من المخزن','1','0',null,'0','77','sellbillController.php?do=showDetail&sellbillid=77'); -- id=1088
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1088', '402', '12630', '','0'); -- id=1092
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '854619.6', 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 ('1088', '382', '12630', '','0'); -- id=1088
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14733682.4', 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='1087,0,1088' where sellbillid=77;
 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-05', 14650, 12630, 12630
                    , 12630, 12630, 12630, 12630
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,12630, 12630, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+14650, sellCostBuyPrice =sellCostBuyPrice+12630
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+12630, sellCostMeanBuyPrice = sellCostMeanBuyPrice+12630
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+12630, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+12630
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+12630
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+12630
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+12630
                        , returnSellVal = returnSellVal+0, 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-05', 14650, 12630, 12630
                    , 12630, 12630, 12630, 12630
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,12630, 12630, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+14650, sellCostBuyPrice =sellCostBuyPrice+12630
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+12630, sellCostMeanBuyPrice = sellCostMeanBuyPrice+12630
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+12630, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+12630
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+12630
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+12630
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+12630
                        , returnSellVal = returnSellVal+0, 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, 14650, 12630, 12630
                    , 12630, 12630, 12630, 12630, 12630, 12630)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+14650, netSellCostBuyPrice = netSellCostBuyPrice+12630
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+12630
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+12630
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+12630
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+12630
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+12630
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+12630
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+12630;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac337999a003 and sellbillId = 77 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:34:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:04:20", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 10:04:20', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2687
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-05 06:46:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:16:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 10:16:46', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2688
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-05 06:46:46";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 10:16:46', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2689
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:46:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:16:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:16:51', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2690
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:46:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:16:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:16:59', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2691
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:47:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:17:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:17:27', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2692
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:48:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:18:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:18:54', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2693
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:48:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:18:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:18:58', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2694
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:49:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:19:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:19:05', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2695
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:49:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:19:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:19:45', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=add'); -- id=2696
BEGIN;
CALL supplierInUse(15,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
UPDATE supplier SET  suppliercurrentDebt = '59842',suppliercurrentDebtInCurrency= '59842' , userid = '1', supplierdate = '26-10-05'   WHERE supplierid = '15';
UPDATE supplier SET  inUse = 0 where supplierid = 15;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '130073', '130073', '2026-10-05', '1', '0', '0', '2026-10-05 10:19:45','تسوية عجز مورد بالخصم','1','0','0','0','0',''); -- id=1089
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1089', '434', '130073', '','0'); -- id=1093
UPDATE accountstree SET name = 'اباتشي - مورد', customName = 'اباتشي - مورد', customNameEn = 'اباتشي - مورد', nameEn = 'اباتشي - مورد', parent = '81', accountNature = '1', theValue = '-130073', 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 = '434';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1089', '146', '130073', '','0'); -- id=1089
UPDATE accountstree SET name = 'ايرادات الخصم المكتسب', customName = 'ايرادات الخصم المكتسب', customNameEn = 'Acquired Discount Revenues', nameEn = 'Acquired Discount Revenues', parent = '147', accountNature = '1', theValue = '5249058', theOrder = '0', layingOrder = '4203', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Other Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:41' WHERE id = '146';
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 ('15', '189915.00', '130073', '1', 'تسوية عجز مورد بالخصم', '-1', '59842', '2026-10-05 10:19:45', '1', 'supplierDeficitController.php', 'خصومات و مرتجعات السيستم القديم ', '1089','', '0','1','1','130073','1','0','0','0','0',''); -- id=132
UPDATE supplierdebtchange SET supplierid = '15', supplierdebtchangebefore = '189915.00', supplierdebtchangeamount = '130073', supplierdebtchangetype = '1', processname = 'تسوية عجز مورد بالخصم', supplierdebtchangemodelid = '-1', supplierdebtchangeafter = '59842', supplierdebtchangedate = '2026-10-05 10:19:45', userid = '1', tablename = 'supplierDeficitController.php', comment = 'خصومات و مرتجعات السيستم القديم ', dailyentryid = '1089',saveid = '',currencyId='1',conversionFactor='1',payedInCurrency='130073',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='59842',debtchangamountInSupplierCurrency='130073',debtchangafterInSupplierCurrency='59842', paySerialNo='0',tagids='' WHERE supplierdebtchangeid = '132';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:49:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:19:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:19:46', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=sucess'); -- id=2697
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:49:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:19:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:19:47', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2698
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:49:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:19:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:19:54', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2699
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:49:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:19:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:19:58', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2700
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:50:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:20:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:20:36', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2701
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:51:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:21:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:21:04', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2702
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:52:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:22:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:22:31', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2703
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:52:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:22:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:22:58', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=add'); -- id=2704
BEGIN;
CALL supplierInUse(7,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
UPDATE supplier SET  suppliercurrentDebt = '187495',suppliercurrentDebtInCurrency= '187495' , userid = '1', supplierdate = '26-10-05'   WHERE supplierid = '7';
UPDATE supplier SET  inUse = 0 where supplierid = 7;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1150', '1150', '2026-10-05', '1', '0', '0', '2026-10-05 10:22:58','تسوية عجز مورد بالخصم','1','0','0','0','0',''); -- id=1090
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1090', '426', '1150', '','0'); -- id=1094
UPDATE accountstree SET name = 'خالد الدولي - مورد', customName = 'خالد الدولي - مورد', customNameEn = 'خالد الدولي - مورد', nameEn = 'خالد الدولي - مورد', parent = '81', accountNature = '1', theValue = '-1150', 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 ('1090', '146', '1150', '','0'); -- id=1090
UPDATE accountstree SET name = 'ايرادات الخصم المكتسب', customName = 'ايرادات الخصم المكتسب', customNameEn = 'Acquired Discount Revenues', nameEn = 'Acquired Discount Revenues', parent = '147', accountNature = '1', theValue = '5250208', theOrder = '0', layingOrder = '4203', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Other Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:41' WHERE id = '146';
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', '188645.00', '1150', '1', 'تسوية عجز مورد بالخصم', '-1', '187495', '2026-10-05 10:22:58', '1', 'supplierDeficitController.php', 'خصم 4 * 115 + 4 * 120 + 3 * 70', '1090','', '0','1','1','1150','1','0','0','0','0',''); -- id=133
UPDATE supplierdebtchange SET supplierid = '7', supplierdebtchangebefore = '188645.00', supplierdebtchangeamount = '1150', supplierdebtchangetype = '1', processname = 'تسوية عجز مورد بالخصم', supplierdebtchangemodelid = '-1', supplierdebtchangeafter = '187495', supplierdebtchangedate = '2026-10-05 10:22:58', userid = '1', tablename = 'supplierDeficitController.php', comment = 'خصم 4 * 115 + 4 * 120 + 3 * 70', dailyentryid = '1090',saveid = '',currencyId='1',conversionFactor='1',payedInCurrency='1150',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='187495',debtchangamountInSupplierCurrency='1150',debtchangafterInSupplierCurrency='187495', paySerialNo='0',tagids='' WHERE supplierdebtchangeid = '133';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:52:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:22:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:22:59', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=sucess'); -- id=2705
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:53:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:23:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:23:00', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2706
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:53:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:23:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:23:03', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2707
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:53:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:23:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:23:08', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2708
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:53:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:23:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:23:32', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2709
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:54:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:24:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:24:23', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2710
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:54:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:24:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:24:45', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2711
update user set blockedByLimits = 0;
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:55:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:25:10", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 10:25:10', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2712
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-05 06:55:10";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-05 10:25:10", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 10:25:10', '2', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2713
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:55:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:25:12", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 10:25:12', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2714
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:56:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:26:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:26:19', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2715
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:56:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:26:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:26:41', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2716
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:57:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:27:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:27:17', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2717
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 06:57:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:27:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:27:45', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2718
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:00:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:30:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:30:25', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2719
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:01:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:31:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:31:49', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2720
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:02:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:32:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:32:31', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=add'); -- id=2721
BEGIN;
CALL supplierInUse(60,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
UPDATE supplier SET  suppliercurrentDebt = '49990',suppliercurrentDebtInCurrency= '49990' , userid = '1', supplierdate = '26-10-05'   WHERE supplierid = '60';
UPDATE supplier SET  inUse = 0 where supplierid = 60;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '11040', '11040', '2026-10-05', '1', '0', '0', '2026-10-05 10:32:32','تسوية عجز مورد بالخصم','1','0','0','0','0',''); -- id=1091
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1091', '479', '11040', '','0'); -- id=1095
UPDATE accountstree SET name = 'ولف وان - مورد', customName = 'ولف وان - مورد', customNameEn = 'ولف وان - مورد', nameEn = 'ولف وان - مورد', parent = '81', accountNature = '1', theValue = '-56630', 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 = '479';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1091', '146', '11040', '','0'); -- id=1091
UPDATE accountstree SET name = 'ايرادات الخصم المكتسب', customName = 'ايرادات الخصم المكتسب', customNameEn = 'Acquired Discount Revenues', nameEn = 'Acquired Discount Revenues', parent = '147', accountNature = '1', theValue = '5261248', theOrder = '0', layingOrder = '4203', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Other Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:41' WHERE id = '146';
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 ('60', '61030.00', '11040', '1', 'تسوية عجز مورد بالخصم', '-1', '49990', '2026-10-05 10:32:32', '1', 'supplierDeficitController.php', 'خصم المكتب والرجاله على السيستم القديم', '1091','', '0','1','1','11040','1','0','0','0','0',''); -- id=134
UPDATE supplierdebtchange SET supplierid = '60', supplierdebtchangebefore = '61030.00', supplierdebtchangeamount = '11040', supplierdebtchangetype = '1', processname = 'تسوية عجز مورد بالخصم', supplierdebtchangemodelid = '-1', supplierdebtchangeafter = '49990', supplierdebtchangedate = '2026-10-05 10:32:32', userid = '1', tablename = 'supplierDeficitController.php', comment = 'خصم المكتب والرجاله على السيستم القديم', dailyentryid = '1091',saveid = '',currencyId='1',conversionFactor='1',payedInCurrency='11040',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='49990',debtchangamountInSupplierCurrency='11040',debtchangafterInSupplierCurrency='49990', paySerialNo='0',tagids='' WHERE supplierdebtchangeid = '134';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:02:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:32:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:32:32', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=sucess'); -- id=2722
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:02:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:32:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:32:33', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2723
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:04:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:34:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:34:07', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2724
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:04:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:34:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:34:09', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2725
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:04:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:34:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:34:13', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2726
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:04:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:34:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:34:34', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2727
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:05:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:35:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 10:35:18', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2728
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-05 07:05:18";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 10:35:18', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2729
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:05:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:35:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:35:20', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2730
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:05:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:35:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:35:24', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2731
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:05:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:35:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:35:47', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=add'); -- id=2732
BEGIN;
CALL supplierInUse(41,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
UPDATE supplier SET  suppliercurrentDebt = '45151',suppliercurrentDebtInCurrency= '45151' , userid = '1', supplierdate = '26-10-05'   WHERE supplierid = '41';
UPDATE supplier SET  inUse = 0 where supplierid = 41;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2700', '2700', '2026-10-05', '1', '0', '0', '2026-10-05 10:35:47','تسوية عجز مورد بالخصم','1','0','0','0','0',''); -- id=1092
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1092', '460', '2700', '','0'); -- id=1096
UPDATE accountstree SET name = 'ابل - مورد', customName = 'ابل - مورد', customNameEn = 'ابل - مورد', nameEn = 'ابل - مورد', parent = '81', accountNature = '1', theValue = '-2700', 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 = '460';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1092', '146', '2700', '','0'); -- id=1092
UPDATE accountstree SET name = 'ايرادات الخصم المكتسب', customName = 'ايرادات الخصم المكتسب', customNameEn = 'Acquired Discount Revenues', nameEn = 'Acquired Discount Revenues', parent = '147', accountNature = '1', theValue = '5263948', theOrder = '0', layingOrder = '4203', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Other Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:41' WHERE id = '146';
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 ('41', '47851.00', '2700', '1', 'تسوية عجز مورد بالخصم', '-1', '45151', '2026-10-05 10:35:47', '1', 'supplierDeficitController.php', 'تسويه الحساب', '1092','', '0','1','1','2700','1','0','0','0','0',''); -- id=135
UPDATE supplierdebtchange SET supplierid = '41', supplierdebtchangebefore = '47851.00', supplierdebtchangeamount = '2700', supplierdebtchangetype = '1', processname = 'تسوية عجز مورد بالخصم', supplierdebtchangemodelid = '-1', supplierdebtchangeafter = '45151', supplierdebtchangedate = '2026-10-05 10:35:47', userid = '1', tablename = 'supplierDeficitController.php', comment = 'تسويه الحساب', dailyentryid = '1092',saveid = '',currencyId='1',conversionFactor='1',payedInCurrency='2700',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='45151',debtchangamountInSupplierCurrency='2700',debtchangafterInSupplierCurrency='45151', paySerialNo='0',tagids='' WHERE supplierdebtchangeid = '135';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:05:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:35:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:35:47', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=sucess'); -- id=2733
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:05:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:35:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 10:35:49', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2734
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:06:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:36:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:36:03', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2735
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:06:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:36:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:36:06', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2736
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-05 07:06:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:36:15", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 10:36:15', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2737
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-05 07:06:16";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-05 10:36:16", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 10:36:16', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2738
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:06:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:36:19", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 10:36:19', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2739
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:07:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:37:03", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 10:37:03', '4', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=2740

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac35374023e4
-- ----------------------------------------------------------------------------------------------------

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-05 10:37:03', '06ac35374023e4', '1', '0.00', '0', '0', '1', '3510.00', '3510', '3510', '0', '2', '2026-10-05 10:37:03', '', '4', '0', 'نقدي', '3', '0', '3', '0', 'نقدي', '9' ,'0','','','','','-1','0','0','0','0','0','3510','0','','0','0','3510','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=78
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','اضافة فاتورة مبيعات','78', '0', '2026-10-05 10:37:03', '4', 'sellbillController.php', 'اضافة فاتورة مبيعات', '3510', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 10:37:03','0','0','',''); -- id=159
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', '78', '87', '1325', '9', '390', '3510', '0', '', '0', '2026-10-05 10:37:03', '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=342
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 = 342;
 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-05', 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-05', 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 = '291', userid = '4', storedetaildate = '2026-10-05 10:37:03' WHERE storedetailid = '1406';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1325', '2', '9', '1', '78', 'اضافة فاتورة مبيعات', 'sellbillController.php', '300', '291', '4', '2026-10-05 10:37:03','0','0'); -- id=2119
CALL saveInUse(3,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '195840',  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 ('192330','3510', '0', '3', 'اضافة فاتورة مبيعات', '78', '195840', '2026-10-05 10:37:03', '4',  'sellbillController.php','1','','0'); -- id=98
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3510', '3510', '2026-10-05', '4', '0', '0', '2026-10-05 10:37:03','اضافة فاتورة مبيعات رقم 78','1','0',null,'0','78','sellbillController.php?do=showDetail&sellbillid=78'); -- id=1093
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1093', '501', '3510', '','0'); -- id=1097
UPDATE accountstree SET name = 'خزينه المحل الارضي', customName = 'خزينه المحل الارضي', customNameEn = 'خزينه المحل الارضي', nameEn = 'خزينه المحل الارضي', parent = '40', accountNature = '0', theValue = '195840', 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 ('1093', '143', '3510', '','0'); -- id=1093
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '878105', 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 ( '3150', '3150', '2026-10-05', '4', '0', '0', '2026-10-05 10:37:03','اضافة فاتورة مبيعات رقم 78 - صرف البضاعة من المخزن','1','0',null,'0','78','sellbillController.php?do=showDetail&sellbillid=78'); -- id=1094
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1094', '402', '3150', '','0'); -- id=1098
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '857769.6', 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 ('1094', '492', '3150', '','0'); -- id=1094
UPDATE accountstree SET name = 'مخزن المحل', customName = 'مخزن المحل', customNameEn = 'مخزن المحل', nameEn = 'مخزن المحل', parent = '49', accountNature = '0', theValue = '796200', 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='1093,0,1094' where sellbillid=78;
 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-05', 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;
 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-05', 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;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 3510, 3150, 3150
                    , 3150, 3150, 3150, 3150, 3150, 3150)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+3510, netSellCostBuyPrice = netSellCostBuyPrice+3150
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+3150
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+3150
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+3150
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+3150
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+3150
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+3150
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+3150;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac35374023e4 and sellbillId = 78 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:07:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:37:03", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 10:37:03', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2741
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:07:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:37:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:37:19', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2742
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:07:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:37:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:37:35', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2743
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:07:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:37:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:37:54', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2744
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:08:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:38:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:38:12', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2745
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:08:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:38:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:38:36', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2746
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:08:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:38:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:38:49', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2747
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:09:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:39:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:39:02', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2748
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:09:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:39:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:39:16', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2749
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:09:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:39:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:39:52', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2750
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:10:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:40:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:40:24', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2751
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:10:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:40:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:40:47', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2752
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:12:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:42:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:42:04', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2753
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:12:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:42:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:42:32', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2754
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:12:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:42:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:42:48', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2755
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:13:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:43:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:43:02', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2756
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:13:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:43:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:43:23', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2757
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:13:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:43:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:43:36', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2758
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:14:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:44:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:44:12', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2759
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:15:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:45:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:45:26', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2760
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:15:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:45:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:45:44', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2761
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:17:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:47:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:47:36', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2762
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:17:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:47:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:47:56', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2763
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:20:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:50:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:50:19', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2764
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:21:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 10:51:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 10:51:47', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2765
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 07:43: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-05 07:43:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 11:13:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 11:13:45', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2766
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-05 07:43:45";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 11:13:45', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2767
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:49:16";
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-05 08:49:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:19:38", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 12:19:38', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2768
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-05 08:49:38";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-05 12:19:38", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 12:19:38', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2769
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:49:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:19:41", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:19:41', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2770
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:49:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:19:43", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 12:19:43', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=2771
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:49:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:19:53", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:19:53', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2772
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:50:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:20:10", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:20:10', '4', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=2773

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac36bb9654c7
-- ----------------------------------------------------------------------------------------------------

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-05 12:20:10', '06ac36bb9654c7', '1', '0.00', '0', '0', '1', '420.00', '420', '420', '0', '2', '2026-10-05 12:20:10', '', '4', '0', 'نقدي', '3', '0', '3', '0', 'نقدي', '1' ,'0','','','','','-1','0','0','0','0','0','420','0','','0','0','420','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=79
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','اضافة فاتورة مبيعات','79', '0', '2026-10-05 12:20:10', '4', 'sellbillController.php', 'اضافة فاتورة مبيعات', '420', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 12:20:10','0','0','',''); -- id=160
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 where id = 135;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('380','01326', '79', '87', '1326', '1', '420', '420', '0', '', '0', '2026-10-05 12:20:10', '1326', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','135-1,','1','1','0','0','420','420','0','','0','0.00','0','0','0','0'); -- id=343
UPDATE sellbilldetail SET  lastbuyprice = 380.00 , meanbuyprice = 380.00, lastbuyprice_withDiscount = 380.00, meanbuyprice_withDiscount = 380.00
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 380
                where sellbilldetailid = 343;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1326, '2026-10-05', 420, 380, 380
                    , 380, 380, 380, 380
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 380, 380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+420, sellCostBuyPrice =sellCostBuyPrice+380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+380, sellCostMeanBuyPrice = sellCostMeanBuyPrice+380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+380
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+1
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-05', 420, 380, 380
                    , 380, 380, 380, 380
                    , 0, 0, 0, 0
                    , 0, 0, 0, 380, 380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+420, sellCostBuyPrice =sellCostBuyPrice+380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+380, sellCostMeanBuyPrice = sellCostMeanBuyPrice+380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+380
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '242', userid = '4', storedetaildate = '2026-10-05 12:20:10' WHERE storedetailid = '1407';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1326', '2', '1', '1', '79', 'اضافة فاتورة مبيعات', 'sellbillController.php', '243', '242', '4', '2026-10-05 12:20:10','0','0'); -- id=2120
CALL saveInUse(3,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '196260',  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 ('195840','420', '0', '3', 'اضافة فاتورة مبيعات', '79', '196260', '2026-10-05 12:20:10', '4',  'sellbillController.php','1','','0'); -- id=99
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '420', '420', '2026-10-05', '4', '0', '0', '2026-10-05 12:20:10','اضافة فاتورة مبيعات رقم 79','1','0',null,'0','79','sellbillController.php?do=showDetail&sellbillid=79'); -- id=1095
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1095', '501', '420', '','0'); -- id=1099
UPDATE accountstree SET name = 'خزينه المحل الارضي', customName = 'خزينه المحل الارضي', customNameEn = 'خزينه المحل الارضي', nameEn = 'خزينه المحل الارضي', parent = '40', accountNature = '0', theValue = '196260', 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 ('1095', '143', '420', '','0'); -- id=1095
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '878525', 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 ( '380', '380', '2026-10-05', '4', '0', '0', '2026-10-05 12:20:10','اضافة فاتورة مبيعات رقم 79 - صرف البضاعة من المخزن','1','0',null,'0','79','sellbillController.php?do=showDetail&sellbillid=79'); -- id=1096
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1096', '402', '380', '','0'); -- id=1100
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '858149.6', 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 ('1096', '492', '380', '','0'); -- id=1096
UPDATE accountstree SET name = 'مخزن المحل', customName = 'مخزن المحل', customNameEn = 'مخزن المحل', nameEn = 'مخزن المحل', parent = '49', accountNature = '0', theValue = '795820', 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='1095,0,1096' where sellbillid=79;
 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-05', 420, 380, 380
                    , 380, 380, 380, 380
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,380, 380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+420, sellCostBuyPrice =sellCostBuyPrice+380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+380, sellCostMeanBuyPrice = sellCostMeanBuyPrice+380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+380
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 420, 380, 380
                    , 380, 380, 380, 380
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,380, 380, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+420, sellCostBuyPrice =sellCostBuyPrice+380
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+380, sellCostMeanBuyPrice = sellCostMeanBuyPrice+380
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+380, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+380
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+380
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+380
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+380
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 420, 380, 380
                    , 380, 380, 380, 380, 380, 380)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+420, netSellCostBuyPrice = netSellCostBuyPrice+380
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+380
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+380
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+380
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+380
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+380
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+380
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+380;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac36bb9654c7 and sellbillId = 79 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:50:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:20:11", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:20:11', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2774
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:50:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:20:18", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 12:20:18', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=2775
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:50:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:20:24", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:20:24', '4', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=79'); -- id=2776
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:50:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:20:35", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:20:35', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2777
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:50:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:20:48", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:20:48', '4', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=2778

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac36be3c3374
-- ----------------------------------------------------------------------------------------------------

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-05 12:20:48', '06ac36be3c3374', '1', '0.00', '0', '0', '1', '3780.00', '3780', '3780', '0', '2', '2026-10-05 12:20:48', '', '4', '0', 'نقدي', '3', '0', '3', '0', 'نقدي', '9' ,'0','','','','','-1','0','0','0','0','0','3780','0','','0','0','3780','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=80
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','اضافة فاتورة مبيعات','80', '0', '2026-10-05 12:20:48', '4', 'sellbillController.php', 'اضافة فاتورة مبيعات', '3780', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 12:20:48','0','0','',''); -- id=161
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 135;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('380','01326', '80', '87', '1326', '9', '420', '3780', '0', '', '0', '2026-10-05 12:20:48', '1326', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','135-9,','1','1','0','0','420','3780','0','','0','0.00','0','0','0','0'); -- id=344
UPDATE sellbilldetail SET  lastbuyprice = 380.00 , meanbuyprice = 380.00, lastbuyprice_withDiscount = 380.00, meanbuyprice_withDiscount = 380.00
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 380
                where sellbilldetailid = 344;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1326, '2026-10-05', 3780, 3420, 3420
                    , 3420, 3420, 3420, 3420
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 3420, 3420, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3780, sellCostBuyPrice =sellCostBuyPrice+3420
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3420, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3420
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3420, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3420
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3420
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3420
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3420
                        , returnSellVal = returnSellVal+0, 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-05', 3780, 3420, 3420
                    , 3420, 3420, 3420, 3420
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3420, 3420, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3780, sellCostBuyPrice =sellCostBuyPrice+3420
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3420, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3420
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3420, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3420
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3420
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3420
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3420
                        , returnSellVal = returnSellVal+0, 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 = '233', userid = '4', storedetaildate = '2026-10-05 12:20:48' WHERE storedetailid = '1407';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1326', '2', '9', '1', '80', 'اضافة فاتورة مبيعات', 'sellbillController.php', '242', '233', '4', '2026-10-05 12:20:48','0','0'); -- id=2121
CALL saveInUse(3,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '200040',  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 ('196260','3780', '0', '3', 'اضافة فاتورة مبيعات', '80', '200040', '2026-10-05 12:20:48', '4',  'sellbillController.php','1','','0'); -- id=100
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3780', '3780', '2026-10-05', '4', '0', '0', '2026-10-05 12:20:48','اضافة فاتورة مبيعات رقم 80','1','0',null,'0','80','sellbillController.php?do=showDetail&sellbillid=80'); -- id=1097
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1097', '501', '3780', '','0'); -- id=1101
UPDATE accountstree SET name = 'خزينه المحل الارضي', customName = 'خزينه المحل الارضي', customNameEn = 'خزينه المحل الارضي', nameEn = 'خزينه المحل الارضي', parent = '40', accountNature = '0', theValue = '200040', 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 ('1097', '143', '3780', '','0'); -- id=1097
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '882305', 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 ( '3420', '3420', '2026-10-05', '4', '0', '0', '2026-10-05 12:20:48','اضافة فاتورة مبيعات رقم 80 - صرف البضاعة من المخزن','1','0',null,'0','80','sellbillController.php?do=showDetail&sellbillid=80'); -- id=1098
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1098', '402', '3420', '','0'); -- id=1102
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '861569.6', 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 ('1098', '492', '3420', '','0'); -- id=1098
UPDATE accountstree SET name = 'مخزن المحل', customName = 'مخزن المحل', customNameEn = 'مخزن المحل', nameEn = 'مخزن المحل', parent = '49', accountNature = '0', theValue = '792400', 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='1097,0,1098' where sellbillid=80;
 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-05', 3780, 3420, 3420
                    , 3420, 3420, 3420, 3420
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3420, 3420, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3780, sellCostBuyPrice =sellCostBuyPrice+3420
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3420, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3420
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3420, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3420
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3420
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3420
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3420
                        , returnSellVal = returnSellVal+0, 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-05', 3780, 3420, 3420
                    , 3420, 3420, 3420, 3420
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3420, 3420, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3780, sellCostBuyPrice =sellCostBuyPrice+3420
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3420, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3420
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3420, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3420
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3420
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3420
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3420
                        , returnSellVal = returnSellVal+0, 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, 3780, 3420, 3420
                    , 3420, 3420, 3420, 3420, 3420, 3420)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+3780, netSellCostBuyPrice = netSellCostBuyPrice+3420
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+3420
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+3420
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+3420
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+3420
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+3420
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+3420
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+3420;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac36be3c3374 and sellbillId = 80 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:50:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:20:49", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:20:49', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2779
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:50:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:20:59", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 12:20:59', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=2780
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:51:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:21:15", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:21:15', '4', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=79'); -- id=2781
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:52:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:22:01", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:22:01', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2782
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:55:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:25:16", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:25:16', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=2783

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac34bf49ae71
-- ----------------------------------------------------------------------------------------------------

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-05 12:25:16', '06ac34bf49ae71', '1', '0.00', '0', '0', '1', '5970.00', '5970', '5970', '0', '1', '2026-10-05 12:25:16', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '15' ,'0','','','','','-1','0','0','0','0','0','5970','0','','0','0','5970','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=81
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','اضافة فاتورة مبيعات','81', '0', '2026-10-05 12:25:16', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '5970', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 12:25:16','0','0','',''); -- id=162
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 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', '81', '94', '1380', '3', '390', '1170', '0', '', '0', '2026-10-05 12:25:16', '1380', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','72-3,','1','1','0','0','390','1170','0','','0','0.00','0','0','0','0'); -- id=345
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 = 345;
 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-05', 1170, 1050, 1050
                    , 1050, 1050, 1050, 1050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1050, 1050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1170, sellCostBuyPrice =sellCostBuyPrice+1050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 1170, 1050, 1050
                    , 1050, 1050, 1050, 1050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1050, 1050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1170, sellCostBuyPrice =sellCostBuyPrice+1050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '750', userid = '2', storedetaildate = '2026-10-05 12:25:16' WHERE storedetailid = '1380';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1380', '1', '3', '1', '81', 'اضافة فاتورة مبيعات', 'sellbillController.php', '753', '750', '2', '2026-10-05 12:25:16','0','0'); -- id=2122
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+12 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', '81', '94', '1382', '12', '400', '4800', '0', '', '0', '2026-10-05 12:25:16', '1382', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','74-12,','1','1','0','0','400','4800','0','','0','0.00','0','0','0','0'); -- id=346
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 = 346;
 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-05', 4800, 4320, 4320
                    , 4320, 4320, 4320, 4320
                    , 0, 0, 0, 0
                    , 0, 0, 0, 12, 0, 4320, 4320, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4800, sellCostBuyPrice =sellCostBuyPrice+4320
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4320, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4320
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4320, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4320
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4320
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4320
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4320
                        , returnSellVal = returnSellVal+0, 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-05', 4800, 4320, 4320
                    , 4320, 4320, 4320, 4320
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4320, 4320, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4800, sellCostBuyPrice =sellCostBuyPrice+4320
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4320, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4320
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4320, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4320
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4320
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4320
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4320
                        , returnSellVal = returnSellVal+0, 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-05 12:25:16' WHERE storedetailid = '1382';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1382', '1', '12', '1', '81', 'اضافة فاتورة مبيعات', 'sellbillController.php', '288', '276', '2', '2026-10-05 12:25:16','0','0'); -- id=2123
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '277625',  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 ('271655','5970', '0', '2', 'اضافة فاتورة مبيعات', '81', '277625', '2026-10-05 12:25:16', '2',  'sellbillController.php','1','','0'); -- id=101
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '5970', '5970', '2026-10-05', '2', '0', '0', '2026-10-05 12:25:16','اضافة فاتورة مبيعات رقم 81','1','0',null,'0','81','sellbillController.php?do=showDetail&sellbillid=81'); -- id=1099
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1099', '419', '5970', '','0'); -- id=1103
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '277625', 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 ('1099', '143', '5970', '','0'); -- id=1099
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '888275', 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 ( '5370', '5370', '2026-10-05', '2', '0', '0', '2026-10-05 12:25:16','اضافة فاتورة مبيعات رقم 81 - صرف البضاعة من المخزن','1','0',null,'0','81','sellbillController.php?do=showDetail&sellbillid=81'); -- id=1100
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1100', '402', '5370', '','0'); -- id=1104
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '866939.6', 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 ('1100', '382', '5370', '','0'); -- id=1100
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14728312.4', 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='1099,0,1100' where sellbillid=81;
 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-05', 5970, 5370, 5370
                    , 5370, 5370, 5370, 5370
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,5370, 5370, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5970, sellCostBuyPrice =sellCostBuyPrice+5370
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5370, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5370
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5370, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5370
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5370
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5370
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5370
                        , returnSellVal = returnSellVal+0, 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-05', 5970, 5370, 5370
                    , 5370, 5370, 5370, 5370
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,5370, 5370, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5970, sellCostBuyPrice =sellCostBuyPrice+5370
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+5370, sellCostMeanBuyPrice = sellCostMeanBuyPrice+5370
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+5370, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+5370
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+5370
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+5370
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+5370
                        , returnSellVal = returnSellVal+0, 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, 5970, 5370, 5370
                    , 5370, 5370, 5370, 5370, 5370, 5370)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+5970, netSellCostBuyPrice = netSellCostBuyPrice+5370
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+5370
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+5370
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+5370
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+5370
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+5370
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+5370
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+5370;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac34bf49ae71 and sellbillId = 81 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:55:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:25:16", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:25:16', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2784
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-05 08:59:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:29:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 12:29:34', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2785
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-05 08:59:35";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 12:29:35', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2786
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 08:59:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:29:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 12:29:59', '1', 'show2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php?do=show2'); -- id=2787
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:00:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:30:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 12:30:26', '1', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php?do=showDetail&savedailyid=97'); -- id=2788
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:00:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:30:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 12:30:34', '1', 'all', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=all'); -- id=2789
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:00:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:30:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 12:30:36', '1', 'all', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=all'); -- id=2790
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:00:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:30:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 12:30:41', '1', 'all', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=all'); -- id=2791
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:05:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:35:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:35:58', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2792
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:06:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:36:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:36:13', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=add'); -- id=2793
BEGIN;
CALL supplierInUse(46,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
UPDATE supplier SET  suppliercurrentDebt = '89949.7',suppliercurrentDebtInCurrency= '89949.7' , userid = '1', supplierdate = '26-10-05'   WHERE supplierid = '46';
UPDATE supplier SET  inUse = 0 where supplierid = 46;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '900', '900', '2026-10-05', '1', '0', '0', '2026-10-05 12:36:13','تسوية عجز مورد بالخصم','1','0','0','0','0',''); -- id=1101
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1101', '465', '900', '','0'); -- id=1105
UPDATE accountstree SET name = 'عليوه استور - مورد', customName = 'عليوه استور - مورد', customNameEn = 'عليوه استور - مورد', nameEn = 'عليوه استور - مورد', parent = '81', accountNature = '1', theValue = '-900', 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 = '465';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1101', '146', '900', '','0'); -- id=1101
UPDATE accountstree SET name = 'ايرادات الخصم المكتسب', customName = 'ايرادات الخصم المكتسب', customNameEn = 'Acquired Discount Revenues', nameEn = 'Acquired Discount Revenues', parent = '147', accountNature = '1', theValue = '5264848', theOrder = '0', layingOrder = '4203', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Other Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:41' WHERE id = '146';
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 ('46', '90849.70', '900', '1', 'تسوية عجز مورد بالخصم', '-1', '89949.7', '2026-10-05 12:36:13', '1', 'supplierDeficitController.php', '', '1101','', '0','1','1','900','1','0','0','0','0',''); -- id=136
UPDATE supplierdebtchange SET supplierid = '46', supplierdebtchangebefore = '90849.70', supplierdebtchangeamount = '900', supplierdebtchangetype = '1', processname = 'تسوية عجز مورد بالخصم', supplierdebtchangemodelid = '-1', supplierdebtchangeafter = '89949.7', supplierdebtchangedate = '2026-10-05 12:36:13', userid = '1', tablename = 'supplierDeficitController.php', comment = '', dailyentryid = '1101',saveid = '',currencyId='1',conversionFactor='1',payedInCurrency='900',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='89949.7',debtchangamountInSupplierCurrency='900',debtchangafterInSupplierCurrency='89949.7', paySerialNo='0',tagids='' WHERE supplierdebtchangeid = '136';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:06:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:36:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:36:14', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=sucess'); -- id=2794
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:06:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:36:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:36:15', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2795
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:06:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:36:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 12:36:19', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2796
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:06:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:36:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 12:36:24', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2797
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:06:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:36:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:36:40', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2798
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:06:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:36:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:36:44', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2799
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:07:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:37:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-05 12:37:21', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php'); -- id=2800
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:07:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:37:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-05 12:37:27', '1', 'supplierShow2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php?do=supplierShow2'); -- id=2801
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:07:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:37:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-05 12:37:30', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=editprint&id=46'); -- id=2802
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:07:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:37:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:37:35', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=editprint&id=136'); -- id=2803
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:14:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:44:42", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:44:42', '4', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=2804

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac36c39dbbe9
-- ----------------------------------------------------------------------------------------------------

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-05 12:44:42', '06ac36c39dbbe9', '1', '0.00', '0', '0', '1', '7730.00', '7730', '7730', '0', '2', '2026-10-05 12:44:42', '', '4', '0', 'نقدي', '3', '0', '3', '0', 'نقدي', '19' ,'0','','','','','-1','0','0','0','0','0','7730','0','','0','0','7730','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=82
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','اضافة فاتورة مبيعات','82', '0', '2026-10-05 12:44:42', '4', 'sellbillController.php', 'اضافة فاتورة مبيعات', '7730', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 12:44:42','0','0','',''); -- id=163
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', '82', '89', '1362', '8', '410', '3280', '0', '', '0', '2026-10-05 12:44:42', '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=347
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 = 347;
 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-05', 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-05', 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 = '12', userid = '4', storedetaildate = '2026-10-05 12:44:42' WHERE storedetailid = '1409';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1362', '2', '8', '1', '82', 'اضافة فاتورة مبيعات', 'sellbillController.php', '20', '12', '4', '2026-10-05 12:44:42','0','0'); -- id=2124
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+8 where id = 137;
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','01361', '82', '89', '1361', '8', '410', '3280', '0', '', '0', '2026-10-05 12:44:42', '1361', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','137-8,','1','1','0','0','410','3280','0','','0','0.00','0','0','0','0'); -- id=348
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 = 348;
 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 (1361, '2026-10-05', 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-05', 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 = '4', userid = '4', storedetaildate = '2026-10-05 12:44:42' WHERE storedetailid = '1408';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1361', '2', '8', '1', '82', 'اضافة فاتورة مبيعات', 'sellbillController.php', '12', '4', '4', '2026-10-05 12:44:42','0','0'); -- id=2125
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 133;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('350','01325', '82', '87', '1325', '3', '390', '1170', '0', '', '0', '2026-10-05 12:44:42', '1325', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','133-3,','1','1','0','0','390','1170','0','','0','0.00','0','0','0','0'); -- id=349
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 = 349;
 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-05', 1170, 1050, 1050
                    , 1050, 1050, 1050, 1050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1050, 1050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1170, sellCostBuyPrice =sellCostBuyPrice+1050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-05', 1170, 1050, 1050
                    , 1050, 1050, 1050, 1050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1050, 1050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1170, sellCostBuyPrice =sellCostBuyPrice+1050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '288', userid = '4', storedetaildate = '2026-10-05 12:44:42' WHERE storedetailid = '1406';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1325', '2', '3', '1', '82', 'اضافة فاتورة مبيعات', 'sellbillController.php', '291', '288', '4', '2026-10-05 12:44:42','0','0'); -- id=2126
CALL saveInUse(3,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '207770',  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 ('200040','7730', '0', '3', 'اضافة فاتورة مبيعات', '82', '207770', '2026-10-05 12:44:42', '4',  'sellbillController.php','1','','0'); -- id=102
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '7730', '7730', '2026-10-05', '4', '0', '0', '2026-10-05 12:44:42','اضافة فاتورة مبيعات رقم 82','1','0',null,'0','82','sellbillController.php?do=showDetail&sellbillid=82'); -- id=1102
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1102', '501', '7730', '','0'); -- id=1106
UPDATE accountstree SET name = 'خزينه المحل الارضي', customName = 'خزينه المحل الارضي', customNameEn = 'خزينه المحل الارضي', nameEn = 'خزينه المحل الارضي', parent = '40', accountNature = '0', theValue = '207770', 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 ('1102', '143', '7730', '','0'); -- id=1102
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '896005', 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 ( '6970', '6970', '2026-10-05', '4', '0', '0', '2026-10-05 12:44:42','اضافة فاتورة مبيعات رقم 82 - صرف البضاعة من المخزن','1','0',null,'0','82','sellbillController.php?do=showDetail&sellbillid=82'); -- id=1103
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1103', '402', '6970', '','0'); -- id=1107
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '873909.6', 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 ('1103', '492', '6970', '','0'); -- id=1103
UPDATE accountstree SET name = 'مخزن المحل', customName = 'مخزن المحل', customNameEn = 'مخزن المحل', nameEn = 'مخزن المحل', parent = '49', accountNature = '0', theValue = '785430', 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='1102,0,1103' where sellbillid=82;
 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-05', 7730, 6970, 6970
                    , 6970, 6970, 6970, 6970
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,6970, 6970, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7730, sellCostBuyPrice =sellCostBuyPrice+6970
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6970, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6970
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6970, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6970
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6970
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6970
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6970
                        , returnSellVal = returnSellVal+0, 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-05', 7730, 6970, 6970
                    , 6970, 6970, 6970, 6970
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,6970, 6970, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7730, sellCostBuyPrice =sellCostBuyPrice+6970
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+6970, sellCostMeanBuyPrice = sellCostMeanBuyPrice+6970
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+6970, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+6970
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+6970
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+6970
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+6970
                        , returnSellVal = returnSellVal+0, 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, 7730, 6970, 6970
                    , 6970, 6970, 6970, 6970, 6970, 6970)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+7730, netSellCostBuyPrice = netSellCostBuyPrice+6970
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+6970
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+6970
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+6970
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+6970
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+6970
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+6970
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+6970;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac36c39dbbe9 and sellbillId = 82 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:14:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:44:42", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:44:42', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2805
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:16:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:46:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 12:46:14', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2806
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:16:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:46:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 12:46:19', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2807
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:16:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:46:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 12:46:27', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=6'); -- id=2808
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:18:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:48:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 12:48:01', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2809
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:18:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:48:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 12:48:06', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2810
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:20:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:50:46", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:50:46', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=2811

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac36cfc954e9
-- ----------------------------------------------------------------------------------------------------

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-05 12:50:46', '06ac36cfc954e9', '1', '0.00', '0', '0', '1', '3600.00', '3600', '3600', '0', '1', '2026-10-05 12:50:46', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '10' ,'0','','','','','-1','0','0','0','0','0','3600','0','','0','0','3600','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=83
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','اضافة فاتورة مبيعات','83', '0', '2026-10-05 12:50:46', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '3600', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 12:50:46','0','0','',''); -- id=164
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 ('355','09632', '83', '24', '885', '5', '375', '1875', '0', '', '0', '2026-10-05 12:50:46', '885', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','375','1875','0','','0','0.00','0','0','0','0'); -- id=350
UPDATE sellbilldetail SET  lastbuyprice = 355.00 , meanbuyprice = 355.00, lastbuyprice_withDiscount = 355.00, meanbuyprice_withDiscount = 355.00
        , lastbuyprice_withTax = 355, meanbuyprice_withTax = 355, lastbuyprice_withDiscountAndTax = 355
                where sellbilldetailid = 350;
 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 (885, '2026-10-05', 1875, 1775, 1775
                    , 1775, 1775, 1775, 1775
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1775, 1775, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1875, sellCostBuyPrice =sellCostBuyPrice+1775
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1775, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1775
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1775, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1775
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1775
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1775
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1775
                        , returnSellVal = returnSellVal+0, 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-05', 1875, 1775, 1775
                    , 1775, 1775, 1775, 1775
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1775, 1775, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1875, sellCostBuyPrice =sellCostBuyPrice+1775
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1775, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1775
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1775, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1775
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1775
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1775
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1775
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '25', userid = '2', storedetaildate = '2026-10-05 12:50:46' WHERE storedetailid = '885';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('885', '1', '5', '1', '83', 'اضافة فاتورة مبيعات', 'sellbillController.php', '30', '25', '2', '2026-10-05 12:50:46','0','0'); -- id=2127
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 ('325','06518', '83', '6', '670', '5', '345', '1725', '0', '', '0', '2026-10-05 12:50:46', '670', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','345','1725','0','','0','0.00','0','0','0','0'); -- id=351
UPDATE sellbilldetail SET  lastbuyprice = 325.00 , meanbuyprice = 325.00, lastbuyprice_withDiscount = 325.00, meanbuyprice_withDiscount = 325.00
        , lastbuyprice_withTax = 325, meanbuyprice_withTax = 325, lastbuyprice_withDiscountAndTax = 325
                where sellbilldetailid = 351;
 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 (670, '2026-10-05', 1725, 1625, 1625
                    , 1625, 1625, 1625, 1625
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1625, 1625, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1725, sellCostBuyPrice =sellCostBuyPrice+1625
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1625, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1625
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1625, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1625
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1625
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1625
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1625
                        , returnSellVal = returnSellVal+0, 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-05', 1725, 1625, 1625
                    , 1625, 1625, 1625, 1625
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1625, 1625, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1725, sellCostBuyPrice =sellCostBuyPrice+1625
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1625, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1625
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1625, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1625
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1625
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1625
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1625
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '54', userid = '2', storedetaildate = '2026-10-05 12:50:46' WHERE storedetailid = '670';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('670', '1', '5', '1', '83', 'اضافة فاتورة مبيعات', 'sellbillController.php', '59', '54', '2', '2026-10-05 12:50:46','0','0'); -- id=2128
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '281225',  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 ('277625','3600', '0', '2', 'اضافة فاتورة مبيعات', '83', '281225', '2026-10-05 12:50:46', '2',  'sellbillController.php','1','','0'); -- id=103
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3600', '3600', '2026-10-05', '2', '0', '0', '2026-10-05 12:50:46','اضافة فاتورة مبيعات رقم 83','1','0',null,'0','83','sellbillController.php?do=showDetail&sellbillid=83'); -- id=1104
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1104', '419', '3600', '','0'); -- id=1108
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '281225', 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 ('1104', '143', '3600', '','0'); -- id=1104
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '899605', 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-05', '2', '0', '0', '2026-10-05 12:50:46','اضافة فاتورة مبيعات رقم 83 - صرف البضاعة من المخزن','1','0',null,'0','83','sellbillController.php?do=showDetail&sellbillid=83'); -- id=1105
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1105', '402', '3400', '','0'); -- id=1109
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '877309.6', 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 ('1105', '382', '3400', '','0'); -- id=1105
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14724912.4', 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='1104,0,1105' where sellbillid=83;
 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-05', 3600, 3400, 3400
                    , 3400, 3400, 3400, 3400
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3400, 3400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3600, 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-05', 3600, 3400, 3400
                    , 3400, 3400, 3400, 3400
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,3400, 3400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3600, 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, 3600, 3400, 3400
                    , 3400, 3400, 3400, 3400, 3400, 3400)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+3600, 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 06ac36cfc954e9 and sellbillId = 83 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:20:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:50:46", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 12:50:46', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2812
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:23:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:53:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:53:53', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2813
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:24:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:54:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:54:44', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2814
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:24:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:54:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-05 12:54:50', '1', 'supplierShow2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php?do=supplierShow2'); -- id=2815
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:25:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:55:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:55:24', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=add'); -- id=2816
BEGIN;
CALL supplierInUse(25,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
UPDATE supplier SET  suppliercurrentDebt = '483405',suppliercurrentDebtInCurrency= '483405' , userid = '1', supplierdate = '26-10-05'   WHERE supplierid = '25';
UPDATE supplier SET  inUse = 0 where supplierid = 25;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '16420', '16420', '2026-10-05', '1', '0', '0', '2026-10-05 12:55:24','تسوية عجز مورد بالخصم','1','0','0','0','0',''); -- id=1106
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1106', '444', '16420', '','0'); -- id=1110
UPDATE accountstree SET name = 'سيفن ار - مورد', customName = 'سيفن ار - مورد', customNameEn = 'سيفن ار - مورد', nameEn = 'سيفن ار - مورد', parent = '81', accountNature = '1', theValue = '-192670', 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 = '444';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1106', '146', '16420', '','0'); -- id=1106
UPDATE accountstree SET name = 'ايرادات الخصم المكتسب', customName = 'ايرادات الخصم المكتسب', customNameEn = 'Acquired Discount Revenues', nameEn = 'Acquired Discount Revenues', parent = '147', accountNature = '1', theValue = '5281268', theOrder = '0', layingOrder = '4203', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Other Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:41' WHERE id = '146';
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 ('25', '499825.00', '16420', '1', 'تسوية عجز مورد بالخصم', '-1', '483405', '2026-10-05 12:55:24', '1', 'supplierDeficitController.php', 'خصم 208 قطعه * 40 جنيه كود 9745
خصم 135 جنيه * 60 قطعه كود 9745', '1106','', '0','1','1','16420','1','0','0','0','0',''); -- id=137
UPDATE supplierdebtchange SET supplierid = '25', supplierdebtchangebefore = '499825.00', supplierdebtchangeamount = '16420', supplierdebtchangetype = '1', processname = 'تسوية عجز مورد بالخصم', supplierdebtchangemodelid = '-1', supplierdebtchangeafter = '483405', supplierdebtchangedate = '2026-10-05 12:55:24', userid = '1', tablename = 'supplierDeficitController.php', comment = 'خصم 208 قطعه * 40 جنيه كود 9745
خصم 135 جنيه * 60 قطعه كود 9745', dailyentryid = '1106',saveid = '',currencyId='1',conversionFactor='1',payedInCurrency='16420',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='483405',debtchangamountInSupplierCurrency='16420',debtchangafterInSupplierCurrency='483405', paySerialNo='0',tagids='' WHERE supplierdebtchangeid = '137';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:25:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:55:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:55:24', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=sucess'); -- id=2817
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:25:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:55:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:55:26', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2818
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:28:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:58:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:58:42', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2819
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:29:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:59:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:59:07', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=add'); -- id=2820
BEGIN;
CALL supplierInUse(11,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
UPDATE supplier SET  suppliercurrentDebt = '127378',suppliercurrentDebtInCurrency= '127378' , userid = '1', supplierdate = '26-10-05'   WHERE supplierid = '11';
UPDATE supplier SET  inUse = 0 where supplierid = 11;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2880', '2880', '2026-10-05', '1', '0', '0', '2026-10-05 12:59:07','تسوية عجز مورد بالخصم','1','0','0','0','0',''); -- id=1107
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1107', '430', '2880', '','0'); -- id=1111
UPDATE accountstree SET name = 'الاسباني - مورد', customName = 'الاسباني - مورد', customNameEn = 'الاسباني - مورد', nameEn = 'الاسباني - مورد', parent = '81', accountNature = '1', theValue = '-11550', 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 = '430';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1107', '146', '2880', '','0'); -- id=1107
UPDATE accountstree SET name = 'ايرادات الخصم المكتسب', customName = 'ايرادات الخصم المكتسب', customNameEn = 'Acquired Discount Revenues', nameEn = 'Acquired Discount Revenues', parent = '147', accountNature = '1', theValue = '5284148', theOrder = '0', layingOrder = '4203', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Other Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:41' WHERE id = '146';
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 ('11', '130258.00', '2880', '1', 'تسوية عجز مورد بالخصم', '-1', '127378', '2026-10-05 12:59:07', '1', 'supplierDeficitController.php', 'خصم 48 قطعه * 60 جنيه كود 9267', '1107','', '0','1','1','2880','1','0','0','0','0',''); -- id=138
UPDATE supplierdebtchange SET supplierid = '11', supplierdebtchangebefore = '130258.00', supplierdebtchangeamount = '2880', supplierdebtchangetype = '1', processname = 'تسوية عجز مورد بالخصم', supplierdebtchangemodelid = '-1', supplierdebtchangeafter = '127378', supplierdebtchangedate = '2026-10-05 12:59:07', userid = '1', tablename = 'supplierDeficitController.php', comment = 'خصم 48 قطعه * 60 جنيه كود 9267', dailyentryid = '1107',saveid = '',currencyId='1',conversionFactor='1',payedInCurrency='2880',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='127378',debtchangamountInSupplierCurrency='2880',debtchangafterInSupplierCurrency='127378', paySerialNo='0',tagids='' WHERE supplierdebtchangeid = '138';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:29:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:59:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:59:07', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=sucess'); -- id=2821
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:29:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 12:59:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 12:59:09', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2822
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:30:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:00:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 13:00:53', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2823
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:31:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:01:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 13:01:20', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=add'); -- id=2824
BEGIN;
CALL supplierInUse(7,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
UPDATE supplier SET  suppliercurrentDebt = '186345',suppliercurrentDebtInCurrency= '186345' , userid = '1', supplierdate = '26-10-05'   WHERE supplierid = '7';
UPDATE supplier SET  inUse = 0 where supplierid = 7;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1150', '1150', '2026-10-05', '1', '0', '0', '2026-10-05 13:01:20','تسوية عجز مورد بالخصم','1','0','0','0','0',''); -- id=1108
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1108', '426', '1150', '','0'); -- id=1112
UPDATE accountstree SET name = 'خالد الدولي - مورد', customName = 'خالد الدولي - مورد', customNameEn = 'خالد الدولي - مورد', nameEn = 'خالد الدولي - مورد', parent = '81', accountNature = '1', theValue = '-2300', 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 ('1108', '146', '1150', '','0'); -- id=1108
UPDATE accountstree SET name = 'ايرادات الخصم المكتسب', customName = 'ايرادات الخصم المكتسب', customNameEn = 'Acquired Discount Revenues', nameEn = 'Acquired Discount Revenues', parent = '147', accountNature = '1', theValue = '5285298', theOrder = '0', layingOrder = '4203', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Other Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:41' WHERE id = '146';
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', '187495.00', '1150', '1', 'تسوية عجز مورد بالخصم', '-1', '186345', '2026-10-05 13:01:20', '1', 'supplierDeficitController.php', 'خصم 115 * 4 قطع كود 17402
خصم 120 * 4 قطع كود 1561
خصم 70 * 3 قطع كود 1562', '1108','', '0','1','1','1150','1','0','0','0','0',''); -- id=139
UPDATE supplierdebtchange SET supplierid = '7', supplierdebtchangebefore = '187495.00', supplierdebtchangeamount = '1150', supplierdebtchangetype = '1', processname = 'تسوية عجز مورد بالخصم', supplierdebtchangemodelid = '-1', supplierdebtchangeafter = '186345', supplierdebtchangedate = '2026-10-05 13:01:20', userid = '1', tablename = 'supplierDeficitController.php', comment = 'خصم 115 * 4 قطع كود 17402
خصم 120 * 4 قطع كود 1561
خصم 70 * 3 قطع كود 1562', dailyentryid = '1108',saveid = '',currencyId='1',conversionFactor='1',payedInCurrency='1150',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='186345',debtchangamountInSupplierCurrency='1150',debtchangafterInSupplierCurrency='186345', paySerialNo='0',tagids='' WHERE supplierdebtchangeid = '139';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:31:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:01:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 13:01:21', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=sucess'); -- id=2825
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:31:22";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:01:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 13:01:22', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2826
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:37:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:07:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 13:07:46', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2827
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:37:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:07:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 13:07:58', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=add'); -- id=2828
BEGIN;
CALL supplierInUse(11,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
UPDATE supplier SET  suppliercurrentDebt = '119638',suppliercurrentDebtInCurrency= '119638' , userid = '1', supplierdate = '26-10-05'   WHERE supplierid = '11';
UPDATE supplier SET  inUse = 0 where supplierid = 11;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '7740', '7740', '2026-10-05', '1', '0', '0', '2026-10-05 13:07:58','تسوية عجز مورد بالخصم','1','0','0','0','0',''); -- id=1109
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1109', '430', '7740', '','0'); -- id=1113
UPDATE accountstree SET name = 'الاسباني - مورد', customName = 'الاسباني - مورد', customNameEn = 'الاسباني - مورد', nameEn = 'الاسباني - مورد', parent = '81', accountNature = '1', theValue = '-19290', 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 = '430';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1109', '146', '7740', '','0'); -- id=1109
UPDATE accountstree SET name = 'ايرادات الخصم المكتسب', customName = 'ايرادات الخصم المكتسب', customNameEn = 'Acquired Discount Revenues', nameEn = 'Acquired Discount Revenues', parent = '147', accountNature = '1', theValue = '5293038', theOrder = '0', layingOrder = '4203', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Other Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:41' WHERE id = '146';
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 ('11', '127378.00', '7740', '1', 'تسوية عجز مورد بالخصم', '-1', '119638', '2026-10-05 13:07:58', '1', 'supplierDeficitController.php', '', '1109','', '0','1','1','7740','1','0','0','0','0',''); -- id=140
UPDATE supplierdebtchange SET supplierid = '11', supplierdebtchangebefore = '127378.00', supplierdebtchangeamount = '7740', supplierdebtchangetype = '1', processname = 'تسوية عجز مورد بالخصم', supplierdebtchangemodelid = '-1', supplierdebtchangeafter = '119638', supplierdebtchangedate = '2026-10-05 13:07:58', userid = '1', tablename = 'supplierDeficitController.php', comment = '', dailyentryid = '1109',saveid = '',currencyId='1',conversionFactor='1',payedInCurrency='7740',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='119638',debtchangamountInSupplierCurrency='7740',debtchangafterInSupplierCurrency='119638', paySerialNo='0',tagids='' WHERE supplierdebtchangeid = '140';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:37:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:07:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 13:07:59', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=sucess'); -- id=2829
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:38:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:08:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 13:08:00', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2830
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:38:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:08:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 13:08:06', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2831
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:39:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:09:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 13:09:10', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2832
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:50:04";
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-05 09:50:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:20:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 13:20:07', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2833
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-05 09:50:07";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 13:20:07', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2834
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:50:13";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:20:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 13:20:13', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2835
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:53:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:23:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 13:23:27', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=2836
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:53:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:23:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 13:23:51', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2837
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:54:33";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:54: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-05 09:54:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:24:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 13:24:37', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2838
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-05 09:54:37";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 13:24:37', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2839
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:54:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:24:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 13:24:43', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2840
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:58:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:28:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 13:28:01', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=2841
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:58:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:28:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 13:28:02', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=2842
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:58:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:28:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 13:28:44', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2843
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:58:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:28:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 13:28:51', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2844
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:59:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:29:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 13:29:09', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=2845
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:59:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:29:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-05 13:29:38', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php'); -- id=2846
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:59:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:29:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-05 13:29:54', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php'); -- id=2847
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 09:59:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:29:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 13:29:56', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=2848
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:00:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:30:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 13:30:19', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2849
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:00:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:30:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 13:30:37', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2850
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:00:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:30:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 13:30:50', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2851
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:03:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:33:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 13:33:07', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2852
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:03:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:33:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 13:33:07', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2853
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:03:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:33:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 13:33:18', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=2854
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:07:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:37:24", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 13:37:24', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=2855

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac372f6a68ce
-- ----------------------------------------------------------------------------------------------------

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-05 13:37:24', '06ac372f6a68ce', '1', '0.00', '0', '0', '1', '5200.00', '5200', '5200', '0', '1', '2026-10-05 13:37:24', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '20' ,'0','','','','','-1','0','0','0','0','0','5200','0','','0','0','5200','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=84
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','اضافة فاتورة مبيعات','84', '0', '2026-10-05 13:37:24', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '5200', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 13:37:24','0','0','',''); -- id=165
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 ('245','04651', '84', '18', '821', '5', '265', '1325', '0', '', '0', '2026-10-05 13:37:24', '821', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','265','1325','0','','0','0.00','0','0','0','0'); -- id=352
UPDATE sellbilldetail SET  lastbuyprice = 245.00 , meanbuyprice = 245.00, lastbuyprice_withDiscount = 245.00, meanbuyprice_withDiscount = 245.00
        , lastbuyprice_withTax = 245, meanbuyprice_withTax = 245, lastbuyprice_withDiscountAndTax = 245
                where sellbilldetailid = 352;
 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 (821, '2026-10-05', 1325, 1225, 1225
                    , 1225, 1225, 1225, 1225
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1225, 1225, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1325, sellCostBuyPrice =sellCostBuyPrice+1225
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1225, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1225
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1225, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1225
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1225
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1225
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1225
                        , returnSellVal = returnSellVal+0, 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-05', 1325, 1225, 1225
                    , 1225, 1225, 1225, 1225
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1225, 1225, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1325, sellCostBuyPrice =sellCostBuyPrice+1225
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1225, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1225
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1225, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1225
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1225
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1225
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1225
                        , returnSellVal = returnSellVal+0, 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 = '65', userid = '2', storedetaildate = '2026-10-05 13:37:24' WHERE storedetailid = '821';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('821', '1', '5', '1', '84', 'اضافة فاتورة مبيعات', 'sellbillController.php', '70', '65', '2', '2026-10-05 13:37:24','0','0'); -- id=2129
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('315','09799', '84', '21', '866', '5', '335', '1675', '0', '', '0', '2026-10-05 13:37:24', '866', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','335','1675','0','','0','0.00','0','0','0','0'); -- id=353
UPDATE sellbilldetail SET  lastbuyprice = 315.00 , meanbuyprice = 315.00, lastbuyprice_withDiscount = 315.00, meanbuyprice_withDiscount = 315.00
        , lastbuyprice_withTax = 315, meanbuyprice_withTax = 315, lastbuyprice_withDiscountAndTax = 315
                where sellbilldetailid = 353;
 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 (866, '2026-10-05', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1675, sellCostBuyPrice =sellCostBuyPrice+1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1575
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1675, sellCostBuyPrice =sellCostBuyPrice+1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1575
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '122', userid = '2', storedetaildate = '2026-10-05 13:37:24' WHERE storedetailid = '866';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('866', '1', '5', '1', '84', 'اضافة فاتورة مبيعات', 'sellbillController.php', '127', '122', '2', '2026-10-05 13:37:24','0','0'); -- id=2130
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', '84', '84', '1315', '10', '220', '2200', '0', '', '0', '2026-10-05 13:37:24', '1315', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','220','2200','0','','0','0.00','0','0','0','0'); -- id=354
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 = 354;
 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-05', 2200, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2200, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+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-05', 2200, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2200, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '57', userid = '2', storedetaildate = '2026-10-05 13:37:24' WHERE storedetailid = '1315';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1315', '1', '10', '1', '84', 'اضافة فاتورة مبيعات', 'sellbillController.php', '67', '57', '2', '2026-10-05 13:37:24','0','0'); -- id=2131
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '286425',  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 ('281225','5200', '0', '2', 'اضافة فاتورة مبيعات', '84', '286425', '2026-10-05 13:37:24', '2',  'sellbillController.php','1','','0'); -- id=104
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '5200', '5200', '2026-10-05', '2', '0', '0', '2026-10-05 13:37:24','اضافة فاتورة مبيعات رقم 84','1','0',null,'0','84','sellbillController.php?do=showDetail&sellbillid=84'); -- id=1110
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1110', '419', '5200', '','0'); -- id=1114
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '286425', 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 ('1110', '143', '5200', '','0'); -- id=1110
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '904805', 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 ( '4800', '4800', '2026-10-05', '2', '0', '0', '2026-10-05 13:37:24','اضافة فاتورة مبيعات رقم 84 - صرف البضاعة من المخزن','1','0',null,'0','84','sellbillController.php?do=showDetail&sellbillid=84'); -- id=1111
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1111', '402', '4800', '','0'); -- id=1115
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '882109.6', 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 ('1111', '382', '4800', '','0'); -- id=1111
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14720112.4', 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='1110,0,1111' where sellbillid=84;
 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-05', 5200, 4800, 4800
                    , 4800, 4800, 4800, 4800
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,4800, 4800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5200, 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;
 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-05', 5200, 4800, 4800
                    , 4800, 4800, 4800, 4800
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,4800, 4800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5200, 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;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 5200, 4800, 4800
                    , 4800, 4800, 4800, 4800, 4800, 4800)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+5200, netSellCostBuyPrice = netSellCostBuyPrice+4800
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+4800
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+4800
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+4800
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+4800
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+4800
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+4800
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+4800;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac372f6a68ce and sellbillId = 84 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:07:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:37:25", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 13:37:25', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2856
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:16:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:46:14", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 13:46:14', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=2857

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac37de53539c
-- ----------------------------------------------------------------------------------------------------

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-05 13:46:14', '06ac37de53539c', '1', '0.00', '0', '0', '1', '2115.00', '2115', '2115', '0', '1', '2026-10-05 13:46:14', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '7' ,'0','','','','','-1','0','0','0','0','0','2115','0','','0','0','2115','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=85
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','اضافة فاتورة مبيعات','85', '0', '2026-10-05 13:46:14', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '2115', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 13:46:14','0','0','',''); -- id=166
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','00', '85', '84', '1315', '2', '220', '440', '0', '', '0', '2026-10-05 13:46:14', '1315', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','220','440','0','','0','0.00','0','0','0','0'); -- id=355
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 = 355;
 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-05', 440, 400, 400
                    , 400, 400, 400, 400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2, 0, 400, 400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+440, sellCostBuyPrice =sellCostBuyPrice+400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+400
                        , returnSellVal = returnSellVal+0, 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+2
                        , 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-05', 440, 400, 400
                    , 400, 400, 400, 400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 400, 400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+440, sellCostBuyPrice =sellCostBuyPrice+400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+400
                        , returnSellVal = returnSellVal+0, 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 = '55', userid = '2', storedetaildate = '2026-10-05 13:46:14' WHERE storedetailid = '1315';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1315', '1', '2', '1', '85', 'اضافة فاتورة مبيعات', 'sellbillController.php', '57', '55', '2', '2026-10-05 13:46:14','0','0'); -- id=2132
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('315','09799', '85', '21', '866', '5', '335', '1675', '0', '', '0', '2026-10-05 13:46:14', '866', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','335','1675','0','','0','0.00','0','0','0','0'); -- id=356
UPDATE sellbilldetail SET  lastbuyprice = 315.00 , meanbuyprice = 315.00, lastbuyprice_withDiscount = 315.00, meanbuyprice_withDiscount = 315.00
        , lastbuyprice_withTax = 315, meanbuyprice_withTax = 315, lastbuyprice_withDiscountAndTax = 315
                where sellbilldetailid = 356;
 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 (866, '2026-10-05', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1675, sellCostBuyPrice =sellCostBuyPrice+1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1575
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1675, sellCostBuyPrice =sellCostBuyPrice+1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1575
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '117', userid = '2', storedetaildate = '2026-10-05 13:46:14' WHERE storedetailid = '866';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('866', '1', '5', '1', '85', 'اضافة فاتورة مبيعات', 'sellbillController.php', '122', '117', '2', '2026-10-05 13:46:14','0','0'); -- id=2133
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '288540',  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 ('286425','2115', '0', '2', 'اضافة فاتورة مبيعات', '85', '288540', '2026-10-05 13:46:14', '2',  'sellbillController.php','1','','0'); -- id=105
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2115', '2115', '2026-10-05', '2', '0', '0', '2026-10-05 13:46:14','اضافة فاتورة مبيعات رقم 85','1','0',null,'0','85','sellbillController.php?do=showDetail&sellbillid=85'); -- id=1112
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1112', '419', '2115', '','0'); -- id=1116
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '288540', 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 ('1112', '143', '2115', '','0'); -- id=1112
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '906920', 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 ( '1975', '1975', '2026-10-05', '2', '0', '0', '2026-10-05 13:46:14','اضافة فاتورة مبيعات رقم 85 - صرف البضاعة من المخزن','1','0',null,'0','85','sellbillController.php?do=showDetail&sellbillid=85'); -- id=1113
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1113', '402', '1975', '','0'); -- id=1117
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '884084.6', 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 ('1113', '382', '1975', '','0'); -- id=1113
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14718137.4', 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='1112,0,1113' where sellbillid=85;
 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-05', 2115, 1975, 1975
                    , 1975, 1975, 1975, 1975
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1975, 1975, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2115, sellCostBuyPrice =sellCostBuyPrice+1975
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1975, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1975
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1975, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1975
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1975
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1975
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1975
                        , returnSellVal = returnSellVal+0, 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-05', 2115, 1975, 1975
                    , 1975, 1975, 1975, 1975
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,1975, 1975, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2115, sellCostBuyPrice =sellCostBuyPrice+1975
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1975, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1975
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1975, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1975
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1975
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1975
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1975
                        , returnSellVal = returnSellVal+0, 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, 2115, 1975, 1975
                    , 1975, 1975, 1975, 1975, 1975, 1975)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+2115, netSellCostBuyPrice = netSellCostBuyPrice+1975
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+1975
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+1975
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+1975
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+1975
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+1975
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+1975
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+1975;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac37de53539c and sellbillId = 85 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:16:15";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:46:15", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 13:46:15', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2858
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:16:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:46:47", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 13:46:47', '2', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=85'); -- id=2859
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:16:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:46:52", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 13:46:52', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2860
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:23:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:53:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 13:53:19', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=2861
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:23:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 13:53:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 13:53:34', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2862
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:47:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:17:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 14:17:26', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2863
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:48:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:18:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 14:18:04', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=add'); -- id=2864
BEGIN;
CALL supplierInUse(44,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
UPDATE supplier SET  suppliercurrentDebt = '339510',suppliercurrentDebtInCurrency= '339510' , userid = '1', supplierdate = '26-10-05'   WHERE supplierid = '44';
UPDATE supplier SET  inUse = 0 where supplierid = 44;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2400', '2400', '2026-10-05', '1', '0', '0', '2026-10-05 14:18:04','تسوية عجز مورد بالخصم','1','0','0','0','0',''); -- id=1114
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1114', '463', '2400', '','0'); -- id=1118
UPDATE accountstree SET name = 'ميلانو - مورد', customName = 'ميلانو - مورد', customNameEn = 'ميلانو - مورد', nameEn = 'ميلانو - مورد', parent = '81', accountNature = '1', theValue = '77200', 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 = '463';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1114', '146', '2400', '','0'); -- id=1114
UPDATE accountstree SET name = 'ايرادات الخصم المكتسب', customName = 'ايرادات الخصم المكتسب', customNameEn = 'Acquired Discount Revenues', nameEn = 'Acquired Discount Revenues', parent = '147', accountNature = '1', theValue = '5295438', theOrder = '0', layingOrder = '4203', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Other Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:41' WHERE id = '146';
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 ('44', '341910.00', '2400', '1', 'تسوية عجز مورد بالخصم', '-1', '339510', '2026-10-05 14:18:04', '1', 'supplierDeficitController.php', 'خصم 60 جنيه * 40 قطعه كود 7619', '1114','', '0','1','1','2400','1','0','0','0','0',''); -- id=141
UPDATE supplierdebtchange SET supplierid = '44', supplierdebtchangebefore = '341910.00', supplierdebtchangeamount = '2400', supplierdebtchangetype = '1', processname = 'تسوية عجز مورد بالخصم', supplierdebtchangemodelid = '-1', supplierdebtchangeafter = '339510', supplierdebtchangedate = '2026-10-05 14:18:04', userid = '1', tablename = 'supplierDeficitController.php', comment = 'خصم 60 جنيه * 40 قطعه كود 7619', dailyentryid = '1114',saveid = '',currencyId='1',conversionFactor='1',payedInCurrency='2400',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='339510',debtchangamountInSupplierCurrency='2400',debtchangafterInSupplierCurrency='339510', paySerialNo='0',tagids='' WHERE supplierdebtchangeid = '141';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:48:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:18:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 14:18:04', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=sucess'); -- id=2865
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:48:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:18:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 14:18:06', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2866
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:49:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:19:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 14:19:25', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2867
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:49:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:19:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 14:19:31', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php'); -- id=2868
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:49:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:19:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 14:19:59', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=add'); -- id=2869
BEGIN;
CALL supplierInUse(15,@supplierdebt,@suppliername,@dailyentryid,@treeIdis);
UPDATE supplier SET  suppliercurrentDebt = '65122',suppliercurrentDebtInCurrency= '65122' , userid = '1', supplierdate = '26-10-05'   WHERE supplierid = '15';
UPDATE supplier SET  inUse = 0 where supplierid = 15;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '5280', '5280', '2026-10-05', '1', '0', '0', '2026-10-05 14:19:59','تسوية عجز مورد بالزيادة','1','0','0','0','0',''); -- id=1115
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1115', '398', '5280', '','0'); -- id=1119
UPDATE accountstree SET name = 'خصم مسموح به', customName = 'خصم مسموح به', customNameEn = '', nameEn = '', parent = '158', accountNature = '0', theValue = '136038', 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 ('1115', '434', '5280', '','0'); -- id=1115
UPDATE accountstree SET name = 'اباتشي - مورد', customName = 'اباتشي - مورد', customNameEn = 'اباتشي - مورد', nameEn = 'اباتشي - مورد', parent = '81', accountNature = '1', theValue = '-124793', 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 = '434';
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 ('15', '59842.00', '5280', '0', 'تسوية عجز مورد بالزيادة', '-1', '65122', '2026-10-05 14:19:59', '1', 'supplierDeficitController.php', 'اضافه الاسفنجي من المرتجع', '1115','', '0','1','1','5280','1','0','0','0','0',''); -- id=142
UPDATE supplierdebtchange SET supplierid = '15', supplierdebtchangebefore = '59842.00', supplierdebtchangeamount = '5280', supplierdebtchangetype = '0', processname = 'تسوية عجز مورد بالزيادة', supplierdebtchangemodelid = '-1', supplierdebtchangeafter = '65122', supplierdebtchangedate = '2026-10-05 14:19:59', userid = '1', tablename = 'supplierDeficitController.php', comment = 'اضافه الاسفنجي من المرتجع', dailyentryid = '1115',saveid = '',currencyId='1',conversionFactor='1',payedInCurrency='5280',saveConversionFactor='1',debtchangbeforeInSupplierCurrency='65122',debtchangamountInSupplierCurrency='5280',debtchangafterInSupplierCurrency='65122', paySerialNo='0',tagids='' WHERE supplierdebtchangeid = '142';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:49:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:19:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 14:19:59', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=sucess'); -- id=2870
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:50:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:20:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 14:20:00', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2871
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 10:56:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:26:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 14:26:53', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2872
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-05 11:00:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:30:21", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 14:30:21', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2873
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-05 11:00:21";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-05 14:30:21", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 14:30:21', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2874
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:00:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:30:48", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 14:30:48', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2875
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:01:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:31:17", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 14:31:17', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=2876
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:01:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 14:31:45", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 14:31:45', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2877
UPDATE user SET loginip = "" WHERE userid = 4;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:44:08";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:44:14";
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-05 11:44:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:14:31", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 15:14:31', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2878
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-05 11:44:31";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-05 15:14:31", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 15:14:31', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2879
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:44:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:14:33", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 15:14:33', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2880
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:44:35";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:14:35", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 15:14:35', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=2881
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:47:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:17:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 15:17:58', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2882
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:48:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:18:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 15:18:07', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2883
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:52:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:22:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:22:11', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2884
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:52:38";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:52:38";
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-05 11:52:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:22:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 15:22:41', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2885
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-05 11:52:41";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 15:22:41', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2886
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:52:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:22:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:22:44', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2887
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:52:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:22:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 15:22:44', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=2888
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:55:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:25:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 15:25:44', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2889
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:55:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:25:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierDeficitController.php', '2026-10-05 15:25:58', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierDeficitController.php?do=show'); -- id=2890
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:56:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:26:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:26:03', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2891
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:56:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:26:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:26:12', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2892
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:56:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:26:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:26:25', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2893
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:56:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:26:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:26:52', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2894
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:58:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:28:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:28:54', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=2895
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 ('موديل احمد صلاح 320','','3','300','320','320','320','2026-10-05','0','1','0','','0','0','0','0','0','300','300','300','300','300','0','6.67','0','0','.','0','0','0','300','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','300','300','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','300','0','0','0','0','0','0','','','0','0','0','0'); -- id=1421
UPDATE product SET productName = 'موديل احمد صلاح 320', productDescription = '', productCatId = '3', productBuyPrice = '300', productSellAllPrice = '320', productSellUnitPrice = '320', productSellHalfPrice = '320', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01421',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '300',lastbuyprice_withDiscount = '300',meanbuyprice = '300',meanbuyprice_withDiscount = '300' , productbuypricereal = '300' , buypricereal_precentage = '0' , buytotal_precentage = '6.67' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='300',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='300',meanbuyprice_withTax='300',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='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 = '1421';
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', '1421', '1', '2026-10-05', '1', '0','0142101','320','320','320','300','','0','0','0','0','0','0','0','0','0','0'); -- id=1421
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1421', '1', '0', '1', '2026-10-05'); -- id=1434
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1421', '1', '0', '0', '1421', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2134
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1421, 1,'2026-10-05 15:28:54',1)
                ON DUPLICATE KEY UPDATE productid = 1421, edited = 1, sysdate = '2026-10-05 15:28:54', userid = 1; -- id=2185
UPDATE product SET productName = 'موديل احمد صلاح 320', productDescription = '', productCatId = '3', productBuyPrice = '300.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01421',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '300',lastbuyprice_withDiscount = '300',meanbuyprice = '300',meanbuyprice_withDiscount = '300' , productbuypricereal = '300' , buypricereal_precentage = '0' , buytotal_precentage = '6.67' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='300',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='300',meanbuyprice_withTax='300',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='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 = '1421';
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 ('موديل احمد صلاح 270','','3','260','270','270','270','2026-10-05','0','1','0','','0','0','0','0','0','260','260','260','260','260','0','3.85','0','0','.','0','0','0','260','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','260','260','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','260','0','0','0','0','0','0','','','0','0','0','0'); -- id=1422
UPDATE product SET productName = 'موديل احمد صلاح 270', productDescription = '', productCatId = '3', productBuyPrice = '260', productSellAllPrice = '270', productSellUnitPrice = '270', productSellHalfPrice = '270', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01422',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '260',lastbuyprice_withDiscount = '260',meanbuyprice = '260',meanbuyprice_withDiscount = '260' , productbuypricereal = '260' , buypricereal_precentage = '0' , buytotal_precentage = '3.85' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='260',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='260',meanbuyprice_withTax='260',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='260',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1422';
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', '1422', '1', '2026-10-05', '1', '0','0142201','270','270','270','260','','0','0','0','0','0','0','0','0','0','0'); -- id=1422
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1422', '1', '0', '1', '2026-10-05'); -- id=1435
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1422', '1', '0', '0', '1422', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2135
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1422, 1,'2026-10-05 15:28:54',1)
                ON DUPLICATE KEY UPDATE productid = 1422, edited = 1, sysdate = '2026-10-05 15:28:54', userid = 1; -- id=2186
UPDATE product SET productName = 'موديل احمد صلاح 270', productDescription = '', productCatId = '3', productBuyPrice = '260.00', productSellAllPrice = '270.00', productSellUnitPrice = '270.00', productSellHalfPrice = '270.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01422',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '260',lastbuyprice_withDiscount = '260',meanbuyprice = '260',meanbuyprice_withDiscount = '260' , productbuypricereal = '260' , buypricereal_precentage = '0' , buytotal_precentage = '3.85' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='260',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='260',meanbuyprice_withTax='260',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='260',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1422';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:58:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:28:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:28:56', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2896
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 11:59:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:29:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:29:02', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2897
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:01:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:31:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:31:57', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2898
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:02:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:32:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:32:07', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2899
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:02:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:32:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 15:32:28', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=2900
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:02:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:32:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 15:32:58', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=2901
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-05','','93', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=100
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (100, 1,'2026-10-05 15:32:58',1)
                ON DUPLICATE KEY UPDATE catid = 100, edited = 1, sysdate = '2026-10-05 15:32:58', userid = 1; -- id=101
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '100', '1', '2026-10-05', '1', '0'); -- id=13
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:02:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:32:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 15:32:59', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=2902
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:03:00";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:33:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 15:33:00', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=2903
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:03:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:33:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:33:08', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2904
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:04:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:34:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:34:46', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2905
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:05:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:35:30", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 15:35:30', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2906
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:07:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:37:38", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 15:37:38', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=2907
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:07:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:37:48", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 15:37:48', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2908
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:09:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:39:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:39:28', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2909
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:19:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:49:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:49:04', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=2910
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 ('ايطاليانو موديل 41','','100','370','400','400','400','2026-10-05','0','1','0','','0','0','0','0','0','370','370','370','370','370','0','8.11','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=1423
UPDATE product SET productName = 'ايطاليانو موديل 41', productDescription = '', productCatId = '100', productBuyPrice = '370', productSellAllPrice = '400', productSellUnitPrice = '400', productSellHalfPrice = '400', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01423',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 = '8.11' , 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 = '1423';
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', '1423', '1.00', '2026-10-05', '1', '0','0142301','400','400','400','370','','0','0','0','0','0','0','0','0','0','0'); -- id=1423
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1423', '1', '0', '1', '2026-10-05'); -- id=1436
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1423', '1', '0', '0', '1423', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2136
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1423, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1423, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2187
UPDATE product SET productName = 'ايطاليانو موديل 41', productDescription = '', productCatId = '100', productBuyPrice = '370.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01423',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 = '8.11' , 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 = '1423';
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 ('ايطاليانو موديل 36','','100','460','490','490','490','2026-10-05','0','1','0','','0','0','0','0','0','460','460','460','460','460','0','6.52','0','0','.','0','0','0','460','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','460','460','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','460','0','0','0','0','0','0','','','0','0','0','0'); -- id=1424
UPDATE product SET productName = 'ايطاليانو موديل 36', productDescription = '', productCatId = '100', productBuyPrice = '460', productSellAllPrice = '490', productSellUnitPrice = '490', productSellHalfPrice = '490', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01424',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '460',lastbuyprice_withDiscount = '460',meanbuyprice = '460',meanbuyprice_withDiscount = '460' , productbuypricereal = '460' , buypricereal_precentage = '0' , buytotal_precentage = '6.52' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='460',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='460',meanbuyprice_withTax='460',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='460',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1424';
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', '1424', '1.00', '2026-10-05', '1', '0','0142401','490','490','490','460','','0','0','0','0','0','0','0','0','0','0'); -- id=1424
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1424', '1', '0', '1', '2026-10-05'); -- id=1437
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1424', '1', '0', '0', '1424', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2137
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1424, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1424, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2188
UPDATE product SET productName = 'ايطاليانو موديل 36', productDescription = '', productCatId = '100', productBuyPrice = '460.00', productSellAllPrice = '490.00', productSellUnitPrice = '490.00', productSellHalfPrice = '490.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01424',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '460',lastbuyprice_withDiscount = '460',meanbuyprice = '460',meanbuyprice_withDiscount = '460' , productbuypricereal = '460' , buypricereal_precentage = '0' , buytotal_precentage = '6.52' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='460',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='460',meanbuyprice_withTax='460',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='460',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1424';
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 ('ايطاليانو موديل 37','','100','265','295','295','295','2026-10-05','0','1','0','','0','0','0','0','0','265','265','265','265','265','0','11.32','0','0','.','0','0','0','265','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','265','265','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','265','0','0','0','0','0','0','','','0','0','0','0'); -- id=1425
UPDATE product SET productName = 'ايطاليانو موديل 37', productDescription = '', productCatId = '100', productBuyPrice = '265', productSellAllPrice = '295', productSellUnitPrice = '295', productSellHalfPrice = '295', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01425',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '265',lastbuyprice_withDiscount = '265',meanbuyprice = '265',meanbuyprice_withDiscount = '265' , productbuypricereal = '265' , buypricereal_precentage = '0' , buytotal_precentage = '11.32' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='265',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='265',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='265',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1425';
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', '1425', '1.00', '2026-10-05', '1', '0','0142501','295','295','295','265','','0','0','0','0','0','0','0','0','0','0'); -- id=1425
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1425', '1', '0', '1', '2026-10-05'); -- id=1438
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1425', '1', '0', '0', '1425', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2138
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1425, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1425, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2189
UPDATE product SET productName = 'ايطاليانو موديل 37', productDescription = '', productCatId = '100', productBuyPrice = '265.00', productSellAllPrice = '295.00', productSellUnitPrice = '295.00', productSellHalfPrice = '295.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01425',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '265',lastbuyprice_withDiscount = '265',meanbuyprice = '265',meanbuyprice_withDiscount = '265' , productbuypricereal = '265' , buypricereal_precentage = '0' , buytotal_precentage = '11.32' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='265',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='265',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='265',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1425';
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 ('ايطاليانو موديل 28','','100','560','590','590','590','2026-10-05','0','1','0','','0','0','0','0','0','560','560','560','560','560','0','5.36','0','0','.','0','0','0','560','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','560','560','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','560','0','0','0','0','0','0','','','0','0','0','0'); -- id=1426
UPDATE product SET productName = 'ايطاليانو موديل 28', productDescription = '', productCatId = '100', productBuyPrice = '560', productSellAllPrice = '590', productSellUnitPrice = '590', productSellHalfPrice = '590', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01426',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '560',lastbuyprice_withDiscount = '560',meanbuyprice = '560',meanbuyprice_withDiscount = '560' , productbuypricereal = '560' , buypricereal_precentage = '0' , buytotal_precentage = '5.36' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='560',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='560',meanbuyprice_withTax='560',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='560',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1426';
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', '1426', '1.00', '2026-10-05', '1', '0','0142601','590','590','590','560','','0','0','0','0','0','0','0','0','0','0'); -- id=1426
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1426', '1', '0', '1', '2026-10-05'); -- id=1439
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1426', '1', '0', '0', '1426', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2139
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1426, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1426, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2190
UPDATE product SET productName = 'ايطاليانو موديل 28', productDescription = '', productCatId = '100', productBuyPrice = '560.00', productSellAllPrice = '590.00', productSellUnitPrice = '590.00', productSellHalfPrice = '590.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01426',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '560',lastbuyprice_withDiscount = '560',meanbuyprice = '560',meanbuyprice_withDiscount = '560' , productbuypricereal = '560' , buypricereal_precentage = '0' , buytotal_precentage = '5.36' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='560',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='560',meanbuyprice_withTax='560',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='560',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1426';
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 ('ايطاليانو موديل 38','','100','330','360','360','360','2026-10-05','0','1','0','','0','0','0','0','0','330','330','330','330','330','0','9.09','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=1427
UPDATE product SET productName = 'ايطاليانو موديل 38', productDescription = '', productCatId = '100', productBuyPrice = '330', productSellAllPrice = '360', productSellUnitPrice = '360', productSellHalfPrice = '360', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01427',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 = '9.09' , 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 = '1427';
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', '1427', '1.00', '2026-10-05', '1', '0','0142701','360','360','360','330','','0','0','0','0','0','0','0','0','0','0'); -- id=1427
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1427', '1', '0', '1', '2026-10-05'); -- id=1440
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1427', '1', '0', '0', '1427', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2140
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1427, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1427, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2191
UPDATE product SET productName = 'ايطاليانو موديل 38', productDescription = '', productCatId = '100', productBuyPrice = '330.00', productSellAllPrice = '360.00', productSellUnitPrice = '360.00', productSellHalfPrice = '360.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01427',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 = '9.09' , 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 = '1427';
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 ('ايطاليانو موديل 22','','100','400','430','430','430','2026-10-05','0','1','0','','0','0','0','0','0','400','400','400','400','400','0','7.5','7.5','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=1428
UPDATE product SET productName = 'ايطاليانو موديل 22', productDescription = '', productCatId = '100', productBuyPrice = '400', productSellAllPrice = '430', productSellUnitPrice = '430', productSellHalfPrice = '430', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01428',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 = '7.5' , buyhalf_precentage = '7.5' , 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 = '1428';
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', '1428', '1.00', '2026-10-05', '1', '0','0142801','430','430','430','400','','0','0','0','0','0','0','0','0','0','0'); -- id=1428
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1428', '1', '0', '1', '2026-10-05'); -- id=1441
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1428', '1', '0', '0', '1428', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2141
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1428, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1428, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2192
UPDATE product SET productName = 'ايطاليانو موديل 22', productDescription = '', productCatId = '100', productBuyPrice = '400.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01428',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 = '7.5' , buyhalf_precentage = '7.5' , 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 = '1428';
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 ('ايطاليانو موديل 12','','100','345','375','375','375','2026-10-05','0','1','0','','0','0','0','0','0','345','345','345','345','345','0','8.7','0','0','.','0','0','0','345','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','345','345','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','345','0','0','0','0','0','0','','','0','0','0','0'); -- id=1429
UPDATE product SET productName = 'ايطاليانو موديل 12', productDescription = '', productCatId = '100', productBuyPrice = '345', productSellAllPrice = '375', productSellUnitPrice = '375', productSellHalfPrice = '375', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01429',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '345',lastbuyprice_withDiscount = '345',meanbuyprice = '345',meanbuyprice_withDiscount = '345' , productbuypricereal = '345' , buypricereal_precentage = '0' , buytotal_precentage = '8.7' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='345',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='345',meanbuyprice_withTax='345',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='345',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1429';
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', '1429', '1.00', '2026-10-05', '1', '0','0142901','375','375','375','345','','0','0','0','0','0','0','0','0','0','0'); -- id=1429
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1429', '1', '0', '1', '2026-10-05'); -- id=1442
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1429', '1', '0', '0', '1429', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2142
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1429, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1429, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2193
UPDATE product SET productName = 'ايطاليانو موديل 12', productDescription = '', productCatId = '100', productBuyPrice = '345.00', productSellAllPrice = '375.00', productSellUnitPrice = '375.00', productSellHalfPrice = '375.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01429',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '345',lastbuyprice_withDiscount = '345',meanbuyprice = '345',meanbuyprice_withDiscount = '345' , productbuypricereal = '345' , buypricereal_precentage = '0' , buytotal_precentage = '8.7' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='345',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='345',meanbuyprice_withTax='345',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='345',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1429';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('ايطاليانو موديل 1 - 26','','100','420','450','450','450','2026-10-05','0','1','0','','0','0','0','0','0','420','420','420','420','420','0','7.14','0','0','.','0','0','0','420','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','420','420','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','420','0','0','0','0','0','0','','','0','0','0','0'); -- id=1430
UPDATE product SET productName = 'ايطاليانو موديل 1 - 26', productDescription = '', productCatId = '100', productBuyPrice = '420', productSellAllPrice = '450', productSellUnitPrice = '450', productSellHalfPrice = '450', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01430',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 = '7.14' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1430';
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', '1430', '1.00', '2026-10-05', '1', '0','0143001','450','450','450','420','','0','0','0','0','0','0','0','0','0','0'); -- id=1430
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1430', '1', '0', '1', '2026-10-05'); -- id=1443
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1430', '1', '0', '0', '1430', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2143
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1430, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1430, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2194
UPDATE product SET productName = 'ايطاليانو موديل 1 - 26', productDescription = '', productCatId = '100', productBuyPrice = '420.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01430',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 = '7.14' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1430';
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 ('ايطاليانو موديل 16','','100','510','540','540','540','2026-10-05','0','1','0','','0','0','0','0','0','510','510','510','510','510','0','5.88','5.88','0','.','0','0','0','510','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','510','510','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','510','0','0','0','0','0','0','','','0','0','0','0'); -- id=1431
UPDATE product SET productName = 'ايطاليانو موديل 16', productDescription = '', productCatId = '100', productBuyPrice = '510', productSellAllPrice = '540', productSellUnitPrice = '540', productSellHalfPrice = '540', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01431',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '510',lastbuyprice_withDiscount = '510',meanbuyprice = '510',meanbuyprice_withDiscount = '510' , productbuypricereal = '510' , buypricereal_precentage = '0' , buytotal_precentage = '5.88' , buyhalf_precentage = '5.88' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='510',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='510',meanbuyprice_withTax='510',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='510',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1431';
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', '1431', '1.00', '2026-10-05', '1', '0','0143101','540','540','540','510','','0','0','0','0','0','0','0','0','0','0'); -- id=1431
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1431', '1', '0', '1', '2026-10-05'); -- id=1444
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1431', '1', '0', '0', '1431', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2144
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1431, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1431, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2195
UPDATE product SET productName = 'ايطاليانو موديل 16', productDescription = '', productCatId = '100', productBuyPrice = '510.00', productSellAllPrice = '540.00', productSellUnitPrice = '540.00', productSellHalfPrice = '540.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01431',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '510',lastbuyprice_withDiscount = '510',meanbuyprice = '510',meanbuyprice_withDiscount = '510' , productbuypricereal = '510' , buypricereal_precentage = '0' , buytotal_precentage = '5.88' , buyhalf_precentage = '5.88' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='510',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='510',meanbuyprice_withTax='510',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='510',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1431';
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 ('ايطاليانو موديل 10','','100','485','515','515','515','2026-10-05','0','1','0','','0','0','0','0','0','485','485','485','485','485','0','6.19','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','1','0','0','0','0','0','0','','485','0','0','0','0','0','0','','','0','0','0','0'); -- id=1432
UPDATE product SET productName = 'ايطاليانو موديل 10', productDescription = '', productCatId = '100', productBuyPrice = '485', productSellAllPrice = '515', productSellUnitPrice = '515', productSellHalfPrice = '515', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01432',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 = '6.19' , 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='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',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 = '1432';
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', '1432', '1.00', '2026-10-05', '1', '0','0143201','515','515','515','485','','0','0','0','0','0','0','0','0','0','0'); -- id=1432
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1432', '1', '0', '1', '2026-10-05'); -- id=1445
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1432', '1', '0', '0', '1432', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2145
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1432, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1432, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2196
UPDATE product SET productName = 'ايطاليانو موديل 10', productDescription = '', productCatId = '100', productBuyPrice = '485.00', productSellAllPrice = '515.00', productSellUnitPrice = '515.00', productSellHalfPrice = '515.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01432',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 = '6.19' , 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='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',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 = '1432';
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 ('ايطاليانو موديل 29','','100','350','380','380','380','2026-10-05','0','1','0','','0','0','0','0','0','350','350','350','350','350','0','8.57','0','0','.','0','0','0','350','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','350','350','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','350','0','0','0','0','0','0','','','0','0','0','0'); -- id=1433
UPDATE product SET productName = 'ايطاليانو موديل 29', productDescription = '', productCatId = '100', productBuyPrice = '350', productSellAllPrice = '380', productSellUnitPrice = '380', productSellHalfPrice = '380', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01433',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 = '8.57' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='350',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='350',meanbuyprice_withTax='350',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='350',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1433';
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', '1433', '1.00', '2026-10-05', '1', '0','0143301','380','380','380','350','','0','0','0','0','0','0','0','0','0','0'); -- id=1433
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1433', '1', '0', '1', '2026-10-05'); -- id=1446
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1433', '1', '0', '0', '1433', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2146
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1433, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1433, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2197
UPDATE product SET productName = 'ايطاليانو موديل 29', productDescription = '', productCatId = '100', productBuyPrice = '350.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01433',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 = '8.57' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='350',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='350',meanbuyprice_withTax='350',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='350',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1433';
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 ('ايطاليانو موديل 30 - 20 - 13','','100','310','340','340','340','2026-10-05','0','1','0','','0','0','0','0','0','310','310','310','310','310','0','9.68','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=1434
UPDATE product SET productName = 'ايطاليانو موديل 30 - 20 - 13', productDescription = '', productCatId = '100', productBuyPrice = '310', productSellAllPrice = '340', productSellUnitPrice = '340', productSellHalfPrice = '340', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01434',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 = '9.68' , 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 = '1434';
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', '1434', '1.00', '2026-10-05', '1', '0','0143401','340','340','340','310','','0','0','0','0','0','0','0','0','0','0'); -- id=1434
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1434', '1', '0', '1', '2026-10-05'); -- id=1447
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1434', '1', '0', '0', '1434', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2147
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1434, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1434, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2198
UPDATE product SET productName = 'ايطاليانو موديل 30 - 20 - 13', productDescription = '', productCatId = '100', productBuyPrice = '310.00', productSellAllPrice = '340.00', productSellUnitPrice = '340.00', productSellHalfPrice = '340.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01434',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 = '9.68' , 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 = '1434';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('ايطاليانو موديل 6','','100','410','440','440','440','2026-10-05','0','1','0','','0','0','0','0','0','410','410','410','410','410','0','7.32','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=1435
UPDATE product SET productName = 'ايطاليانو موديل 6', productDescription = '', productCatId = '100', productBuyPrice = '410', productSellAllPrice = '440', productSellUnitPrice = '440', productSellHalfPrice = '440', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01435',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 = '7.32' , 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 = '1435';
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', '1435', '1.00', '2026-10-05', '1', '0','0143501','440','440','440','410','','0','0','0','0','0','0','0','0','0','0'); -- id=1435
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1435', '1', '0', '1', '2026-10-05'); -- id=1448
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1435', '1', '0', '0', '1435', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2148
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1435, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1435, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2199
UPDATE product SET productName = 'ايطاليانو موديل 6', productDescription = '', productCatId = '100', productBuyPrice = '410.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01435',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 = '7.32' , 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 = '1435';
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','','100','415','445','445','445','2026-10-05','0','1','0','','0','0','0','0','0','415','415','415','415','415','0','7.23','0','0','.','0','0','0','415','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','415','415','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','415','0','0','0','0','0','0','','','0','0','0','0'); -- id=1436
UPDATE product SET productName = 'ايطاليانو موديل 31', productDescription = '', productCatId = '100', productBuyPrice = '415', productSellAllPrice = '445', productSellUnitPrice = '445', productSellHalfPrice = '445', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01436',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 = '7.23' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='415',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='415',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1436';
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', '1436', '1.00', '2026-10-05', '1', '0','0143601','445','445','445','415','','0','0','0','0','0','0','0','0','0','0'); -- id=1436
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1436', '1', '0', '1', '2026-10-05'); -- id=1449
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1436', '1', '0', '0', '1436', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2149
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1436, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1436, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2200
UPDATE product SET productName = 'ايطاليانو موديل 31', productDescription = '', productCatId = '100', productBuyPrice = '415.00', productSellAllPrice = '445.00', productSellUnitPrice = '445.00', productSellHalfPrice = '445.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01436',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 = '7.23' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='415',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='415',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1436';
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','','100','290','320','320','320','2026-10-05','0','1','0','','0','0','0','0','0','290','290','290','290','290','0','10.34','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=1437
UPDATE product SET productName = 'ايطاليانو موديل 11', productDescription = '', productCatId = '100', productBuyPrice = '290', productSellAllPrice = '320', productSellUnitPrice = '320', productSellHalfPrice = '320', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01437',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 = '10.34' , 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 = '1437';
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', '1437', '1.00', '2026-10-05', '1', '0','0143701','320','320','320','290','','0','0','0','0','0','0','0','0','0','0'); -- id=1437
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1437', '1', '0', '1', '2026-10-05'); -- id=1450
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1437', '1', '0', '0', '1437', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2150
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1437, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1437, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2201
UPDATE product SET productName = 'ايطاليانو موديل 11', productDescription = '', productCatId = '100', productBuyPrice = '290.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01437',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 = '10.34' , 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 = '1437';
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 ('ايطاليانو موديل 5','','100','390','420','420','420','2026-10-05','0','1','0','','0','0','0','0','0','390','390','390','390','390','0','7.69','0','0','.','0','0','0','390','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','390','390','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','390','0','0','0','0','0','0','','','0','0','0','0'); -- id=1438
UPDATE product SET productName = 'ايطاليانو موديل 5', productDescription = '', productCatId = '100', productBuyPrice = '390', productSellAllPrice = '420', productSellUnitPrice = '420', productSellHalfPrice = '420', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01438',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390' , buypricereal_precentage = '0' , buytotal_precentage = '7.69' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1438';
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', '1438', '1.00', '2026-10-05', '1', '0','0143801','420','420','420','390','','0','0','0','0','0','0','0','0','0','0'); -- id=1438
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1438', '1', '0', '1', '2026-10-05'); -- id=1451
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1438', '1', '0', '0', '1438', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2151
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1438, 1,'2026-10-05 15:49:04',1)
                ON DUPLICATE KEY UPDATE productid = 1438, edited = 1, sysdate = '2026-10-05 15:49:04', userid = 1; -- id=2202
UPDATE product SET productName = 'ايطاليانو موديل 5', productDescription = '', productCatId = '100', productBuyPrice = '390.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01438',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390' , buypricereal_precentage = '0' , buytotal_precentage = '7.69' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1438';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:19:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:49:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:49:06', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2911
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:19:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:49:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:49:09', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2912
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:19:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:49:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:49:24', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2913
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:19:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:49:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:49:33', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2914
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:29:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:59:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:59:42', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=2915
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 ('تلبيسه محير سفنتي','','88','400','430','430','430','2026-10-05','0','1','0','','0','0','0','0','0','400','400','400','400','400','0','7.5','0','0','.','0','0','0','400','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','400','400','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','400','0','0','0','0','0','0','','','0','0','0','0'); -- id=1439
UPDATE product SET productName = 'تلبيسه محير سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '400', productSellAllPrice = '430', productSellUnitPrice = '430', productSellHalfPrice = '430', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01439',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 = '7.5' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='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 = '1439';
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', '1439', '1.00', '2026-10-05', '1', '0','0143901','430','430','430','400','','0','0','0','0','0','0','0','0','0','0'); -- id=1439
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1439', '1', '0', '1', '2026-10-05'); -- id=1452
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1439', '1', '0', '0', '1439', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2152
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1439, 1,'2026-10-05 15:59:42',1)
                ON DUPLICATE KEY UPDATE productid = 1439, edited = 1, sysdate = '2026-10-05 15:59:42', userid = 1; -- id=2203
UPDATE product SET productName = 'تلبيسه محير سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '400.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01439',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 = '7.5' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='400',meanbuyprice_withTax='400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='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 = '1439';
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 ('الياقيه وبنضه سفنتي','','88','390','420','420','420','2026-10-05','0','1','0','','0','0','0','0','0','390','390','390','390','390','0','7.69','0','0','.','0','0','0','390','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','390','390','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','390','0','0','0','0','0','0','','','0','0','0','0'); -- id=1440
UPDATE product SET productName = 'الياقيه وبنضه سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390', productSellAllPrice = '420', productSellUnitPrice = '420', productSellHalfPrice = '420', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01440',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390' , buypricereal_precentage = '0' , buytotal_precentage = '7.69' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1440';
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', '1440', '1.00', '2026-10-05', '1', '0','0144001','420','420','420','390','','0','0','0','0','0','0','0','0','0','0'); -- id=1440
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1440', '1', '0', '1', '2026-10-05'); -- id=1453
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1440', '1', '0', '0', '1440', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2153
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1440, 1,'2026-10-05 15:59:42',1)
                ON DUPLICATE KEY UPDATE productid = 1440, edited = 1, sysdate = '2026-10-05 15:59:42', userid = 1; -- id=2204
UPDATE product SET productName = 'الياقيه وبنضه سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01440',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390' , buypricereal_precentage = '0' , buytotal_precentage = '7.69' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1440';
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 ('هاف وسوسته عريض سفنتي','','88','380','410','410','410','2026-10-05','0','1','0','','0','0','0','0','0','380','380','380','380','380','0','7.89','0','0','.','0','0','0','380','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','380','380','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','380','0','0','0','0','0','0','','','0','0','0','0'); -- id=1441
UPDATE product SET productName = 'هاف وسوسته عريض سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '380', productSellAllPrice = '410', productSellUnitPrice = '410', productSellHalfPrice = '410', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01441',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 = '7.89' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1441';
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', '1441', '1.00', '2026-10-05', '1', '0','0144101','410','410','410','380','','0','0','0','0','0','0','0','0','0','0'); -- id=1441
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1441', '1', '0', '1', '2026-10-05'); -- id=1454
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1441', '1', '0', '0', '1441', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2154
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1441, 1,'2026-10-05 15:59:42',1)
                ON DUPLICATE KEY UPDATE productid = 1441, edited = 1, sysdate = '2026-10-05 15:59:42', userid = 1; -- id=2205
UPDATE product SET productName = 'هاف وسوسته عريض سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '380.00', productSellAllPrice = '410.00', productSellUnitPrice = '410.00', productSellHalfPrice = '410.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01441',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 = '7.89' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1441';
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 ('كابيشوه مقطع سفنتي ','','88','410','440','440','440','2026-10-05','0','1','0','','0','0','0','0','0','410','410','410','410','410','0','7.32','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=1442
UPDATE product SET productName = 'كابيشوه مقطع سفنتي ', productDescription = '', productCatId = '88', productBuyPrice = '410', productSellAllPrice = '440', productSellUnitPrice = '440', productSellHalfPrice = '440', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01442',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 = '7.32' , 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 = '1442';
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', '1442', '1.00', '2026-10-05', '1', '0','0144201','440','440','440','410','','0','0','0','0','0','0','0','0','0','0'); -- id=1442
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1442', '1', '0', '1', '2026-10-05'); -- id=1455
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1442', '1', '0', '0', '1442', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2155
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1442, 1,'2026-10-05 15:59:42',1)
                ON DUPLICATE KEY UPDATE productid = 1442, edited = 1, sysdate = '2026-10-05 15:59:42', userid = 1; -- id=2206
UPDATE product SET productName = 'كابيشوه مقطع سفنتي ', productDescription = '', productCatId = '88', productBuyPrice = '410.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01442',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 = '7.32' , 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 = '1442';
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 ('حوض origian سفنتي','','88','380','410','410','410','2026-10-05','0','1','0','','0','0','0','0','0','380','380','380','380','380','0','7.89','0','0','.','0','0','0','380','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','380','380','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','380','0','0','0','0','0','0','','','0','0','0','0'); -- id=1443
UPDATE product SET productName = 'حوض origian سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '380', productSellAllPrice = '410', productSellUnitPrice = '410', productSellHalfPrice = '410', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01443',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 = '7.89' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1443';
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', '1443', '1.00', '2026-10-05', '1', '0','0144301','410','410','410','380','','0','0','0','0','0','0','0','0','0','0'); -- id=1443
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1443', '1', '0', '1', '2026-10-05'); -- id=1456
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1443', '1', '0', '0', '1443', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2156
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1443, 1,'2026-10-05 15:59:42',1)
                ON DUPLICATE KEY UPDATE productid = 1443, edited = 1, sysdate = '2026-10-05 15:59:42', userid = 1; -- id=2207
UPDATE product SET productName = 'حوض origian سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '380.00', productSellAllPrice = '410.00', productSellUnitPrice = '410.00', productSellHalfPrice = '410.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01443',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 = '7.89' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='380',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='380',meanbuyprice_withTax='380',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='380',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1443';
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 ('ال خطوط طول مثلث سفنتي','','88','390','420','420','420','2026-10-05','0','1','0','','0','0','0','0','0','390','390','390','390','390','0','7.69','7.69','7.69','.','0','0','0','390','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','390','390','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','390','0','0','0','0','0','0','','','0','0','0','0'); -- id=1444
UPDATE product SET productName = 'ال خطوط طول مثلث سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390', productSellAllPrice = '420', productSellUnitPrice = '420', productSellHalfPrice = '420', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01444',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390' , buypricereal_precentage = '0' , buytotal_precentage = '7.69' , buyhalf_precentage = '7.69' , buypart_precentage = '7.69',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1444';
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', '1444', '1.00', '2026-10-05', '1', '0','0144401','420','420','420','390','','0','0','0','0','0','0','0','0','0','0'); -- id=1444
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1444', '1', '0', '1', '2026-10-05'); -- id=1457
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1444', '1', '0', '0', '1444', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2157
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1444, 1,'2026-10-05 15:59:42',1)
                ON DUPLICATE KEY UPDATE productid = 1444, edited = 1, sysdate = '2026-10-05 15:59:42', userid = 1; -- id=2208
UPDATE product SET productName = 'ال خطوط طول مثلث سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01444',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390' , buypricereal_precentage = '0' , buytotal_precentage = '7.69' , buyhalf_precentage = '7.69' , buypart_precentage = '7.69',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1444';
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 ('حوض  luxte سفنتي','','88','390','420','420','420','2026-10-05','0','1','0','','0','0','0','0','0','390','390','390','390','390','0','7.69','0','0','.','0','0','0','390','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','390','390','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','390','0','0','0','0','0','0','','','0','0','0','0'); -- id=1445
UPDATE product SET productName = 'حوض  luxte سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390', productSellAllPrice = '420', productSellUnitPrice = '420', productSellHalfPrice = '420', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01445',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390' , buypricereal_precentage = '0' , buytotal_precentage = '7.69' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1445';
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', '1445', '1.00', '2026-10-05', '1', '0','0144501','420','420','420','390','','0','0','0','0','0','0','0','0','0','0'); -- id=1445
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1445', '1', '0', '1', '2026-10-05'); -- id=1458
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1445', '1', '0', '0', '1445', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2158
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1445, 1,'2026-10-05 15:59:42',1)
                ON DUPLICATE KEY UPDATE productid = 1445, edited = 1, sysdate = '2026-10-05 15:59:42', userid = 1; -- id=2209
UPDATE product SET productName = 'حوض  luxte سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01445',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390' , buypricereal_precentage = '0' , buytotal_precentage = '7.69' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1445';
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 ('حوض انتين استك سفنتي','','88','390','420','420','420','2026-10-05','0','1','0','','0','0','0','0','0','390','390','390','390','390','0','7.69','0','0','.','0','0','0','390','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','390','390','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','390','0','0','0','0','0','0','','','0','0','0','0'); -- id=1446
UPDATE product SET productName = 'حوض انتين استك سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390', productSellAllPrice = '420', productSellUnitPrice = '420', productSellHalfPrice = '420', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01446',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390' , buypricereal_precentage = '0' , buytotal_precentage = '7.69' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1446';
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', '1446', '1.00', '2026-10-05', '1', '0','0144601','420','420','420','390','','0','0','0','0','0','0','0','0','0','0'); -- id=1446
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1446', '1', '0', '1', '2026-10-05'); -- id=1459
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1446', '1', '0', '0', '1446', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2159
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1446, 1,'2026-10-05 15:59:42',1)
                ON DUPLICATE KEY UPDATE productid = 1446, edited = 1, sysdate = '2026-10-05 15:59:42', userid = 1; -- id=2210
UPDATE product SET productName = 'حوض انتين استك سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01446',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390' , buypricereal_precentage = '0' , buytotal_precentage = '7.69' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1446';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:29:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:59:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:59:44', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2916
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:29:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 15:59:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 15:59:46', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2917
UPDATE user SET loginip = "" WHERE userid = 4;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:38:01";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:38:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:08:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 16:08:03', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2918
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-05 12:38:03";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 16:08:03', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2919
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:41:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:11:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:11:18', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2920
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:41:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:11:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:11:58', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2921
UPDATE product SET productName = 'حوض اتنين استك سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01446',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390.00',lastbuyprice_withDiscount = '390',meanbuyprice = '390.00',meanbuyprice_withDiscount = '390' , productbuypricereal = '390.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '7.69' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1446';
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1446, 1,'2026-10-05 16:12:18',1)
                ON DUPLICATE KEY UPDATE productid = 1446, edited = 1, sysdate = '2026-10-05 16:12:18', userid = 1; -- id=2210
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:42:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:12:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:12:28', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2922
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:43:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:13:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsController.php', '2026-10-05 16:13:24', '1', 'oneSupplier', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsController.php?do=oneSupplier'); -- id=2923
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:43:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:13:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-05 16:13:27', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php'); -- id=2924
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:43:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:13:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-05 16:13:36', '1', 'supplierShow2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php?do=supplierShow2'); -- id=2925
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:45:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:15:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:15:02', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2926
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:45:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:15:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:15:19', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2927
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:45:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:15:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:15:32', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2928
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:46:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:16:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:16:14', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2929
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:46:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:16:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:16:25', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2930
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:47:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:17:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:17:28', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2931
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:48:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:18:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:18:23', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2932
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:48:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:18:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:18:26', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2933
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:51:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:21:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:21:41', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2934
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:52:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:22:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:22:32', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2935
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:53:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:23:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:23:17', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2936
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 12:55:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:25:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:25:30', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2937
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:03:41";
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-05 13:03:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:33:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 16:33:44', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2938
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-05 13:03:44";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 16:33:44', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2939
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:03:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:33:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:33:49', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2940
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:06:43";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:06:45";
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-05 13:06:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:36:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 16:36:48', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2941
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-05 13:06:48";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 16:36:48', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2942
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:06:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:36:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:36:51', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2943
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:08:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:38:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:38:20', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2944
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:08:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:38:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:38:43', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2945
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:08:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:38:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-05 16:38:58', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=2946
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:09:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:39:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-05 16:39:07', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=2947
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:09:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:39:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-05 16:39:25', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php'); -- id=2948
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:09:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:39:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-05 16:39:30', '1', 'supplierShow2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php?do=supplierShow2'); -- id=2949
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:09:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:39:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:39:41', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2950
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:09:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:39:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:39:44', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2951
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:09:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:39:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:39:53', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2952
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:10:30";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:40:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-05 16:40:30', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=2953
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:10:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:40:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:40:38', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2954
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:10:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:40:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-05 16:40:43', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php?do=show'); -- id=2955
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-05 13:14:01";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:44:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 16:44:01', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2956
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-05 13:14:01";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 16:44:01', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2957
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:14:06";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:44:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-05 16:44:06', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storeController.php'); -- id=2958
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:14:25";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:44:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-05 16:44:25', '1', 'add', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storeController.php?do=add'); -- id=2959
INSERT INTO store (storeName, nameEn, branchId, addressAr, addressEn, phone, email, storeDate, storeDescription, conditions, userId, treeId, treeIdBetween, webApiId) VALUES ('مخزن خارجي', '', '0', '', '', '', '', '2026-10-05', "", '0', '1', '0', '0', '0'); -- id=3
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('مخزن خارجي', 'مخزن خارجي', 'مخزن خارجي', 'مخزن خارجي', '49', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-05 16:44:25'); -- id=562
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('مخزن خارجي وسيط', 'مخزن خارجي وسيط', 'مخزن خارجي وسيط', 'مخزن خارجي وسيط', '49', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-05 16:44:25'); -- id=563
UPDATE store SET storeName = 'مخزن خارجي', nameEn = '', branchId = '0', addressAr = '', addressEn = '', phone = '', email = '', storeDate = '2026-10-05', storeDescription = "", conditions = '0', userId = '1', treeId = '562', treeIdBetween = '563', updatedAt = CURRENT_TIMESTAMP WHERE storeId = '3';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:14:25";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:44:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-05 16:44:25', '1', 'sucess', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storeController.php?do=sucess'); -- id=2960
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:14:27";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:44:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-05 16:44:27', '1', 'show', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storeController.php?do=show'); -- id=2961
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:14:29";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:44:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:44:29', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2962
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:14:43";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:44:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:44:43', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2963
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:14:53";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:44:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:44:53', '1', 'show', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2964
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:15:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:45:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:45:40', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2965
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:15:45";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:45:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:45:45', '1', 'show', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=show'); -- id=2966
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:16:08";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:46:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 16:46:08', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=2967
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:16:11";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:46:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:46:11', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2968
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:17:22";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:47:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-05 16:47:22', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/inventoryController.php'); -- id=2969
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:18:05";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:48:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-05 16:48:05', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/inventoryController.php'); -- id=2970
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:19:03";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:49:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-05 16:49:03', '1', 'autosave', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/inventoryController.php?do=autosave'); -- id=2971
UPDATE storedetail SET  productquantity = '17427', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '853';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('853', '1', '15965', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '1462', '17427', '1', '2026-10-05','0','0'); -- id=2160
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2314925', '2314925', '2026-10-05', '1', '0', '0', '2026-10-05 16:49:03','اعادة جرد للمنتج : (هندي ساده/حنفي) فى مخزن : (المخزن الرئيسي) بالكمية : 17427','1','0',null,'0','2160','inventoryController.php?do=details&id=2160'); -- id=1116
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1116', '382', '2314925', '','0'); -- id=1120
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17033062.4', 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 ('1116', '188', '2314925', '','0'); -- id=1116
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-2339490', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:19:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:49:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:49:17', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2972
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:19:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:49:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:49:19', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2973
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:19:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:49:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:49:20', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2974
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:19:29";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:49:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-05 16:49:29', '1', 'autosave', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/inventoryController.php?do=autosave'); -- id=2975
UPDATE storedetail SET  productquantity = '3725', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '855';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('855', '1', '2660', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '1065', '3725', '1', '2026-10-05','0','0'); -- id=2161
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '518700', '518700', '2026-10-05', '1', '0', '0', '2026-10-05 16:49:29','اعادة جرد للمنتج : (نيولاند ساده و خربشه dona/حنفي) فى مخزن : (المخزن الرئيسي) بالكمية : 3725','1','0',null,'0','2161','inventoryController.php?do=details&id=2161'); -- id=1117
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1117', '382', '518700', '','0'); -- id=1121
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17551762.4', 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 ('1117', '188', '518700', '','0'); -- id=1117
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-2858190', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:20:22";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:50:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-05 16:50:22', '1', 'autosave', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/inventoryController.php?do=autosave'); -- id=2976
UPDATE storedetail SET  productquantity = '2694', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '852';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('852', '1', '1458', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '1236', '2694', '1', '2026-10-05','0','0'); -- id=2162
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '371790', '371790', '2026-10-05', '1', '0', '0', '2026-10-05 16:50:22','اعادة جرد للمنتج : (نيولاند جامبو حنفى 275/حنفي) فى مخزن : (المخزن الرئيسي) بالكمية : 2694','1','0',null,'0','2162','inventoryController.php?do=details&id=2162'); -- id=1118
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1118', '382', '371790', '','0'); -- id=1122
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '17923552.4', 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 ('1118', '188', '371790', '','0'); -- id=1118
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-3229980', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
COMMIT;
update user set blockedByLimits = 0;
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:20:28";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:50:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 16:50:28', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=2977
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-05 13:20:28";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 16:50:28', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2978
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:20:31";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:50:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 16:50:31', '1', 'addsellBill', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2979
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:21:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:51:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:51:01', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2980
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:21:04";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:51:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:51:04', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2981
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:21:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:51:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:51:38', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2982
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:21:42";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:51:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:51:42', '1', 'add', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=2983
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 ('هندي خاص','','21','160','175','175','175','2026-10-05','0','1','0','','0','0','0','0','0','160','160','160','160','160','0','9.38','0','0','.','0','0','0','160','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','160','160','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','160','0','0','0','0','0','0','','','0','0','0','0'); -- id=1447
UPDATE product SET productName = 'هندي خاص', productDescription = '', productCatId = '21', productBuyPrice = '160', productSellAllPrice = '175', productSellUnitPrice = '175', productSellHalfPrice = '175', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01447',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '160',lastbuyprice_withDiscount = '160',meanbuyprice = '160',meanbuyprice_withDiscount = '160' , productbuypricereal = '160' , buypricereal_precentage = '0' , buytotal_precentage = '9.38' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='160',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='160',meanbuyprice_withTax='160',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='160',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1447';
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', '1447', '1', '2026-10-05', '1', '0','0144701','175','175','175','160','','0','0','0','0','0','0','0','0','0','0'); -- id=1447
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1447', '1', '1100', '1', '2026-10-05'); -- id=1460
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1447', '1', '1100', '0', '1447', 'إضافة منتج', 'productController.php', '0', '1100', '1', '2026-10-05','0','0'); -- id=2163
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1447, 1,'2026-10-05 16:51:42',1)
                ON DUPLICATE KEY UPDATE productid = 1447, edited = 1, sysdate = '2026-10-05 16:51:42', userid = 1; -- id=2212
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '176000', '176000', '2026-10-05', '1', '0', '0', '2026-10-05 16:51:42','إضافة منتج هندي خاص الكمية 1100','1','0','0','0','1447','productController.php?do=edit&id=1447'); -- id=1119
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1119', '382', '176000', '','0'); -- id=1123
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18099552.4', 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 ('1119', '121', '176000', '','0'); -- id=1119
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '9913451.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
UPDATE product SET productName = 'هندي خاص', productDescription = '', productCatId = '21', productBuyPrice = '160.00', productSellAllPrice = '175.00', productSellUnitPrice = '175.00', productSellHalfPrice = '175.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01447',type ='0', expireDate = '0' , dailyentryId = '1119',isService = '0',isOptic = '0',lastbuyprice = '160',lastbuyprice_withDiscount = '160',meanbuyprice = '160',meanbuyprice_withDiscount = '160' , productbuypricereal = '160' , buypricereal_precentage = '0' , buytotal_precentage = '9.38' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='160',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='160',meanbuyprice_withTax='160',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='160',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1447';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:21:44";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:51:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:51:44', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=2984
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:21:52";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:51:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-05 16:51:52', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storemovementController.php'); -- id=2985
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:22:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:52:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:52:44', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2986
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:23:00";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:53:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-05 16:53:00', '1', 'add', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storemovementController.php?do=add'); -- id=2987
BEGIN;
CALL insertUniqueOptNum(2,1,3,853,15965,'2026-10-05',1,0, '' , '' ,0,0,0,0,0,'2026-10-05 16:53:00',0,'',0,'','hide',0,@id,@optnum);
UPDATE storedetail SET  productquantity = '1462', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '853';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05', 1, 853, 0, 0
                    , 145.00, -15965, 0, 0, 1, '2026-10-05 16:53:00')
                ON DUPLICATE KEY UPDATE buyprice = 145.00,
                        buyQuantity =buyQuantity+-15965, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 16:53:00' ; -- id=189
UPDATE storemovement SET  buyPricesHistoryBookData = "15965*2026-10-05*145.00," WHERE transferproductid = 14;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('853', '1', '15965', '1', '14', 'تحويل منتجات من المخزن', 'storemovementController.php', '17427', '1462', '1', '2026-10-05','0','0'); -- id=2164
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('853', '3', '15965', '1', '2026-10-05'); -- id=1461
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05', 3, 853, 0, 0
                    , 145.00, 15965, 0, 0, 1, '2026-10-05 16:53:00')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+15965, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 16:53:00' ; -- id=190
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('853', '3', '15965', '0', '14', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '15965', '1', '2026-10-05','0','0'); -- id=2165
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '3', '855', '2660', '2026-10-05', '1', '0','2','0','0','2026-10-05 16:53:00','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=15
UPDATE storedetail SET  productquantity = '1065', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '855';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05', 1, 855, 0, 0
                    , 195.00, -2660, 0, 0, 1, '2026-10-05 16:53:00')
                ON DUPLICATE KEY UPDATE buyprice = 195.00,
                        buyQuantity =buyQuantity+-2660, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 16:53:00' ; -- id=191
UPDATE storemovement SET  buyPricesHistoryBookData = "2660*2026-10-05*195.00," WHERE transferproductid = 15;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('855', '1', '2660', '1', '15', 'تحويل منتجات من المخزن', 'storemovementController.php', '3725', '1065', '1', '2026-10-05','0','0'); -- id=2166
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('855', '3', '2660', '1', '2026-10-05'); -- id=1462
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05', 3, 855, 0, 0
                    , 195.00, 2660, 0, 0, 1, '2026-10-05 16:53:00')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+2660, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 16:53:00' ; -- id=192
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('855', '3', '2660', '0', '15', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '2660', '1', '2026-10-05','0','0'); -- id=2167
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '3', '852', '1458', '2026-10-05', '1', '0','2','0','0','2026-10-05 16:53:00','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=16
UPDATE storedetail SET  productquantity = '1236', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '852';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05', 1, 852, 0, 0
                    , 255.00, -1458, 0, 0, 1, '2026-10-05 16:53:00')
                ON DUPLICATE KEY UPDATE buyprice = 255.00,
                        buyQuantity =buyQuantity+-1458, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 16:53:00' ; -- id=193
UPDATE storemovement SET  buyPricesHistoryBookData = "1458*2026-10-05*255.00," WHERE transferproductid = 16;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('852', '1', '1458', '1', '16', 'تحويل منتجات من المخزن', 'storemovementController.php', '2694', '1236', '1', '2026-10-05','0','0'); -- id=2168
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('852', '3', '1458', '1', '2026-10-05'); -- id=1463
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05', 3, 852, 0, 0
                    , 255.00, 1458, 0, 0, 1, '2026-10-05 16:53:00')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1458, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 16:53:00' ; -- id=194
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('852', '3', '1458', '0', '16', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1458', '1', '2026-10-05','0','0'); -- id=2169
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '3', '1447', '1100', '2026-10-05', '1', '0','2','0','0','2026-10-05 16:53:00','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=17
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1460';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05', 1, 1447, 0, 0
                    , 160.00, -1100, 0, 0, 1, '2026-10-05 16:53:00')
                ON DUPLICATE KEY UPDATE buyprice = 160.00,
                        buyQuantity =buyQuantity+-1100, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 16:53:00' ; -- id=195
UPDATE storemovement SET  buyPricesHistoryBookData = "1100*2026-10-05*160.00," WHERE transferproductid = 17;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1447', '1', '1100', '1', '17', 'تحويل منتجات من المخزن', 'storemovementController.php', '1100', '0', '1', '2026-10-05','0','0'); -- id=2170
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1447', '3', '1100', '1', '2026-10-05'); -- id=1464
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05', 3, 1447, 0, 0
                    , 160.00, 1100, 0, 0, 1, '2026-10-05 16:53:00')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1100, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 16:53:00' ; -- id=196
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1447', '3', '1100', '0', '17', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '1100', '1', '2026-10-05','0','0'); -- id=2171
UPDATE storedetail SET inUse = 0 WHERE storedetailid=853;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=855;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=852;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=1460;
COMMIT;
BEGIN;
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3381415', '3381415', '2026-10-05', '1', '0', '0', '2026-10-05 16:53:00','تحويل من مخزن المخزن الرئيسي الى مخزن مخزن خارجي','1','0',null,'0','2','storemovementController.php?do=show&operationnum=2'); -- id=1120
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1120', '562', '3381415', '','0'); -- id=1124
UPDATE accountstree SET name = 'مخزن خارجي', customName = 'مخزن خارجي', customNameEn = 'مخزن خارجي', nameEn = 'مخزن خارجي', parent = '49', accountNature = '0', theValue = '3381415', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-05 16:44:25' WHERE id = '562';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1120', '382', '3381415', '','0'); -- id=1120
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14718137.4', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
COMMIT;
COMMIT;
UPDATE storemovement SET  dailyentryid =1120 WHERE operationnum = 2;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:23:00";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:53:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-05 16:53:00', '1', 'sucess', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storemovementController.php?do=sucess'); -- id=2988
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:23:02";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:53:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-05 16:53:02', '1', 'show', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storemovementController.php?do=show'); -- id=2989
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:23:08";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:53:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-05 16:53:08', '1', '', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=2990
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:23:18";
UPDATE user SET loginip = "156.204.214.24", lastactivetime = "2026-10-05 16:53:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-05 16:53:18', '1', 'show', '156.204.214.24', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php?do=show'); -- id=2991
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:23:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:53:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:53:21', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2992
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:25:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:55:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:55:12', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2993
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:27:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:57:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:57:23', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2994
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:28:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 16:58:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 16:58:23', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2995
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:41:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 17:11:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 17:11:36', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=2996
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:56:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 17:26:14", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 17:26:14', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=2997
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:56:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 17:26:23", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 17:26:23', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=2998
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:57:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 17:27:26", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 17:27:26', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=2999
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:57:45";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 17:27:45", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 17:27:45', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3000
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:58:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 17:28:41", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 17:28:41', '2', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3001
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 13:58:49";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 17:28:49", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 17:28:49', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3002
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:39:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:09:23", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:09:23', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3003

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac3b421ef3ad
-- ----------------------------------------------------------------------------------------------------

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-05 18:09:23', '06ac3b421ef3ad', '1', '0.00', '0', '0', '1', '37365.00', '37365', '37365', '0', '1', '2026-10-05 18:09:23', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '92' ,'0','','','','','-1','0','0','0','0','0','37365','0','','0','0','37365','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=86
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','اضافة فاتورة مبيعات','86', '0', '2026-10-05 18:09:23', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '37365', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 18:09:23','0','0','',''); -- id=167
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('470','09728', '86', '28', '946', '5', '490', '2450', '0', '', '0', '2026-10-05 18:09:23', '946', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','490','2450','0','','0','0.00','0','0','0','0'); -- id=357
UPDATE sellbilldetail SET  lastbuyprice = 470.00 , meanbuyprice = 470.00, lastbuyprice_withDiscount = 470.00, meanbuyprice_withDiscount = 470.00
        , lastbuyprice_withTax = 470, meanbuyprice_withTax = 470, lastbuyprice_withDiscountAndTax = 470
                where sellbilldetailid = 357;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (946, '2026-10-05', 2450, 2350, 2350
                    , 2350, 2350, 2350, 2350
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2350, 2350, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2450, sellCostBuyPrice =sellCostBuyPrice+2350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2350, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2350, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2350
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2350
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2350
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 2450, 2350, 2350
                    , 2350, 2350, 2350, 2350
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2350, 2350, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2450, sellCostBuyPrice =sellCostBuyPrice+2350
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2350, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2350
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2350, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2350
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2350
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2350
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2350
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '0', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '946';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('946', '1', '5', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '5', '0', '2', '2026-10-05 18:09:23','0','0'); -- id=2172
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('405','90202', '86', '28', '928', '10', '425', '4250', '0', '', '0', '2026-10-05 18:09:23', '928', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','425','4250','0','','0','0.00','0','0','0','0'); -- id=358
UPDATE sellbilldetail SET  lastbuyprice = 405.00 , meanbuyprice = 405.00, lastbuyprice_withDiscount = 405.00, meanbuyprice_withDiscount = 405.00
        , lastbuyprice_withTax = 405, meanbuyprice_withTax = 405, lastbuyprice_withDiscountAndTax = 405
                where sellbilldetailid = 358;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (928, '2026-10-05', 4250, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4250, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 4250, 4050, 4050
                    , 4050, 4050, 4050, 4050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 4050, 4050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4250, sellCostBuyPrice =sellCostBuyPrice+4050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '51', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '928';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('928', '1', '10', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '61', '51', '2', '2026-10-05 18:09:23','0','0'); -- id=2173
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('400','09822', '86', '32', '1034', '5', '420', '2100', '0', '', '0', '2026-10-05 18:09:23', '1034', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','420','2100','0','','0','0.00','0','0','0','0'); -- id=359
UPDATE sellbilldetail SET  lastbuyprice = 400.00 , meanbuyprice = 400.00, lastbuyprice_withDiscount = 400.00, meanbuyprice_withDiscount = 400.00
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where sellbilldetailid = 359;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1034, '2026-10-05', 2100, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 2100, 2000, 2000
                    , 2000, 2000, 2000, 2000
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2000, 2000, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2100, sellCostBuyPrice =sellCostBuyPrice+2000
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2000, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2000
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2000, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2000
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2000
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2000
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2000
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '90', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '1034';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1034', '1', '5', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '95', '90', '2', '2026-10-05 18:09:23','0','0'); -- id=2174
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 30;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('537.64','01336', '86', '8', '1336', '5', '565', '2825', '0', '', '0', '2026-10-05 18:09:23', '1336', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','30-5,','1','1','0','0','565','2825','0','','0','0.00','0','0','0','0'); -- id=360
UPDATE sellbilldetail SET  lastbuyprice = 545.00 , meanbuyprice = 545.00, lastbuyprice_withDiscount = 537.64, meanbuyprice_withDiscount = 537.64
        , lastbuyprice_withTax = 545, meanbuyprice_withTax = 545, lastbuyprice_withDiscountAndTax = 537.64
                where sellbilldetailid = 360;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1336, '2026-10-05', 2825, 2725, 2725
                    , 2725, 2688.2, 2688.2, 2688.2
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2725, 2725, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2825, sellCostBuyPrice =sellCostBuyPrice+2725
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2725, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2725
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2688.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2688.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2688.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2725
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2725
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 2825, 2725, 2725
                    , 2725, 2688.2, 2688.2, 2688.2
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2725, 2725, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2825, sellCostBuyPrice =sellCostBuyPrice+2725
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2725, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2725
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2688.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2688.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2688.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2725
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2725
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '1336';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1336', '1', '5', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '20', '15', '2', '2026-10-05 18:09:23','0','0'); -- id=2175
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('565','09783', '86', '8', '751', '5', '585', '2925', '0', '', '0', '2026-10-05 18:09:23', '751', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','585','2925','0','','0','0.00','0','0','0','0'); -- id=361
UPDATE sellbilldetail SET  lastbuyprice = 565.00 , meanbuyprice = 565.00, lastbuyprice_withDiscount = 565.00, meanbuyprice_withDiscount = 565.00
        , lastbuyprice_withTax = 565, meanbuyprice_withTax = 565, lastbuyprice_withDiscountAndTax = 565
                where sellbilldetailid = 361;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (751, '2026-10-05', 2925, 2825, 2825
                    , 2825, 2825, 2825, 2825
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2825, 2825, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2925, sellCostBuyPrice =sellCostBuyPrice+2825
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2825, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2825
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2825, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2825
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2825
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2825
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2825
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 2925, 2825, 2825
                    , 2825, 2825, 2825, 2825
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2825, 2825, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2925, sellCostBuyPrice =sellCostBuyPrice+2825
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2825, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2825
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2825, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2825
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2825
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2825
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2825
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '5', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '751';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('751', '1', '5', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '10', '5', '2', '2026-10-05 18:09:23','0','0'); -- id=2176
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', '86', '6', '684', '10', '350', '3500', '0', '', '0', '2026-10-05 18:09:23', '684', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','350','3500','0','','0','0.00','0','0','0','0'); -- id=362
UPDATE sellbilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where sellbilldetailid = 362;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (684, '2026-10-05', 3500, 3300, 3300
                    , 3300, 3300, 3300, 3300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 3300, 3300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3300, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3300
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 3500, 3300, 3300
                    , 3300, 3300, 3300, 3300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3300, 3300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3300, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3300
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '54', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '684';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('684', '1', '10', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '64', '54', '2', '2026-10-05 18:09:23','0','0'); -- id=2177
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('330','09518', '86', '6', '677', '5', '350', '1750', '0', '', '0', '2026-10-05 18:09:23', '677', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','350','1750','0','','0','0.00','0','0','0','0'); -- id=363
UPDATE sellbilldetail SET  lastbuyprice = 330.00 , meanbuyprice = 330.00, lastbuyprice_withDiscount = 330.00, meanbuyprice_withDiscount = 330.00
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where sellbilldetailid = 363;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (677, '2026-10-05', 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-05', 1750, 1650, 1650
                    , 1650, 1650, 1650, 1650
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1650, 1650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1750, sellCostBuyPrice =sellCostBuyPrice+1650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '43', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '677';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('677', '1', '5', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '48', '43', '2', '2026-10-05 18:09:23','0','0'); -- id=2178
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('250','04563', '86', '21', '867', '10', '270', '2700', '0', '', '0', '2026-10-05 18:09:23', '867', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','270','2700','0','','0','0.00','0','0','0','0'); -- id=364
UPDATE sellbilldetail SET  lastbuyprice = 250.00 , meanbuyprice = 250.00, lastbuyprice_withDiscount = 250.00, meanbuyprice_withDiscount = 250.00
        , lastbuyprice_withTax = 250, meanbuyprice_withTax = 250, lastbuyprice_withDiscountAndTax = 250
                where sellbilldetailid = 364;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (867, '2026-10-05', 2700, 2500, 2500
                    , 2500, 2500, 2500, 2500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 2500, 2500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2700, sellCostBuyPrice =sellCostBuyPrice+2500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2500
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 2700, 2500, 2500
                    , 2500, 2500, 2500, 2500
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2500, 2500, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2700, sellCostBuyPrice =sellCostBuyPrice+2500
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2500, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2500
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2500, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2500
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2500
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2500
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2500
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '174', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '867';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('867', '1', '10', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '184', '174', '2', '2026-10-05 18:09:23','0','0'); -- id=2179
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('480','09810', '86', '19', '845', '5', '500', '2500', '0', '', '0', '2026-10-05 18:09:23', '845', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','500','2500','0','','0','0.00','0','0','0','0'); -- id=365
UPDATE sellbilldetail SET  lastbuyprice = 480.00 , meanbuyprice = 480.00, lastbuyprice_withDiscount = 480.00, meanbuyprice_withDiscount = 480.00
        , lastbuyprice_withTax = 480, meanbuyprice_withTax = 480, lastbuyprice_withDiscountAndTax = 480
                where sellbilldetailid = 365;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (845, '2026-10-05', 2500, 2400, 2400
                    , 2400, 2400, 2400, 2400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2400, 2400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2500, sellCostBuyPrice =sellCostBuyPrice+2400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 2500, 2400, 2400
                    , 2400, 2400, 2400, 2400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2400, 2400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2500, sellCostBuyPrice =sellCostBuyPrice+2400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '27', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '845';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('845', '1', '5', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '32', '27', '2', '2026-10-05 18:09:23','0','0'); -- id=2180
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+9 where id = 7;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('430','07429', '86', '19', '833', '9', '450', '4050', '0', '', '0', '2026-10-05 18:09:23', '833', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','7-9,','1','1','0','0','450','4050','0','','0','0.00','0','0','0','0'); -- id=366
UPDATE sellbilldetail SET  lastbuyprice = 430.00 , meanbuyprice = 430.00, lastbuyprice_withDiscount = 430.00, meanbuyprice_withDiscount = 430.00
        , lastbuyprice_withTax = 430, meanbuyprice_withTax = 430, lastbuyprice_withDiscountAndTax = 430
                where sellbilldetailid = 366;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (833, '2026-10-05', 4050, 3870, 3870
                    , 3870, 3870, 3870, 3870
                    , 0, 0, 0, 0
                    , 0, 0, 0, 9, 0, 3870, 3870, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4050, sellCostBuyPrice =sellCostBuyPrice+3870
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3870, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3870
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3870, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3870
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3870
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3870
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3870
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+9
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 4050, 3870, 3870
                    , 3870, 3870, 3870, 3870
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3870, 3870, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4050, sellCostBuyPrice =sellCostBuyPrice+3870
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3870, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3870
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3870, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3870
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3870
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3870
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3870
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '30', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '833';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('833', '1', '9', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '39', '30', '2', '2026-10-05 18:09:23','0','0'); -- id=2181
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('315','78068', '86', '19', '834', '5', '335', '1675', '0', '', '0', '2026-10-05 18:09:23', '834', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','335','1675','0','','0','0.00','0','0','0','0'); -- id=367
UPDATE sellbilldetail SET  lastbuyprice = 315.00 , meanbuyprice = 315.00, lastbuyprice_withDiscount = 315.00, meanbuyprice_withDiscount = 315.00
        , lastbuyprice_withTax = 315, meanbuyprice_withTax = 315, lastbuyprice_withDiscountAndTax = 315
                where sellbilldetailid = 367;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (834, '2026-10-05', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1675, sellCostBuyPrice =sellCostBuyPrice+1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1575
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 1675, 1575, 1575
                    , 1575, 1575, 1575, 1575
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1575, 1575, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1675, sellCostBuyPrice =sellCostBuyPrice+1575
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1575, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1575
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1575, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1575
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1575
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1575
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1575
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '15', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '834';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('834', '1', '5', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '20', '15', '2', '2026-10-05 18:09:23','0','0'); -- id=2182
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('305','08778', '86', '19', '838', '5', '325', '1625', '0', '', '0', '2026-10-05 18:09:23', '838', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','325','1625','0','','0','0.00','0','0','0','0'); -- id=368
UPDATE sellbilldetail SET  lastbuyprice = 305.00 , meanbuyprice = 305.00, lastbuyprice_withDiscount = 305.00, meanbuyprice_withDiscount = 305.00
        , lastbuyprice_withTax = 305, meanbuyprice_withTax = 305, lastbuyprice_withDiscountAndTax = 305
                where sellbilldetailid = 368;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (838, '2026-10-05', 1625, 1525, 1525
                    , 1525, 1525, 1525, 1525
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1525, 1525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1625, sellCostBuyPrice =sellCostBuyPrice+1525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1525, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1525, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1525
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1525
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1525
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 1625, 1525, 1525
                    , 1525, 1525, 1525, 1525
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1525, 1525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1625, sellCostBuyPrice =sellCostBuyPrice+1525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1525, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1525, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1525
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1525
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1525
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '19', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '838';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('838', '1', '5', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '24', '19', '2', '2026-10-05 18:09:23','0','0'); -- id=2183
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('535','09720', '86', '8', '744', '5', '555', '2775', '0', '', '0', '2026-10-05 18:09:23', '744', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','555','2775','0','','0','0.00','0','0','0','0'); -- id=369
UPDATE sellbilldetail SET  lastbuyprice = 535.00 , meanbuyprice = 535.00, lastbuyprice_withDiscount = 535.00, meanbuyprice_withDiscount = 535.00
        , lastbuyprice_withTax = 535, meanbuyprice_withTax = 535, lastbuyprice_withDiscountAndTax = 535
                where sellbilldetailid = 369;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (744, '2026-10-05', 2775, 2675, 2675
                    , 2675, 2675, 2675, 2675
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2675, 2675, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2775, sellCostBuyPrice =sellCostBuyPrice+2675
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2675, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2675
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2675, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2675
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2675
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2675
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2675
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 2775, 2675, 2675
                    , 2675, 2675, 2675, 2675
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2675, 2675, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2775, sellCostBuyPrice =sellCostBuyPrice+2675
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2675, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2675
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2675, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2675
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2675
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2675
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2675
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '10', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '744';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('744', '1', '5', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '15', '10', '2', '2026-10-05 18:09:23','0','0'); -- id=2184
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('310','08746', '86', '6', '671', '3', '330', '990', '0', '', '0', '2026-10-05 18:09:23', '671', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','330','990','0','','0','0.00','0','0','0','0'); -- id=370
UPDATE sellbilldetail SET  lastbuyprice = 310.00 , meanbuyprice = 310.00, lastbuyprice_withDiscount = 310.00, meanbuyprice_withDiscount = 310.00
        , lastbuyprice_withTax = 310, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 310
                where sellbilldetailid = 370;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (671, '2026-10-05', 990, 930, 930
                    , 930, 930, 930, 930
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 930, 930, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+990, sellCostBuyPrice =sellCostBuyPrice+930
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+930, sellCostMeanBuyPrice = sellCostMeanBuyPrice+930
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+930, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+930
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+930
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+930
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+930
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 990, 930, 930
                    , 930, 930, 930, 930
                    , 0, 0, 0, 0
                    , 0, 0, 0, 930, 930, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+990, sellCostBuyPrice =sellCostBuyPrice+930
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+930, sellCostMeanBuyPrice = sellCostMeanBuyPrice+930
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+930, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+930
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+930
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+930
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+930
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '752', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '671';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('671', '1', '3', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '755', '752', '2', '2026-10-05 18:09:23','0','0'); -- id=2185
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('230','08703', '86', '68', '1233', '5', '250', '1250', '0', '', '0', '2026-10-05 18:09:23', '1233', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','250','1250','0','','0','0.00','0','0','0','0'); -- id=371
UPDATE sellbilldetail SET  lastbuyprice = 230.00 , meanbuyprice = 230.00, lastbuyprice_withDiscount = 230.00, meanbuyprice_withDiscount = 230.00
        , lastbuyprice_withTax = 230, meanbuyprice_withTax = 230, lastbuyprice_withDiscountAndTax = 230
                where sellbilldetailid = 371;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1233, '2026-10-05', 1250, 1150, 1150
                    , 1150, 1150, 1150, 1150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 1150, 1150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1250, sellCostBuyPrice =sellCostBuyPrice+1150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1150
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+5
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 1250, 1150, 1150
                    , 1150, 1150, 1150, 1150
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1150, 1150, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1250, sellCostBuyPrice =sellCostBuyPrice+1150
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1150, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1150
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1150, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1150
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1150
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1150
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1150
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '31', userid = '2', storedetaildate = '2026-10-05 18:09:23' WHERE storedetailid = '1233';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1233', '1', '5', '1', '86', 'اضافة فاتورة مبيعات', 'sellbillController.php', '36', '31', '2', '2026-10-05 18:09:23','0','0'); -- id=2186
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '325905',  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 ('288540','37365', '0', '2', 'اضافة فاتورة مبيعات', '86', '325905', '2026-10-05 18:09:23', '2',  'sellbillController.php','1','','0'); -- id=106
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '37365', '37365', '2026-10-05', '2', '0', '0', '2026-10-05 18:09:23','اضافة فاتورة مبيعات رقم 86','1','0',null,'0','86','sellbillController.php?do=showDetail&sellbillid=86'); -- id=1121
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1121', '419', '37365', '','0'); -- id=1125
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '325905', 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 ('1121', '143', '37365', '','0'); -- id=1121
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '944285', theOrder = '0', layingOrder = '410101', reportid = '2', listId = '2', notes = '', itemfrom = '0', itemtype = '2', itemtype2 = '0', itemtype3 = 'Income ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:40' WHERE id = '143';
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '35488.2', '35488.2', '2026-10-05', '2', '0', '0', '2026-10-05 18:09:23','اضافة فاتورة مبيعات رقم 86 - صرف البضاعة من المخزن','1','0',null,'0','86','sellbillController.php?do=showDetail&sellbillid=86'); -- id=1122
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1122', '402', '35488.2', '','0'); -- id=1126
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '919572.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1122', '382', '35488.2', '','0'); -- id=1122
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14682649.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1121,0,1122' where sellbillid=86;
 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-05', 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,35525, 35525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+37365, sellCostBuyPrice =sellCostBuyPrice+35525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+35525, sellCostMeanBuyPrice = sellCostMeanBuyPrice+35525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+35488.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+35488.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+35488.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+35525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+35525
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,35525, 35525, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+37365, sellCostBuyPrice =sellCostBuyPrice+35525
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+35525, sellCostMeanBuyPrice = sellCostMeanBuyPrice+35525
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+35488.2, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+35488.2
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+35488.2
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+35525
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+35525
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 37365, 35525, 35525
                    , 35525, 35488.2, 35488.2, 35488.2, 35525, 35525)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+37365, netSellCostBuyPrice = netSellCostBuyPrice+35525
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+35525
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+35525
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+35488.2
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+35488.2
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+35488.2
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+35525
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+35525;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac3b421ef3ad and sellbillId = 86 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:39:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:09:23", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:09:23', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3004
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:40:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:10:18", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:10:18', '2', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=86'); -- id=3005
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:40:23";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:10:23", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:10:23', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3006
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-05 14:51:19";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:21:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 18:21:19', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3007
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-05 14:51:19";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 18:21:19', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3008
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:51:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:21:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-05 18:21:28', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=3009
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:51:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:21:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-05 18:21:38', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php?do=show'); -- id=3010
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:53:34";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:23:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-05 18:23:34', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php'); -- id=3011
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:55:08";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:25:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-05 18:25:08', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php'); -- id=3012
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:55:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:25:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-05 18:25:53', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=add'); -- id=3013
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 ('بلاك اند وايت', '', '', '101810', '', '0', '1', '2026-10-05 18:25:53', '0', '', '','0','0','','','','','','','','','','0','0','1','101810','0','0'); -- id=84
INSERT INTO supplierdebtchange (supplierid, supplierdebtchangebefore, supplierdebtchangeamount, supplierdebtchangetype, processname, supplierdebtchangemodelid, supplierdebtchangeafter, supplierdebtchangedate, userid, tablename, comment, dailyentryid,saveid, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,debtchangbeforeInSupplierCurrency,debtchangamountInSupplierCurrency,debtchangafterInSupplierCurrency,paySerialNo,tagids) VALUES ('84', '0', '101810', '0', 'إضافة مورد جديد', '84', '101810', '2026-10-05 18:25:53', '1', 'supplierController.php', '', '0','', '0','1','1','101810','1','0','101810','101810','0',''); -- id=143
UPDATE client SET clientname = '', clientaddress = '', clientphone = '', clientmobile = '', clientdebt = '', clientdetails = '', conditions = null, clientdate = '', userid = null  , clientareaid = null  ,clientcode = '',dailyentryid = null , rondomtxt = '',clientStoreIds = '', obygyPatientId = '0' , debtLimit='0' , typeclientid='',priceTypeId='0',lastEditUser = '0',card_number = '0',file_faida = '',specialDiscount = '0',specialDiscountVal = '0',file = '',mandobCollectRatio='0',webApiId ='0' ,clientRFID = '',linkedSupplierId = '84',postponeDays='0', studentid='0', taxnumber='', password='',clientTypeForTree='0',treeId='0',husbandNameObgy='',txtNameE='',facility='',delegate='',txtemail='',commercial='',valtaxnumber='',clientaddress2='',country='',delegateid='0',datecustomeraccount='',taxfile='',fileimg='',webStoreType='0',clientaddress3='',tagids='',email_verified='0',email_otp='0',email_otp_expiry='' WHERE clientid = null;
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('بلاك اند وايت', 'بلاك اند وايت', 'بلاك اند وايت', 'بلاك اند وايت', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-05 18:25:53'); -- id=564
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '101810', '101810', '2026-10-05', '1', '0', '0', '2026-10-05 18:25:53','إضافة مورد  ( بلاك اند وايت ) ','1','0','0','0','84','supplierController.php?do=edit&id=84'); -- id=1123
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1123', '121', '101810', '','0'); -- id=1127
UPDATE accountstree SET name = 'حساب وسيط للارصدة الافتتاحية', customName = 'حساب وسيط للارصدة الافتتاحية', customNameEn = 'Paid Capital', nameEn = 'Paid Capital', parent = '119', accountNature = '1', theValue = '9811641.65', theOrder = '0', layingOrder = '3102', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '4', itemtype2 = '0', itemtype3 = 'Equity ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:37' WHERE id = '121';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1123', '564', '101810', '','0'); -- id=1123
UPDATE accountstree SET name = 'بلاك اند وايت', customName = 'بلاك اند وايت', customNameEn = 'بلاك اند وايت', nameEn = 'بلاك اند وايت', parent = '81', accountNature = '1', theValue = '101810', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-05 18:25:53' WHERE id = '564';
COMMIT;
UPDATE supplier SET suppliername = 'بلاك اند وايت', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '101810.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-05', dailyentryid = '1123', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='564',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='101810',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '84';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:55:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:25:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-05 18:25:53', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=sucess'); -- id=3014
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:55:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:25:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierController.php', '2026-10-05 18:25:55', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierController.php?do=show'); -- id=3015
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:58:38";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:28:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-05 18:28:38', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php'); -- id=3016
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:58:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:28:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-05 18:28:51', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php?do=show'); -- id=3017
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:59:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:29:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-05 18:29:29', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php'); -- id=3018
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 14:59:37";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:29:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierReportsnewController.php', '2026-10-05 18:29:37', '1', 'supplierShow2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/supplierReportsnewController.php?do=supplierShow2'); -- id=3019
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:01:47";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:31:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-05 18:31:47', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/storedetailController.php?do=show'); -- id=3020
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:01:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:31:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-05 18:31:52', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php'); -- id=3021
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:01:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:31:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-05 18:31:55', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=show'); -- id=3022
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:02:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:32:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-05 18:32:01', '1', 'edit', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=edit&userid=2'); -- id=3023
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:02:52";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:32:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-05 18:32:52', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=update'); -- id=3024
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-05 15:02:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:32:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-05 18:32:53', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=sucess'); -- id=3025
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:02:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:32:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-05 18:32:54', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/userController.php?do=show'); -- id=3026
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:03:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:33:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-10-05 18:33:27', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=show'); -- id=3027
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:03:29";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:33:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-10-05 18:33:29', '1', 'edit', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=edit&id=3'); -- id=3028
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:05:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:35:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-10-05 18:35:01', '1', 'update', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=update'); -- id=3029
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:05:02";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:35:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-10-05 18:35:02', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=sucess'); -- id=3030
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:05:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:35:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-10-05 18:35:04', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/usergroupController.php?do=show'); -- id=3031
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:06:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:36:27", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:36:27', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3032

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac3bddfbfc64
-- ----------------------------------------------------------------------------------------------------

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-05 18:36:27', '06ac3bddfbfc64', '1', '0.00', '0', '0', '1', '5040.00', '5040', '5040', '0', '1', '2026-10-05 18:36:27', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '16' ,'0','','','','','-1','0','0','0','0','0','5040','0','','0','0','5040','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=87
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','اضافة فاتورة مبيعات','87', '0', '2026-10-05 18:36:27', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '5040', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 18:36:27','0','0','',''); -- id=168
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+8 where id = 60;
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 ('240','01375', '87', '91', '1375', '8', '300', '2400', '0', '', '0', '2026-10-05 18:36:27', '1375', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','60-8,','1','1','0','0','300','2400','0','','0','0.00','0','0','0','0'); -- id=372
UPDATE sellbilldetail SET  lastbuyprice = 240.00 , meanbuyprice = 240.00, lastbuyprice_withDiscount = 240.00, meanbuyprice_withDiscount = 240.00
        , lastbuyprice_withTax = 240, meanbuyprice_withTax = 240, lastbuyprice_withDiscountAndTax = 240
                where sellbilldetailid = 372;
 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 (1375, '2026-10-05', 2400, 1920, 1920
                    , 1920, 1920, 1920, 1920
                    , 0, 0, 0, 0
                    , 0, 0, 0, 8, 0, 1920, 1920, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2400, 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+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-05', 2400, 1920, 1920
                    , 1920, 1920, 1920, 1920
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1920, 1920, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2400, 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 = '132', userid = '2', storedetaildate = '2026-10-05 18:36:27' WHERE storedetailid = '1375';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1375', '1', '8', '1', '87', 'اضافة فاتورة مبيعات', 'sellbillController.php', '140', '132', '2', '2026-10-05 18:36:27','0','0'); -- id=2187
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+8 where id = 53;
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 ('270','01368', '87', '91', '1368', '8', '330', '2640', '0', '', '0', '2026-10-05 18:36:27', '1368', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','53-8,','1','1','0','0','330','2640','0','','0','0.00','0','0','0','0'); -- id=373
UPDATE sellbilldetail SET  lastbuyprice = 270.00 , meanbuyprice = 382.33, lastbuyprice_withDiscount = 270.00, meanbuyprice_withDiscount = 382.33
        , lastbuyprice_withTax = 382.33, meanbuyprice_withTax = 382.33, lastbuyprice_withDiscountAndTax = 270
                where sellbilldetailid = 373;
 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 (1368, '2026-10-05', 2640, 2160, 2160
                    , 3058.64, 2160, 3058.64, 2160
                    , 0, 0, 0, 0
                    , 0, 0, 0, 8, 0, 3058.64, 3058.64, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2640, sellCostBuyPrice =sellCostBuyPrice+2160
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2160, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3058.64
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2160, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3058.64
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2160
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3058.64
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3058.64
                        , returnSellVal = returnSellVal+0, 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-05', 2640, 2160, 2160
                    , 3058.64, 2160, 3058.64, 2160
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3058.64, 3058.64, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2640, sellCostBuyPrice =sellCostBuyPrice+2160
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2160, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3058.64
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2160, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3058.64
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2160
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3058.64
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3058.64
                        , returnSellVal = returnSellVal+0, 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 = '112', userid = '2', storedetaildate = '2026-10-05 18:36:27' WHERE storedetailid = '1368';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1368', '1', '8', '1', '87', 'اضافة فاتورة مبيعات', 'sellbillController.php', '120', '112', '2', '2026-10-05 18:36:27','0','0'); -- id=2188
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '330945',  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 ('325905','5040', '0', '2', 'اضافة فاتورة مبيعات', '87', '330945', '2026-10-05 18:36:27', '2',  'sellbillController.php','1','','0'); -- id=107
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '5040', '5040', '2026-10-05', '2', '0', '0', '2026-10-05 18:36:27','اضافة فاتورة مبيعات رقم 87','1','0',null,'0','87','sellbillController.php?do=showDetail&sellbillid=87'); -- id=1124
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1124', '419', '5040', '','0'); -- id=1128
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '330945', 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 ('1124', '143', '5040', '','0'); -- id=1124
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '949325', 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 ( '4080', '4080', '2026-10-05', '2', '0', '0', '2026-10-05 18:36:27','اضافة فاتورة مبيعات رقم 87 - صرف البضاعة من المخزن','1','0',null,'0','87','sellbillController.php?do=showDetail&sellbillid=87'); -- id=1125
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1125', '402', '4080', '','0'); -- id=1129
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '923652.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1125', '382', '4080', '','0'); -- id=1125
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14678569.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1124,0,1125' where sellbillid=87;
 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-05', 5040, 4080, 4080
                    , 4978.64, 4080, 4978.64, 4080
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,4978.64, 4978.64, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5040, sellCostBuyPrice =sellCostBuyPrice+4080
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4080, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4978.64
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4080, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4978.64
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4080
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4978.64
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4978.64
                        , returnSellVal = returnSellVal+0, 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-05', 5040, 4080, 4080
                    , 4978.64, 4080, 4978.64, 4080
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,4978.64, 4978.64, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5040, sellCostBuyPrice =sellCostBuyPrice+4080
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4080, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4978.64
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4080, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4978.64
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4080
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4978.64
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+4978.64
                        , returnSellVal = returnSellVal+0, 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, 5040, 4080, 4080
                    , 4978.64, 4080, 4978.64, 4080, 4978.64, 4978.64)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+5040, netSellCostBuyPrice = netSellCostBuyPrice+4080
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+4080
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+4978.64
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+4080
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+4978.64
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+4080
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+4978.64
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+4978.64;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac3bddfbfc64 and sellbillId = 87 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:06:27";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:36:27", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:36:27', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3033
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:10:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:40:33", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:40:33', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3034

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac3c3fba9d29
-- ----------------------------------------------------------------------------------------------------

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-05 18:40:33', '06ac3c3fba9d29', '1', '0.00', '0', '0', '1', '9975.00', '9975', '9975', '0', '1', '2026-10-05 18:40:33', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '25' ,'0','','','','','-1','0','0','0','0','0','9975','0','','0','0','9975','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=88
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','اضافة فاتورة مبيعات','88', '0', '2026-10-05 18:40:33', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '9975', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 18:40:33','0','0','',''); -- id=169
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+5 where id = 39;
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 ('475','01347', '88', '31', '1347', '5', '495', '2475', '0', '', '0', '2026-10-05 18:40:33', '1347', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','39-5,','1','1','0','0','495','2475','0','','0','0.00','0','0','0','0'); -- id=374
UPDATE sellbilldetail SET  lastbuyprice = 475.00 , meanbuyprice = 475.00, lastbuyprice_withDiscount = 475.00, meanbuyprice_withDiscount = 475.00
        , lastbuyprice_withTax = 475, meanbuyprice_withTax = 475, lastbuyprice_withDiscountAndTax = 475
                where sellbilldetailid = 374;
 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 (1347, '2026-10-05', 2475, 2375, 2375
                    , 2375, 2375, 2375, 2375
                    , 0, 0, 0, 0
                    , 0, 0, 0, 5, 0, 2375, 2375, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2475, sellCostBuyPrice =sellCostBuyPrice+2375
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2375, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2375
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2375, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2375
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2375
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2375
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2375
                        , returnSellVal = returnSellVal+0, 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-05', 2475, 2375, 2375
                    , 2375, 2375, 2375, 2375
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2375, 2375, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2475, sellCostBuyPrice =sellCostBuyPrice+2375
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2375, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2375
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2375, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2375
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2375
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2375
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2375
                        , returnSellVal = returnSellVal+0, 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-05 18:40:33' WHERE storedetailid = '1347';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1347', '1', '5', '1', '88', 'اضافة فاتورة مبيعات', 'sellbillController.php', '35', '30', '2', '2026-10-05 18:40:33','0','0'); -- id=2189
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','08408', '88', '32', '1021', '10', '350', '3500', '0', '', '0', '2026-10-05 18:40:33', '1021', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','350','3500','0','','0','0.00','0','0','0','0'); -- id=375
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 = 375;
 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 (1021, '2026-10-05', 3500, 3300, 3300
                    , 3300, 3300, 3300, 3300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 3300, 3300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3300, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3300
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+10
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-05', 3500, 3300, 3300
                    , 3300, 3300, 3300, 3300
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3300, 3300, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3500, sellCostBuyPrice =sellCostBuyPrice+3300
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3300, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3300, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3300
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3300
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3300
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '145', userid = '2', storedetaildate = '2026-10-05 18:40:33' WHERE storedetailid = '1021';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1021', '1', '10', '1', '88', 'اضافة فاتورة مبيعات', 'sellbillController.php', '155', '145', '2', '2026-10-05 18:40:33','0','0'); -- id=2190
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('380','09824', '88', '32', '1036', '10', '400', '4000', '0', '', '0', '2026-10-05 18:40:33', '1036', '0.00', '0', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','400','4000','0','','0','0.00','0','0','0','0'); -- id=376
UPDATE sellbilldetail SET  lastbuyprice = 380.00 , meanbuyprice = 380.00, lastbuyprice_withDiscount = 380.00, meanbuyprice_withDiscount = 380.00
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 380
                where sellbilldetailid = 376;
 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 (1036, '2026-10-05', 4000, 3800, 3800
                    , 3800, 3800, 3800, 3800
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 0, 3800, 3800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4000, sellCostBuyPrice =sellCostBuyPrice+3800
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3800, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3800
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3800, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3800
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3800
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3800
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3800
                        , returnSellVal = returnSellVal+0, 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-05', 4000, 3800, 3800
                    , 3800, 3800, 3800, 3800
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3800, 3800, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+4000, sellCostBuyPrice =sellCostBuyPrice+3800
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3800, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3800
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3800, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3800
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3800
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3800
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3800
                        , returnSellVal = returnSellVal+0, 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-05 18:40:33' WHERE storedetailid = '1036';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1036', '1', '10', '1', '88', 'اضافة فاتورة مبيعات', 'sellbillController.php', '40', '30', '2', '2026-10-05 18:40:33','0','0'); -- id=2191
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '340920',  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 ('330945','9975', '0', '2', 'اضافة فاتورة مبيعات', '88', '340920', '2026-10-05 18:40:33', '2',  'sellbillController.php','1','','0'); -- id=108
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '9975', '9975', '2026-10-05', '2', '0', '0', '2026-10-05 18:40:33','اضافة فاتورة مبيعات رقم 88','1','0',null,'0','88','sellbillController.php?do=showDetail&sellbillid=88'); -- id=1126
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1126', '419', '9975', '','0'); -- id=1130
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '340920', 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 ('1126', '143', '9975', '','0'); -- id=1126
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '959300', 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 ( '9475', '9475', '2026-10-05', '2', '0', '0', '2026-10-05 18:40:33','اضافة فاتورة مبيعات رقم 88 - صرف البضاعة من المخزن','1','0',null,'0','88','sellbillController.php?do=showDetail&sellbillid=88'); -- id=1127
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1127', '402', '9475', '','0'); -- id=1131
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '933127.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1127', '382', '9475', '','0'); -- id=1127
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14669094.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1126,0,1127' where sellbillid=88;
 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-05', 9975, 9475, 9475
                    , 9475, 9475, 9475, 9475
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,9475, 9475, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+9975, sellCostBuyPrice =sellCostBuyPrice+9475
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+9475, sellCostMeanBuyPrice = sellCostMeanBuyPrice+9475
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+9475, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+9475
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+9475
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+9475
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+9475
                        , returnSellVal = returnSellVal+0, 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-05', 9975, 9475, 9475
                    , 9475, 9475, 9475, 9475
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,9475, 9475, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+9975, sellCostBuyPrice =sellCostBuyPrice+9475
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+9475, sellCostMeanBuyPrice = sellCostMeanBuyPrice+9475
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+9475, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+9475
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+9475
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+9475
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+9475
                        , returnSellVal = returnSellVal+0, 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, 9975, 9475, 9475
                    , 9475, 9475, 9475, 9475, 9475, 9475)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+9975, netSellCostBuyPrice = netSellCostBuyPrice+9475
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+9475
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+9475
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+9475
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+9475
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+9475
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+9475
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+9475;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac3c3fba9d29 and sellbillId = 88 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:10:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:40:33", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:40:33', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3035
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:12:40";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:42:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 18:42:40', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3036
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:13:15";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:13:31";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:43:31", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 18:43:31', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3037
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-05 15:13:31";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-05 18:43:31", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 18:43:31', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3038
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:13:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:43:33", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 18:43:33', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3039
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:13:41";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:43:41", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:43:41', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3040
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:13:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:43:43", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 18:43:43', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3041
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:13:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:43:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 18:43:44', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3042
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:13:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:43:46", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:43:46', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3043
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:14:10";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:44:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 18:44:10', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3044
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-05','','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=101
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (101, 1,'2026-10-05 18:44:10',1)
                ON DUPLICATE KEY UPDATE catid = 101, edited = 1, sysdate = '2026-10-05 18:44:10', userid = 1; -- id=102
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '101', '1', '2026-10-05', '1', '0'); -- id=14
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:14:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:44:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 18:44:11', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3045
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:14:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:44:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 18:44:12', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3046
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:14:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:44:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 18:44:20', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3047
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:15:42";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:45:42", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:45:42', '4', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3048

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac3c5b2e80cb
-- ----------------------------------------------------------------------------------------------------

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-05 18:45:42', '06ac3c5b2e80cb', '1', '0.00', '0', '0', '1', '7970.00', '7970', '7970', '0', '2', '2026-10-05 18:45:42', '', '4', '0', 'نقدي', '3', '0', '3', '0', 'نقدي', '19' ,'0','','','','','-1','0','0','0','0','0','7970','0','','0','0','7970','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=89
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','اضافة فاتورة مبيعات','89', '0', '2026-10-05 18:45:42', '4', 'sellbillController.php', 'اضافة فاتورة مبيعات', '7970', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 18:45:42','0','0','',''); -- id=170
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 133;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('350','01325', '89', '87', '1325', '3', '390', '1170', '0', '', '0', '2026-10-05 18:45:42', '1325', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','133-3,','1','1','0','0','390','1170','0','','0','0.00','0','0','0','0'); -- id=377
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 = 377;
 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-05', 1170, 1050, 1050
                    , 1050, 1050, 1050, 1050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1050, 1050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1170, sellCostBuyPrice =sellCostBuyPrice+1050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+3
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-05', 1170, 1050, 1050
                    , 1050, 1050, 1050, 1050
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1050, 1050, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1170, sellCostBuyPrice =sellCostBuyPrice+1050
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1050, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1050
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1050, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1050
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1050
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1050
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1050
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '285', userid = '4', storedetaildate = '2026-10-05 18:45:42' WHERE storedetailid = '1406';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1325', '2', '3', '1', '89', 'اضافة فاتورة مبيعات', 'sellbillController.php', '288', '285', '4', '2026-10-05 18:45:42','0','0'); -- id=2192
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+8 where id = 147;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('400','01356', '89', '88', '1356', '8', '420', '3360', '0', '', '0', '2026-10-05 18:45:42', '1356', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','147-8,','1','1','0','0','420','3360','0','','0','0.00','0','0','0','0'); -- id=378
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 = 378;
 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-05', 3360, 3200, 3200
                    , 3200, 3200, 3200, 3200
                    , 0, 0, 0, 0
                    , 0, 0, 0, 8, 0, 3200, 3200, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3360, sellCostBuyPrice =sellCostBuyPrice+3200
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3200, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3200
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3200, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3200
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3200
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3200
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3200
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+8
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-05', 3360, 3200, 3200
                    , 3200, 3200, 3200, 3200
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3200, 3200, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3360, sellCostBuyPrice =sellCostBuyPrice+3200
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3200, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3200
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3200, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3200
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3200
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3200
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3200
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '96', userid = '4', storedetaildate = '2026-10-05 18:45:42' WHERE storedetailid = '1413';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1356', '2', '8', '1', '89', 'اضافة فاتورة مبيعات', 'sellbillController.php', '104', '96', '4', '2026-10-05 18:45:42','0','0'); -- id=2193
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+8 where id = 149;
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','01357', '89', '88', '1357', '8', '430', '3440', '0', '', '0', '2026-10-05 18:45:42', '1357', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','149-8,','1','1','0','0','430','3440','0','','0','0.00','0','0','0','0'); -- id=379
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 = 379;
 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 (1357, '2026-10-05', 3440, 3280, 3280
                    , 3280, 3280, 3280, 3280
                    , 0, 0, 0, 0
                    , 0, 0, 0, 8, 0, 3280, 3280, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3440, sellCostBuyPrice =sellCostBuyPrice+3280
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3280, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3280
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3280, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3280
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3280
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3280
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3280
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+8
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (2, '2026-10-05', 3440, 3280, 3280
                    , 3280, 3280, 3280, 3280
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3280, 3280, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3440, sellCostBuyPrice =sellCostBuyPrice+3280
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+3280, sellCostMeanBuyPrice = sellCostMeanBuyPrice+3280
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+3280, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+3280
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+3280
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+3280
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3280
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '20', userid = '4', storedetaildate = '2026-10-05 18:45:42' WHERE storedetailid = '1414';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1357', '2', '8', '1', '89', 'اضافة فاتورة مبيعات', 'sellbillController.php', '28', '20', '4', '2026-10-05 18:45:42','0','0'); -- id=2194
CALL saveInUse(3,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '215740',  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 ('207770','7970', '0', '3', 'اضافة فاتورة مبيعات', '89', '215740', '2026-10-05 18:45:42', '4',  'sellbillController.php','1','','0'); -- id=109
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '7970', '7970', '2026-10-05', '4', '0', '0', '2026-10-05 18:45:42','اضافة فاتورة مبيعات رقم 89','1','0',null,'0','89','sellbillController.php?do=showDetail&sellbillid=89'); -- id=1128
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1128', '501', '7970', '','0'); -- id=1132
UPDATE accountstree SET name = 'خزينه المحل الارضي', customName = 'خزينه المحل الارضي', customNameEn = 'خزينه المحل الارضي', nameEn = 'خزينه المحل الارضي', parent = '40', accountNature = '0', theValue = '215740', 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 ('1128', '143', '7970', '','0'); -- id=1128
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '967270', 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 ( '7530', '7530', '2026-10-05', '4', '0', '0', '2026-10-05 18:45:42','اضافة فاتورة مبيعات رقم 89 - صرف البضاعة من المخزن','1','0',null,'0','89','sellbillController.php?do=showDetail&sellbillid=89'); -- id=1129
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1129', '402', '7530', '','0'); -- id=1133
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '940657.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1129', '492', '7530', '','0'); -- id=1129
UPDATE accountstree SET name = 'مخزن المحل', customName = 'مخزن المحل', customNameEn = 'مخزن المحل', nameEn = 'مخزن المحل', parent = '49', accountNature = '0', theValue = '777900', 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='1128,0,1129' where sellbillid=89;
 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-05', 7970, 7530, 7530
                    , 7530, 7530, 7530, 7530
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,7530, 7530, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7970, sellCostBuyPrice =sellCostBuyPrice+7530
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7530, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7530
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7530, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7530
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7530
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7530
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7530
                        , returnSellVal = returnSellVal+0, 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-05', 7970, 7530, 7530
                    , 7530, 7530, 7530, 7530
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,7530, 7530, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+7970, sellCostBuyPrice =sellCostBuyPrice+7530
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+7530, sellCostMeanBuyPrice = sellCostMeanBuyPrice+7530
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+7530, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+7530
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+7530
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+7530
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+7530
                        , returnSellVal = returnSellVal+0, 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, 7970, 7530, 7530
                    , 7530, 7530, 7530, 7530, 7530, 7530)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+7970, netSellCostBuyPrice = netSellCostBuyPrice+7530
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+7530
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+7530
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+7530
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+7530
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+7530
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+7530
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+7530;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac3c5b2e80cb and sellbillId = 89 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:15:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:45:43", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:45:43', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3049
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:15:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:45:57", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 18:45:57', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3050
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:16:53";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:46:53", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:46:53', '4', 'showDetail', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=showDetail&sellbillid=89'); -- id=3051
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:17:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:47:06", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:47:06', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3052
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:17:11";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:47:11", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-05 18:47:11', '4', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/savedailyController.php'); -- id=3053
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:17:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:47:17", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:47:17', '4', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3054
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:21:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:51:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 18:51:12', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3055
BEGIN;
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('901 زورو','','101','160','160','160','160','2026-10-05','0','1','0','','0','0','0','0','0','160','160','160','160','160','0','0','0','0','.','0','0','0','160','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','160','160','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','160','0','0','0','0','0','0','','','0','0','0','0'); -- id=1448
UPDATE product SET productName = '901 زورو', productDescription = '', productCatId = '101', productBuyPrice = '160', productSellAllPrice = '160', productSellUnitPrice = '160', productSellHalfPrice = '160', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01448',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '160',lastbuyprice_withDiscount = '160',meanbuyprice = '160',meanbuyprice_withDiscount = '160' , productbuypricereal = '160' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='160',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='160',meanbuyprice_withTax='160',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='160',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1448';
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', '1448', '1.00', '2026-10-05', '1', '0','0144801','160','160','160','160','','0','0','0','0','0','0','0','0','0','0'); -- id=1448
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1448', '1', '0', '1', '2026-10-05'); -- id=1465
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1448', '1', '0', '0', '1448', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2195
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1448, 1,'2026-10-05 18:51:12',1)
                ON DUPLICATE KEY UPDATE productid = 1448, edited = 1, sysdate = '2026-10-05 18:51:12', userid = 1; -- id=2213
UPDATE product SET productName = '901 زورو', productDescription = '', productCatId = '101', productBuyPrice = '160.00', productSellAllPrice = '160.00', productSellUnitPrice = '160.00', productSellHalfPrice = '160.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01448',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '160',lastbuyprice_withDiscount = '160',meanbuyprice = '160',meanbuyprice_withDiscount = '160' , productbuypricereal = '160' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='160',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='160',meanbuyprice_withTax='160',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='160',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1448';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('904-906-907-909 زورو','','101','185','185','185','185','2026-10-05','0','1','0','','0','0','0','0','0','185','185','185','185','185','0','0','0','0','.','0','0','0','185','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','185','185','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','185','0','0','0','0','0','0','','','0','0','0','0'); -- id=1449
UPDATE product SET productName = '904-906-907-909 زورو', productDescription = '', productCatId = '101', productBuyPrice = '185', productSellAllPrice = '185', productSellUnitPrice = '185', productSellHalfPrice = '185', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01449',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '185',lastbuyprice_withDiscount = '185',meanbuyprice = '185',meanbuyprice_withDiscount = '185' , productbuypricereal = '185' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='185',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='185',meanbuyprice_withTax='185',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='185',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1449';
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', '1449', '1.00', '2026-10-05', '1', '0','0144901','185','185','185','185','','0','0','0','0','0','0','0','0','0','0'); -- id=1449
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1449', '1', '0', '1', '2026-10-05'); -- id=1466
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1449', '1', '0', '0', '1449', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2196
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1449, 1,'2026-10-05 18:51:12',1)
                ON DUPLICATE KEY UPDATE productid = 1449, edited = 1, sysdate = '2026-10-05 18:51:12', userid = 1; -- id=2214
UPDATE product SET productName = '904-906-907-909 زورو', productDescription = '', productCatId = '101', productBuyPrice = '185.00', productSellAllPrice = '185.00', productSellUnitPrice = '185.00', productSellHalfPrice = '185.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01449',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '185',lastbuyprice_withDiscount = '185',meanbuyprice = '185',meanbuyprice_withDiscount = '185' , productbuypricereal = '185' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='185',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='185',meanbuyprice_withTax='185',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='185',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1449';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:21:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:51:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 18:51:14', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3056
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:21:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:51:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 18:51:16', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3057
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:23:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:53:04", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:53:04', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3058

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac3c4f158144
-- ----------------------------------------------------------------------------------------------------

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-05 18:53:04', '06ac3c4f158144', '1', '0.00', '0', '0', '1', '2080.00', '2080', '2080', '0', '1', '2026-10-05 18:53:04', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '8' ,'0','','','','','-1','0','0','0','0','0','2080','0','','0','0','2080','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=90
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','اضافة فاتورة مبيعات','90', '0', '2026-10-05 18:53:04', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '2080', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 18:53:04','0','0','',''); -- id=171
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', '90', '71', '1244', '8', '260', '2080', '0', '', '0', '2026-10-05 18:53:04', '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=380
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 = 380;
 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-05', 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-05', 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 = '8', userid = '2', storedetaildate = '2026-10-05 18:53:04' WHERE storedetailid = '1244';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1244', '1', '8', '1', '90', 'اضافة فاتورة مبيعات', 'sellbillController.php', '16', '8', '2', '2026-10-05 18:53:04','0','0'); -- id=2197
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '343000',  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 ('340920','2080', '0', '2', 'اضافة فاتورة مبيعات', '90', '343000', '2026-10-05 18:53:04', '2',  'sellbillController.php','1','','0'); -- id=110
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2080', '2080', '2026-10-05', '2', '0', '0', '2026-10-05 18:53:04','اضافة فاتورة مبيعات رقم 90','1','0',null,'0','90','sellbillController.php?do=showDetail&sellbillid=90'); -- id=1130
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1130', '419', '2080', '','0'); -- id=1134
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '343000', 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 ('1130', '143', '2080', '','0'); -- id=1130
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '969350', 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 ( '2920', '2920', '2026-10-05', '2', '0', '0', '2026-10-05 18:53:04','اضافة فاتورة مبيعات رقم 90 - صرف البضاعة من المخزن','1','0',null,'0','90','sellbillController.php?do=showDetail&sellbillid=90'); -- id=1131
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1131', '402', '2920', '','0'); -- id=1135
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '943577.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1131', '382', '2920', '','0'); -- id=1131
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14666174.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1130,0,1131' where sellbillid=90;
 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-05', 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;
 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-05', 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;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, 2080, 3000, 2920
                    , 2960, 2920, 2960, 2920, 2960, 2960)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+2080, netSellCostBuyPrice = netSellCostBuyPrice+3000
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+2920
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+2960
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+2920
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+2960
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+2920
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+2960
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+2960;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac3c4f158144 and sellbillId = 90 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:23:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:53:04", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 18:53:04', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3059
UPDATE productunit SET unitid = '1', productid = '1421', productnumber = '1.00', productunitdate = '2026-10-05', userid = '1', conditions = '0',proUnitParcode='0142101',proUnitSellAllPrice='320',proUnitSellHalfPrice='320',proUnitSellUnitPrice ='320',proUnitBuyPrice='300',unitInTax='',proUnitPrice4='0',proUnitPrice5='0',proUnitPrice6='0',proUnitPrice7='0',proUnitPrice8='0',proUnitPrice9='0',proUnitPrice10='0',proUnitPrice11='0',proUnitPrice12='0',proUnitPrice13='0' WHERE productunitid = '1421';
UPDATE product SET productName = 'موديل احمد صلاح 320', productDescription = '', productCatId = '3', productBuyPrice = '300', productSellAllPrice = '320', productSellUnitPrice = '320', productSellHalfPrice = '320', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01421',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '300.00',lastbuyprice_withDiscount = '300',meanbuyprice = '300.00',meanbuyprice_withDiscount = '300' , productbuypricereal = '300' , buypricereal_precentage = '0' , buytotal_precentage = '6.67' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='300',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',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 = '1421';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:24:24";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:54:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 18:54:24', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3060
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 ('924 زورو','','101','200','200','200','200','2026-10-05','0','1','0','','0','0','0','0','0','200','200','200','200','200','0','0','0','0','.','0','0','0','200','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','200','200','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','200','0','0','0','0','0','0','','','0','0','0','0'); -- id=1450
UPDATE product SET productName = '924 زورو', productDescription = '', productCatId = '101', productBuyPrice = '200', productSellAllPrice = '200', productSellUnitPrice = '200', productSellHalfPrice = '200', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01450',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '200',lastbuyprice_withDiscount = '200',meanbuyprice = '200',meanbuyprice_withDiscount = '200' , productbuypricereal = '200' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='200',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='200',meanbuyprice_withTax='200',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='200',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1450';
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', '1450', '1.00', '2026-10-05', '1', '0','0145001','200','200','200','200','','0','0','0','0','0','0','0','0','0','0'); -- id=1450
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1450', '1', '0', '1', '2026-10-05'); -- id=1467
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1450', '1', '0', '0', '1450', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2198
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1450, 1,'2026-10-05 18:54:24',1)
                ON DUPLICATE KEY UPDATE productid = 1450, edited = 1, sysdate = '2026-10-05 18:54:24', userid = 1; -- id=2215
UPDATE product SET productName = '924 زورو', productDescription = '', productCatId = '101', productBuyPrice = '200.00', productSellAllPrice = '200.00', productSellUnitPrice = '200.00', productSellHalfPrice = '200.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01450',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '200',lastbuyprice_withDiscount = '200',meanbuyprice = '200',meanbuyprice_withDiscount = '200' , productbuypricereal = '200' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='200',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='200',meanbuyprice_withTax='200',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='200',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1450';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('911-919 زورو','','101','230','230','230','230','2026-10-05','0','1','0','','0','0','0','0','0','230','230','230','230','230','0','0','0','0','.','0','0','0','230','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','230','230','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','230','0','0','0','0','0','0','','','0','0','0','0'); -- id=1451
UPDATE product SET productName = '911-919 زورو', productDescription = '', productCatId = '101', productBuyPrice = '230', productSellAllPrice = '230', productSellUnitPrice = '230', productSellHalfPrice = '230', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01451',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '230',lastbuyprice_withDiscount = '230',meanbuyprice = '230',meanbuyprice_withDiscount = '230' , productbuypricereal = '230' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='230',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='230',meanbuyprice_withTax='230',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='230',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1451';
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', '1451', '1.00', '2026-10-05', '1', '0','0145101','230','230','230','230','','0','0','0','0','0','0','0','0','0','0'); -- id=1451
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1451', '1', '0', '1', '2026-10-05'); -- id=1468
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1451', '1', '0', '0', '1451', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2199
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1451, 1,'2026-10-05 18:54:24',1)
                ON DUPLICATE KEY UPDATE productid = 1451, edited = 1, sysdate = '2026-10-05 18:54:24', userid = 1; -- id=2216
UPDATE product SET productName = '911-919 زورو', productDescription = '', productCatId = '101', productBuyPrice = '230.00', productSellAllPrice = '230.00', productSellUnitPrice = '230.00', productSellHalfPrice = '230.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01451',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '230',lastbuyprice_withDiscount = '230',meanbuyprice = '230',meanbuyprice_withDiscount = '230' , productbuypricereal = '230' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='230',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='230',meanbuyprice_withTax='230',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='230',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1451';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('915-930 زورو','','101','240','240','240','240','2026-10-05','0','1','0','','0','0','0','0','0','240','240','240','240','240','0','0','0','0','.','0','0','0','240','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','240','240','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','240','0','0','0','0','0','0','','','0','0','0','0'); -- id=1452
UPDATE product SET productName = '915-930 زورو', productDescription = '', productCatId = '101', productBuyPrice = '240', productSellAllPrice = '240', productSellUnitPrice = '240', productSellHalfPrice = '240', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01452',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '240',lastbuyprice_withDiscount = '240',meanbuyprice = '240',meanbuyprice_withDiscount = '240' , productbuypricereal = '240' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='240',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='240',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='240',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1452';
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', '1452', '1.00', '2026-10-05', '1', '0','0145201','240','240','240','240','','0','0','0','0','0','0','0','0','0','0'); -- id=1452
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1452', '1', '0', '1', '2026-10-05'); -- id=1469
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1452', '1', '0', '0', '1452', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2200
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1452, 1,'2026-10-05 18:54:24',1)
                ON DUPLICATE KEY UPDATE productid = 1452, edited = 1, sysdate = '2026-10-05 18:54:24', userid = 1; -- id=2217
UPDATE product SET productName = '915-930 زورو', productDescription = '', productCatId = '101', productBuyPrice = '240.00', productSellAllPrice = '240.00', productSellUnitPrice = '240.00', productSellHalfPrice = '240.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01452',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '240',lastbuyprice_withDiscount = '240',meanbuyprice = '240',meanbuyprice_withDiscount = '240' , productbuypricereal = '240' , buypricereal_precentage = '0' , buytotal_precentage = '0' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='240',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='240',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='240',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1452';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:24:26";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:54:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 18:54:26', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3061
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:24:28";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:54:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 18:54:28', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3062
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-05 18:54:50', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=85
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 ('85', '0', '', '0', 'إضافة مورد جديد', '85', '', '2026-10-05 18:54:50', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=144
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-05 18:54:50'); -- id=565
UPDATE supplier SET suppliername = 'زورو', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-05', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='565',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '85';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:27:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:57:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 18:57:46', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3063
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 ('06ac3c8343fd6c', '2026-10-05 18:54:28', '85', '0.00', '70389', '10', '1', '78210.00',  '70389.00', '0', '70389', '1', '2026-10-05 18:57:46', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=29
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 ('01448', '29', '101', '1448', '45', '160', '7200.00', '0', '', '2026-10-05 18:57:46', '1448','','','0','0','0','0','0',null,'160','7200','0','0','0','0','0','0','0','0','1'); -- id=131
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 18:54:28', 1, 1448, 0, 0
                    , 144, 45, 0, 0, 1, '2026-10-05 18:57:46')
                ON DUPLICATE KEY UPDATE buyprice = 144,
                        buyQuantity =buyQuantity+45, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 18:57:46' ; -- id=197
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1448', '160', '45', '0', 'buyBillController.php', '131', '', '0', '0'); -- id=99
UPDATE product SET  productBuyPrice = "160" WHERE productId = 1448 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 131 ;
UPDATE product SET productName = '901 زورو', productDescription = '', productCatId = '101', productBuyPrice = '160.00', productSellAllPrice = '160.00', productSellUnitPrice = '160.00', productSellHalfPrice = '160.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01448',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '160',lastbuyprice_withDiscount = '144',meanbuyprice = '160',meanbuyprice_withDiscount = '144' , productbuypricereal = '160.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='160',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='160',meanbuyprice_withTax='160',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='144',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1448';
UPDATE buybilldetail SET  lastbuyprice = 160 , meanbuyprice = 160, lastbuyprice_withDiscount = 144, meanbuyprice_withDiscount = 144
        , lastbuyprice_withTax = 160, meanbuyprice_withTax = 160, lastbuyprice_withDiscountAndTax = 144
                where buybilldetailid = 131;
UPDATE productunit SET proUnitBuyPrice  = 160 * productnumber WHERE productid = 1448;
UPDATE storedetail SET  productquantity = '45', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1465';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1448', '1', '45', '0', '29', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '45', '1', '2026-10-05 18:54:28','0','0'); -- id=2201
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 ('01449', '29', '101', '1449', '162', '185', '29970.00', '0', '', '2026-10-05 18:57:46', '1449','','','0','0','0','0','0',null,'185','29970','0','0','0','0','0','0','0','0','1'); -- id=132
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 18:54:28', 1, 1449, 0, 0
                    , 166.5, 162, 0, 0, 1, '2026-10-05 18:57:46')
                ON DUPLICATE KEY UPDATE buyprice = 166.5,
                        buyQuantity =buyQuantity+162, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 18:57:46' ; -- id=198
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1449', '185', '162', '0', 'buyBillController.php', '132', '', '0', '0'); -- id=100
UPDATE product SET  productBuyPrice = "185" WHERE productId = 1449 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 132 ;
UPDATE product SET productName = '904-906-907-909 زورو', productDescription = '', productCatId = '101', productBuyPrice = '185.00', productSellAllPrice = '185.00', productSellUnitPrice = '185.00', productSellHalfPrice = '185.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01449',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '185',lastbuyprice_withDiscount = '166.5',meanbuyprice = '185',meanbuyprice_withDiscount = '166.5' , productbuypricereal = '185.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='185',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='185',meanbuyprice_withTax='185',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='166.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 = '1449';
UPDATE buybilldetail SET  lastbuyprice = 185 , meanbuyprice = 185, lastbuyprice_withDiscount = 166.5, meanbuyprice_withDiscount = 166.5
        , lastbuyprice_withTax = 185, meanbuyprice_withTax = 185, lastbuyprice_withDiscountAndTax = 166.5
                where buybilldetailid = 132;
UPDATE productunit SET proUnitBuyPrice  = 185 * productnumber WHERE productid = 1449;
UPDATE storedetail SET  productquantity = '162', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1466';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1449', '1', '162', '0', '29', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '162', '1', '2026-10-05 18:54:28','0','0'); -- id=2202
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 ('01450', '29', '101', '1450', '36', '200', '7200.00', '0', '', '2026-10-05 18:57:46', '1450','','','0','0','0','0','0',null,'200','7200','0','0','0','0','0','0','0','0','1'); -- id=133
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 18:54:28', 1, 1450, 0, 0
                    , 180, 36, 0, 0, 1, '2026-10-05 18:57:46')
                ON DUPLICATE KEY UPDATE buyprice = 180,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 18:57:46' ; -- id=199
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1450', '200', '36', '0', 'buyBillController.php', '133', '', '0', '0'); -- id=101
UPDATE product SET  productBuyPrice = "200" WHERE productId = 1450 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 133 ;
UPDATE product SET productName = '924 زورو', productDescription = '', productCatId = '101', productBuyPrice = '200.00', productSellAllPrice = '200.00', productSellUnitPrice = '200.00', productSellHalfPrice = '200.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01450',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '200',lastbuyprice_withDiscount = '180',meanbuyprice = '200',meanbuyprice_withDiscount = '180' , productbuypricereal = '200.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='200',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='200',meanbuyprice_withTax='200',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='180',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1450';
UPDATE buybilldetail SET  lastbuyprice = 200 , meanbuyprice = 200, lastbuyprice_withDiscount = 180, meanbuyprice_withDiscount = 180
        , lastbuyprice_withTax = 200, meanbuyprice_withTax = 200, lastbuyprice_withDiscountAndTax = 180
                where buybilldetailid = 133;
UPDATE productunit SET proUnitBuyPrice  = 200 * productnumber WHERE productid = 1450;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1467';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1450', '1', '36', '0', '29', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-05 18:54:28','0','0'); -- id=2203
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 ('01451', '29', '101', '1451', '72', '230', '16560.00', '0', '', '2026-10-05 18:57:46', '1451','','','0','0','0','0','0',null,'230','16560','0','0','0','0','0','0','0','0','1'); -- id=134
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 18:54:28', 1, 1451, 0, 0
                    , 207, 72, 0, 0, 1, '2026-10-05 18:57:46')
                ON DUPLICATE KEY UPDATE buyprice = 207,
                        buyQuantity =buyQuantity+72, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 18:57:46' ; -- id=200
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1451', '230', '72', '0', 'buyBillController.php', '134', '', '0', '0'); -- id=102
UPDATE product SET  productBuyPrice = "230" WHERE productId = 1451 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 134 ;
UPDATE product SET productName = '911-919 زورو', productDescription = '', productCatId = '101', productBuyPrice = '230.00', productSellAllPrice = '230.00', productSellUnitPrice = '230.00', productSellHalfPrice = '230.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01451',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '230',lastbuyprice_withDiscount = '207',meanbuyprice = '230',meanbuyprice_withDiscount = '207' , productbuypricereal = '230.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='230',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='230',meanbuyprice_withTax='230',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='207',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1451';
UPDATE buybilldetail SET  lastbuyprice = 230 , meanbuyprice = 230, lastbuyprice_withDiscount = 207, meanbuyprice_withDiscount = 207
        , lastbuyprice_withTax = 230, meanbuyprice_withTax = 230, lastbuyprice_withDiscountAndTax = 207
                where buybilldetailid = 134;
UPDATE productunit SET proUnitBuyPrice  = 230 * productnumber WHERE productid = 1451;
UPDATE storedetail SET  productquantity = '72', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1468';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1451', '1', '72', '0', '29', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '72', '1', '2026-10-05 18:54:28','0','0'); -- id=2204
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 ('01452', '29', '101', '1452', '72', '240', '17280.00', '0', '', '2026-10-05 18:57:46', '1452','','','0','0','0','0','0',null,'240','17280','0','0','0','0','0','0','0','0','1'); -- id=135
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 18:54:28', 1, 1452, 0, 0
                    , 216, 72, 0, 0, 1, '2026-10-05 18:57:46')
                ON DUPLICATE KEY UPDATE buyprice = 216,
                        buyQuantity =buyQuantity+72, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 18:57:46' ; -- id=201
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1452', '240', '72', '0', 'buyBillController.php', '135', '', '0', '0'); -- id=103
UPDATE product SET  productBuyPrice = "240" WHERE productId = 1452 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 135 ;
UPDATE product SET productName = '915-930 زورو', productDescription = '', productCatId = '101', productBuyPrice = '240.00', productSellAllPrice = '240.00', productSellUnitPrice = '240.00', productSellHalfPrice = '240.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01452',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '240',lastbuyprice_withDiscount = '216',meanbuyprice = '240',meanbuyprice_withDiscount = '216' , productbuypricereal = '240.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='240',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='240',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='216',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1452';
UPDATE buybilldetail SET  lastbuyprice = 240 , meanbuyprice = 240, lastbuyprice_withDiscount = 216, meanbuyprice_withDiscount = 216
        , lastbuyprice_withTax = 240, meanbuyprice_withTax = 240, lastbuyprice_withDiscountAndTax = 216
                where buybilldetailid = 135;
UPDATE productunit SET proUnitBuyPrice  = 240 * productnumber WHERE productid = 1452;
UPDATE storedetail SET  productquantity = '72', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1469';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1452', '1', '72', '0', '29', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '72', '1', '2026-10-05 18:54:28','0','0'); -- id=2205
UPDATE supplier SET  suppliercurrentDebt = '70389',suppliercurrentDebtInCurrency= '70389' , userid = '1', supplierdate = '2026-10-05 18:57:46'   WHERE supplierid = '85';
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 ('85', '0.00', '70389', '0', 'اضافة فاتورة مشتريات', '29', '70389', '2026-10-05 18:54:28', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','70389','1','0','70389','70389','0',''); -- id=145
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '70389', '70389', '2026-10-05', '1', '0', '0', '2026-10-05 18:57:46','اضافة فاتورة مشتريات رقم 29','1','0',null,'0','29','buyBillController.php?do=details&id=29'); -- id=1132
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1132', '382', '70389', '','0'); -- id=1136
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14736563.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1132', '565', '70389', '','0'); -- id=1132
UPDATE accountstree SET name = 'زورو', customName = 'زورو', customNameEn = 'زورو', nameEn = 'زورو', parent = '81', accountNature = '1', theValue = '70389', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-05 18:54:50' WHERE id = '565';
update buybill set dailyentryid='1132,0' where buybillid=29;
COMMIT;
UPDATE product SET overAllAveragePrice = 144 WHERE productId = 1448;UPDATE product SET overAllAveragePrice = 166.5 WHERE productId = 1449;UPDATE product SET overAllAveragePrice = 180 WHERE productId = 1450;UPDATE product SET overAllAveragePrice = 207 WHERE productId = 1451;UPDATE product SET overAllAveragePrice = 216 WHERE productId = 1452;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:27:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:57:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 18:57:46', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=29'); -- id=3064
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:27:50";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 18:57:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 18:57:50', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=29&type=2'); -- id=3065
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:30:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:00:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 19:00:04', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3066
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 ('06ac3c774bde8f', '2026-10-05 18:51:16', '16', '546030.00', '596030', '0', '0', '50000.00',  '50000.00', '0', '50000', '1', '2026-10-05 19:00:04', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=30
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 ('01421', '30', '3', '1421', '80', '300', '24000.00', '0', '', '2026-10-05 19:00:04', '1421','','','0','0','0','0','0',null,'300','24000','0','0','0','0','0','0','0','0','1'); -- id=136
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 18:51:16', 1, 1421, 0, 0
                    , 300, 80, 0, 0, 1, '2026-10-05 19:00:04')
                ON DUPLICATE KEY UPDATE buyprice = 300,
                        buyQuantity =buyQuantity+80, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:00:04' ; -- id=202
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1421', '300', '80', '0', 'buyBillController.php', '136', '', '0', '0'); -- id=104
UPDATE product SET  productBuyPrice = "300" WHERE productId = 1421 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 136 ;
UPDATE product SET productName = 'موديل احمد صلاح 320', productDescription = '', productCatId = '3', productBuyPrice = '300.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01421',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='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 = '1421';
UPDATE buybilldetail SET  lastbuyprice = 300 , meanbuyprice = 300, lastbuyprice_withDiscount = 300, meanbuyprice_withDiscount = 300
        , lastbuyprice_withTax = 300, meanbuyprice_withTax = 300, lastbuyprice_withDiscountAndTax = 300
                where buybilldetailid = 136;
UPDATE productunit SET proUnitBuyPrice  = 300 * productnumber WHERE productid = 1421;
UPDATE storedetail SET  productquantity = '80', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1434';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1421', '1', '80', '0', '30', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '80', '1', '2026-10-05 18:51:16','0','0'); -- id=2206
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 ('01422', '30', '3', '1422', '100', '260', '26000.00', '0', '', '2026-10-05 19:00:04', '1422','','','0','0','0','0','0',null,'260','26000','0','0','0','0','0','0','0','0','1'); -- id=137
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 18:51:16', 1, 1422, 0, 0
                    , 260, 100, 0, 0, 1, '2026-10-05 19:00:04')
                ON DUPLICATE KEY UPDATE buyprice = 260,
                        buyQuantity =buyQuantity+100, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:00:04' ; -- id=203
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1422', '260', '100', '0', 'buyBillController.php', '137', '', '0', '0'); -- id=105
UPDATE product SET  productBuyPrice = "260" WHERE productId = 1422 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 137 ;
UPDATE product SET productName = 'موديل احمد صلاح 270', productDescription = '', productCatId = '3', productBuyPrice = '260.00', productSellAllPrice = '270.00', productSellUnitPrice = '270.00', productSellHalfPrice = '270.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01422',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '260',lastbuyprice_withDiscount = '260',meanbuyprice = '260',meanbuyprice_withDiscount = '260' , productbuypricereal = '260.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='260',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='260',meanbuyprice_withTax='260',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='260',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1422';
UPDATE buybilldetail SET  lastbuyprice = 260 , meanbuyprice = 260, lastbuyprice_withDiscount = 260, meanbuyprice_withDiscount = 260
        , lastbuyprice_withTax = 260, meanbuyprice_withTax = 260, lastbuyprice_withDiscountAndTax = 260
                where buybilldetailid = 137;
UPDATE productunit SET proUnitBuyPrice  = 260 * productnumber WHERE productid = 1422;
UPDATE storedetail SET  productquantity = '100', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1435';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1422', '1', '100', '0', '30', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '100', '1', '2026-10-05 18:51:16','0','0'); -- id=2207
UPDATE supplier SET  suppliercurrentDebt = '62100',suppliercurrentDebtInCurrency= '596030' , userid = '1', supplierdate = '2026-10-05 19:00:04'   WHERE supplierid = '16';
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 ('16', '12100.00', '50000', '0', 'اضافة فاتورة مشتريات', '30', '62100', '2026-10-05 18:51:16', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','50000','1','546030','50000','596030','0',''); -- id=146
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '50000', '50000', '2026-10-05', '1', '0', '0', '2026-10-05 19:00:04','اضافة فاتورة مشتريات رقم 30','1','0',null,'0','30','buyBillController.php?do=details&id=30'); -- id=1133
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1133', '382', '50000', '','0'); -- id=1137
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14786563.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1133', '435', '50000', '','0'); -- id=1133
UPDATE accountstree SET name = 'احمد صلاح جينز - مورد', customName = 'احمد صلاح جينز - مورد', customNameEn = 'احمد صلاح جينز - مورد', nameEn = 'احمد صلاح جينز - مورد', parent = '81', accountNature = '1', theValue = '50000', 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 = '435';
update buybill set dailyentryid='1133,0' where buybillid=30;
COMMIT;
UPDATE product SET overAllAveragePrice = 300 WHERE productId = 1421;UPDATE product SET overAllAveragePrice = 260 WHERE productId = 1422;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:30:05";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:00:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 19:00:05', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=30'); -- id=3067
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:30:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:00:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 19:00:06', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3068
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:30:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:00:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-05 19:00:09', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3069
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:30:16";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:00:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-05 19:00:16', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3070
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:30:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:00:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 19:00:39', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3071
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-05 19:01:56', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=86
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 ('86', '0', '', '0', 'إضافة مورد جديد', '86', '', '2026-10-05 19:01:56', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=147
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-05 19:01:56'); -- id=566
UPDATE supplier SET suppliername = 'ايطاليانو', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-05', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='566',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '86';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:36:43";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:06:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 19:06:43', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3072
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 ('06ac3c9a73453a', '2026-10-05 19:00:39', '86', '0.00', '140535', '0', '0', '140535.00',  '140535.00', '0', '140535', '1', '2026-10-05 19:06:43', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=31
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 ('01423', '31', '100', '1423', '15', '370', '5550.00', '0', '', '2026-10-05 19:06:43', '1423','','','0','0','0','0','0',null,'370','5550','0','0','0','0','0','0','0','0','1'); -- id=138
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1423, 0, 0
                    , 370, 15, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 370,
                        buyQuantity =buyQuantity+15, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=204
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1423', '370', '15', '0', 'buyBillController.php', '138', '', '0', '0'); -- id=106
UPDATE product SET  productBuyPrice = "370" WHERE productId = 1423 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 138 ;
UPDATE product SET productName = 'ايطاليانو موديل 41', productDescription = '', productCatId = '100', productBuyPrice = '370.00', productSellAllPrice = '400.00', productSellUnitPrice = '400.00', productSellHalfPrice = '400.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01423',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 = '8.11' , 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 = '1423';
UPDATE buybilldetail SET  lastbuyprice = 370 , meanbuyprice = 370, lastbuyprice_withDiscount = 370, meanbuyprice_withDiscount = 370
        , lastbuyprice_withTax = 370, meanbuyprice_withTax = 370, lastbuyprice_withDiscountAndTax = 370
                where buybilldetailid = 138;
UPDATE productunit SET proUnitBuyPrice  = 370 * productnumber WHERE productid = 1423;
UPDATE storedetail SET  productquantity = '15', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1436';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1423', '1', '15', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '15', '1', '2026-10-05 19:00:39','0','0'); -- id=2208
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 ('01424', '31', '100', '1424', '21', '460', '9660.00', '0', '', '2026-10-05 19:06:43', '1424','','','0','0','0','0','0',null,'460','9660','0','0','0','0','0','0','0','0','1'); -- id=139
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1424, 0, 0
                    , 460, 21, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 460,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=205
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1424', '460', '21', '0', 'buyBillController.php', '139', '', '0', '0'); -- id=107
UPDATE product SET  productBuyPrice = "460" WHERE productId = 1424 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 139 ;
UPDATE product SET productName = 'ايطاليانو موديل 36', productDescription = '', productCatId = '100', productBuyPrice = '460.00', productSellAllPrice = '490.00', productSellUnitPrice = '490.00', productSellHalfPrice = '490.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01424',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '460',lastbuyprice_withDiscount = '460',meanbuyprice = '460',meanbuyprice_withDiscount = '460' , productbuypricereal = '460.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.52' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='460',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='460',meanbuyprice_withTax='460',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='460',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1424';
UPDATE buybilldetail SET  lastbuyprice = 460 , meanbuyprice = 460, lastbuyprice_withDiscount = 460, meanbuyprice_withDiscount = 460
        , lastbuyprice_withTax = 460, meanbuyprice_withTax = 460, lastbuyprice_withDiscountAndTax = 460
                where buybilldetailid = 139;
UPDATE productunit SET proUnitBuyPrice  = 460 * productnumber WHERE productid = 1424;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1437';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1424', '1', '21', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-05 19:00:39','0','0'); -- id=2209
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 ('01425', '31', '100', '1425', '21', '265', '5565.00', '0', '', '2026-10-05 19:06:43', '1425','','','0','0','0','0','0',null,'265','5565','0','0','0','0','0','0','0','0','1'); -- id=140
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1425, 0, 0
                    , 265, 21, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 265,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=206
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1425', '265', '21', '0', 'buyBillController.php', '140', '', '0', '0'); -- id=108
UPDATE product SET  productBuyPrice = "265" WHERE productId = 1425 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 140 ;
UPDATE product SET productName = 'ايطاليانو موديل 37', productDescription = '', productCatId = '100', productBuyPrice = '265.00', productSellAllPrice = '295.00', productSellUnitPrice = '295.00', productSellHalfPrice = '295.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01425',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '265',lastbuyprice_withDiscount = '265',meanbuyprice = '265',meanbuyprice_withDiscount = '265' , productbuypricereal = '265.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '11.32' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='265',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='265',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='265',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1425';
UPDATE buybilldetail SET  lastbuyprice = 265 , meanbuyprice = 265, lastbuyprice_withDiscount = 265, meanbuyprice_withDiscount = 265
        , lastbuyprice_withTax = 265, meanbuyprice_withTax = 265, lastbuyprice_withDiscountAndTax = 265
                where buybilldetailid = 140;
UPDATE productunit SET proUnitBuyPrice  = 265 * productnumber WHERE productid = 1425;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1438';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1425', '1', '21', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-05 19:00:39','0','0'); -- id=2210
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 ('01426', '31', '100', '1426', '24', '560', '13440.00', '0', '', '2026-10-05 19:06:43', '1426','','','0','0','0','0','0',null,'560','13440','0','0','0','0','0','0','0','0','1'); -- id=141
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1426, 0, 0
                    , 560, 24, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 560,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=207
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1426', '560', '24', '0', 'buyBillController.php', '141', '', '0', '0'); -- id=109
UPDATE product SET  productBuyPrice = "560" WHERE productId = 1426 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 141 ;
UPDATE product SET productName = 'ايطاليانو موديل 28', productDescription = '', productCatId = '100', productBuyPrice = '560.00', productSellAllPrice = '590.00', productSellUnitPrice = '590.00', productSellHalfPrice = '590.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01426',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '560',lastbuyprice_withDiscount = '560',meanbuyprice = '560',meanbuyprice_withDiscount = '560' , productbuypricereal = '560.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '5.36' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='560',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='560',meanbuyprice_withTax='560',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='560',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1426';
UPDATE buybilldetail SET  lastbuyprice = 560 , meanbuyprice = 560, lastbuyprice_withDiscount = 560, meanbuyprice_withDiscount = 560
        , lastbuyprice_withTax = 560, meanbuyprice_withTax = 560, lastbuyprice_withDiscountAndTax = 560
                where buybilldetailid = 141;
UPDATE productunit SET proUnitBuyPrice  = 560 * productnumber WHERE productid = 1426;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1439';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1426', '1', '24', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-05 19:00:39','0','0'); -- id=2211
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 ('01427', '31', '100', '1427', '21', '330', '6930.00', '0', '', '2026-10-05 19:06:43', '1427','','','0','0','0','0','0',null,'330','6930','0','0','0','0','0','0','0','0','1'); -- id=142
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1427, 0, 0
                    , 330, 21, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 330,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=208
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1427', '330', '21', '0', 'buyBillController.php', '142', '', '0', '0'); -- id=110
UPDATE product SET  productBuyPrice = "330" WHERE productId = 1427 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 142 ;
UPDATE product SET productName = 'ايطاليانو موديل 38', productDescription = '', productCatId = '100', productBuyPrice = '330.00', productSellAllPrice = '360.00', productSellUnitPrice = '360.00', productSellHalfPrice = '360.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01427',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 = '9.09' , 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 = '1427';
UPDATE buybilldetail SET  lastbuyprice = 330 , meanbuyprice = 330, lastbuyprice_withDiscount = 330, meanbuyprice_withDiscount = 330
        , lastbuyprice_withTax = 330, meanbuyprice_withTax = 330, lastbuyprice_withDiscountAndTax = 330
                where buybilldetailid = 142;
UPDATE productunit SET proUnitBuyPrice  = 330 * productnumber WHERE productid = 1427;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1440';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1427', '1', '21', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-05 19:00:39','0','0'); -- id=2212
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 ('01428', '31', '100', '1428', '15', '400', '6000.00', '0', '', '2026-10-05 19:06:43', '1428','','','0','0','0','0','0',null,'400','6000','0','0','0','0','0','0','0','0','1'); -- id=143
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1428, 0, 0
                    , 400, 15, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 400,
                        buyQuantity =buyQuantity+15, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=209
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1428', '400', '15', '0', 'buyBillController.php', '143', '', '0', '0'); -- id=111
UPDATE product SET  productBuyPrice = "400" WHERE productId = 1428 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 143 ;
UPDATE product SET productName = 'ايطاليانو موديل 22', productDescription = '', productCatId = '100', productBuyPrice = '400.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01428',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 = '7.50' , buyhalf_precentage = '7.50' , 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 = '1428';
UPDATE buybilldetail SET  lastbuyprice = 400 , meanbuyprice = 400, lastbuyprice_withDiscount = 400, meanbuyprice_withDiscount = 400
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where buybilldetailid = 143;
UPDATE productunit SET proUnitBuyPrice  = 400 * productnumber WHERE productid = 1428;
UPDATE storedetail SET  productquantity = '15', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1441';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1428', '1', '15', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '15', '1', '2026-10-05 19:00:39','0','0'); -- id=2213
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 ('01429', '31', '100', '1429', '21', '345', '7245.00', '0', '', '2026-10-05 19:06:43', '1429','','','0','0','0','0','0',null,'345','7245','0','0','0','0','0','0','0','0','1'); -- id=144
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1429, 0, 0
                    , 345, 21, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 345,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=210
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1429', '345', '21', '0', 'buyBillController.php', '144', '', '0', '0'); -- id=112
UPDATE product SET  productBuyPrice = "345" WHERE productId = 1429 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 144 ;
UPDATE product SET productName = 'ايطاليانو موديل 12', productDescription = '', productCatId = '100', productBuyPrice = '345.00', productSellAllPrice = '375.00', productSellUnitPrice = '375.00', productSellHalfPrice = '375.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01429',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '345',lastbuyprice_withDiscount = '345',meanbuyprice = '345',meanbuyprice_withDiscount = '345' , productbuypricereal = '345.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.70' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='345',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='345',meanbuyprice_withTax='345',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='345',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1429';
UPDATE buybilldetail SET  lastbuyprice = 345 , meanbuyprice = 345, lastbuyprice_withDiscount = 345, meanbuyprice_withDiscount = 345
        , lastbuyprice_withTax = 345, meanbuyprice_withTax = 345, lastbuyprice_withDiscountAndTax = 345
                where buybilldetailid = 144;
UPDATE productunit SET proUnitBuyPrice  = 345 * productnumber WHERE productid = 1429;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1442';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1429', '1', '21', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-05 19:00:39','0','0'); -- id=2214
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 ('01430', '31', '100', '1430', '42', '420', '17640.00', '0', '', '2026-10-05 19:06:43', '1430','','','0','0','0','0','0',null,'420','17640','0','0','0','0','0','0','0','0','1'); -- id=145
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1430, 0, 0
                    , 420, 42, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 420,
                        buyQuantity =buyQuantity+42, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=211
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1430', '420', '42', '0', 'buyBillController.php', '145', '', '0', '0'); -- id=113
UPDATE product SET  productBuyPrice = "420" WHERE productId = 1430 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 145 ;
UPDATE product SET productName = 'ايطاليانو موديل 1 - 26', productDescription = '', productCatId = '100', productBuyPrice = '420.00', productSellAllPrice = '450.00', productSellUnitPrice = '450.00', productSellHalfPrice = '450.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01430',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 = '7.14' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='420',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='420',meanbuyprice_withTax='420',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='420',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1430';
UPDATE buybilldetail SET  lastbuyprice = 420 , meanbuyprice = 420, lastbuyprice_withDiscount = 420, meanbuyprice_withDiscount = 420
        , lastbuyprice_withTax = 420, meanbuyprice_withTax = 420, lastbuyprice_withDiscountAndTax = 420
                where buybilldetailid = 145;
UPDATE productunit SET proUnitBuyPrice  = 420 * productnumber WHERE productid = 1430;
UPDATE storedetail SET  productquantity = '42', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1443';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1430', '1', '42', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '42', '1', '2026-10-05 19:00:39','0','0'); -- id=2215
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 ('01431', '31', '100', '1431', '21', '510', '10710.00', '0', '', '2026-10-05 19:06:43', '1431','','','0','0','0','0','0',null,'510','10710','0','0','0','0','0','0','0','0','1'); -- id=146
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1431, 0, 0
                    , 510, 21, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 510,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=212
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1431', '510', '21', '0', 'buyBillController.php', '146', '', '0', '0'); -- id=114
UPDATE product SET  productBuyPrice = "510" WHERE productId = 1431 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 146 ;
UPDATE product SET productName = 'ايطاليانو موديل 16', productDescription = '', productCatId = '100', productBuyPrice = '510.00', productSellAllPrice = '540.00', productSellUnitPrice = '540.00', productSellHalfPrice = '540.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01431',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '510',lastbuyprice_withDiscount = '510',meanbuyprice = '510',meanbuyprice_withDiscount = '510' , productbuypricereal = '510.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '5.88' , buyhalf_precentage = '5.88' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='510',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='510',meanbuyprice_withTax='510',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='510',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1431';
UPDATE buybilldetail SET  lastbuyprice = 510 , meanbuyprice = 510, lastbuyprice_withDiscount = 510, meanbuyprice_withDiscount = 510
        , lastbuyprice_withTax = 510, meanbuyprice_withTax = 510, lastbuyprice_withDiscountAndTax = 510
                where buybilldetailid = 146;
UPDATE productunit SET proUnitBuyPrice  = 510 * productnumber WHERE productid = 1431;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1444';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1431', '1', '21', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-05 19:00:39','0','0'); -- id=2216
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 ('01432', '31', '100', '1432', '18', '485', '8730.00', '0', '', '2026-10-05 19:06:43', '1432','','','0','0','0','0','0',null,'485','8730','0','0','0','0','0','0','0','0','1'); -- id=147
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1432, 0, 0
                    , 485, 18, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 485,
                        buyQuantity =buyQuantity+18, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=213
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1432', '485', '18', '0', 'buyBillController.php', '147', '', '0', '0'); -- id=115
UPDATE product SET  productBuyPrice = "485" WHERE productId = 1432 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 147 ;
UPDATE product SET productName = 'ايطاليانو موديل 10', productDescription = '', productCatId = '100', productBuyPrice = '485.00', productSellAllPrice = '515.00', productSellUnitPrice = '515.00', productSellHalfPrice = '515.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01432',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 = '6.19' , 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='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',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 = '1432';
UPDATE buybilldetail SET  lastbuyprice = 485 , meanbuyprice = 485, lastbuyprice_withDiscount = 485, meanbuyprice_withDiscount = 485
        , lastbuyprice_withTax = 485, meanbuyprice_withTax = 485, lastbuyprice_withDiscountAndTax = 485
                where buybilldetailid = 147;
UPDATE productunit SET proUnitBuyPrice  = 485 * productnumber WHERE productid = 1432;
UPDATE storedetail SET  productquantity = '18', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1445';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1432', '1', '18', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '18', '1', '2026-10-05 19:00:39','0','0'); -- id=2217
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 ('01433', '31', '100', '1433', '15', '350', '5250.00', '0', '', '2026-10-05 19:06:43', '1433','','','0','0','0','0','0',null,'350','5250','0','0','0','0','0','0','0','0','1'); -- id=148
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1433, 0, 0
                    , 350, 15, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 350,
                        buyQuantity =buyQuantity+15, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=214
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1433', '350', '15', '0', 'buyBillController.php', '148', '', '0', '0'); -- id=116
UPDATE product SET  productBuyPrice = "350" WHERE productId = 1433 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 148 ;
UPDATE product SET productName = 'ايطاليانو موديل 29', productDescription = '', productCatId = '100', productBuyPrice = '350.00', productSellAllPrice = '380.00', productSellUnitPrice = '380.00', productSellHalfPrice = '380.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01433',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '350',lastbuyprice_withDiscount = '350',meanbuyprice = '350',meanbuyprice_withDiscount = '350' , productbuypricereal = '350.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '8.57' , 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='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 = '1433';
UPDATE buybilldetail SET  lastbuyprice = 350 , meanbuyprice = 350, lastbuyprice_withDiscount = 350, meanbuyprice_withDiscount = 350
        , lastbuyprice_withTax = 350, meanbuyprice_withTax = 350, lastbuyprice_withDiscountAndTax = 350
                where buybilldetailid = 148;
UPDATE productunit SET proUnitBuyPrice  = 350 * productnumber WHERE productid = 1433;
UPDATE storedetail SET  productquantity = '15', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1446';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1433', '1', '15', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '15', '1', '2026-10-05 19:00:39','0','0'); -- id=2218
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 ('01434', '31', '100', '1434', '45', '310', '13950.00', '0', '', '2026-10-05 19:06:43', '1434','','','0','0','0','0','0',null,'310','13950','0','0','0','0','0','0','0','0','1'); -- id=149
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1434, 0, 0
                    , 310, 45, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 310,
                        buyQuantity =buyQuantity+45, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=215
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1434', '310', '45', '0', 'buyBillController.php', '149', '', '0', '0'); -- id=117
UPDATE product SET  productBuyPrice = "310" WHERE productId = 1434 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 149 ;
UPDATE product SET productName = 'ايطاليانو موديل 30 - 20 - 13', productDescription = '', productCatId = '100', productBuyPrice = '310.00', productSellAllPrice = '340.00', productSellUnitPrice = '340.00', productSellHalfPrice = '340.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01434',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 = '9.68' , 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 = '1434';
UPDATE buybilldetail SET  lastbuyprice = 310 , meanbuyprice = 310, lastbuyprice_withDiscount = 310, meanbuyprice_withDiscount = 310
        , lastbuyprice_withTax = 310, meanbuyprice_withTax = 310, lastbuyprice_withDiscountAndTax = 310
                where buybilldetailid = 149;
UPDATE productunit SET proUnitBuyPrice  = 310 * productnumber WHERE productid = 1434;
UPDATE storedetail SET  productquantity = '45', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1447';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1434', '1', '45', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '45', '1', '2026-10-05 19:00:39','0','0'); -- id=2219
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 ('01435', '31', '100', '1435', '21', '410', '8610.00', '0', '', '2026-10-05 19:06:43', '1435','','','0','0','0','0','0',null,'410','8610','0','0','0','0','0','0','0','0','1'); -- id=150
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1435, 0, 0
                    , 410, 21, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 410,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=216
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1435', '410', '21', '0', 'buyBillController.php', '150', '', '0', '0'); -- id=118
UPDATE product SET  productBuyPrice = "410" WHERE productId = 1435 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 150 ;
UPDATE product SET productName = 'ايطاليانو موديل 6', productDescription = '', productCatId = '100', productBuyPrice = '410.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01435',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 = '7.32' , 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 = '1435';
UPDATE buybilldetail SET  lastbuyprice = 410 , meanbuyprice = 410, lastbuyprice_withDiscount = 410, meanbuyprice_withDiscount = 410
        , lastbuyprice_withTax = 410, meanbuyprice_withTax = 410, lastbuyprice_withDiscountAndTax = 410
                where buybilldetailid = 150;
UPDATE productunit SET proUnitBuyPrice  = 410 * productnumber WHERE productid = 1435;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1448';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1435', '1', '21', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-05 19:00:39','0','0'); -- id=2220
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 ('01436', '31', '100', '1436', '21', '415', '8715.00', '0', '', '2026-10-05 19:06:43', '1436','','','0','0','0','0','0',null,'415','8715','0','0','0','0','0','0','0','0','1'); -- id=151
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1436, 0, 0
                    , 415, 21, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 415,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=217
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1436', '415', '21', '0', 'buyBillController.php', '151', '', '0', '0'); -- id=119
UPDATE product SET  productBuyPrice = "415" WHERE productId = 1436 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 151 ;
UPDATE product SET productName = 'ايطاليانو موديل 31', productDescription = '', productCatId = '100', productBuyPrice = '415.00', productSellAllPrice = '445.00', productSellUnitPrice = '445.00', productSellHalfPrice = '445.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01436',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 = '7.23' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='415',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='415',meanbuyprice_withTax='415',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='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 = '1436';
UPDATE buybilldetail SET  lastbuyprice = 415 , meanbuyprice = 415, lastbuyprice_withDiscount = 415, meanbuyprice_withDiscount = 415
        , lastbuyprice_withTax = 415, meanbuyprice_withTax = 415, lastbuyprice_withDiscountAndTax = 415
                where buybilldetailid = 151;
UPDATE productunit SET proUnitBuyPrice  = 415 * productnumber WHERE productid = 1436;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1449';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1436', '1', '21', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-05 19:00:39','0','0'); -- id=2221
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 ('01437', '31', '100', '1437', '15', '290', '4350.00', '0', '', '2026-10-05 19:06:43', '1437','','','0','0','0','0','0',null,'290','4350','0','0','0','0','0','0','0','0','1'); -- id=152
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1437, 0, 0
                    , 290, 15, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 290,
                        buyQuantity =buyQuantity+15, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=218
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1437', '290', '15', '0', 'buyBillController.php', '152', '', '0', '0'); -- id=120
UPDATE product SET  productBuyPrice = "290" WHERE productId = 1437 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 152 ;
UPDATE product SET productName = 'ايطاليانو موديل 11', productDescription = '', productCatId = '100', productBuyPrice = '290.00', productSellAllPrice = '320.00', productSellUnitPrice = '320.00', productSellHalfPrice = '320.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01437',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '290',lastbuyprice_withDiscount = '290',meanbuyprice = '290',meanbuyprice_withDiscount = '290' , productbuypricereal = '290.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '10.34' , 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='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 = '1437';
UPDATE buybilldetail SET  lastbuyprice = 290 , meanbuyprice = 290, lastbuyprice_withDiscount = 290, meanbuyprice_withDiscount = 290
        , lastbuyprice_withTax = 290, meanbuyprice_withTax = 290, lastbuyprice_withDiscountAndTax = 290
                where buybilldetailid = 152;
UPDATE productunit SET proUnitBuyPrice  = 290 * productnumber WHERE productid = 1437;
UPDATE storedetail SET  productquantity = '15', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1450';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1437', '1', '15', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '15', '1', '2026-10-05 19:00:39','0','0'); -- id=2222
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 ('01438', '31', '100', '1438', '21', '390', '8190.00', '0', '', '2026-10-05 19:06:43', '1438','','','0','0','0','0','0',null,'390','8190','0','0','0','0','0','0','0','0','1'); -- id=153
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:00:39', 1, 1438, 0, 0
                    , 390, 21, 0, 0, 1, '2026-10-05 19:06:43')
                ON DUPLICATE KEY UPDATE buyprice = 390,
                        buyQuantity =buyQuantity+21, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:06:43' ; -- id=219
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1438', '390', '21', '0', 'buyBillController.php', '153', '', '0', '0'); -- id=121
UPDATE product SET  productBuyPrice = "390" WHERE productId = 1438 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 153 ;
UPDATE product SET productName = 'ايطاليانو موديل 5', productDescription = '', productCatId = '100', productBuyPrice = '390.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01438',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '7.69' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1438';
UPDATE buybilldetail SET  lastbuyprice = 390 , meanbuyprice = 390, lastbuyprice_withDiscount = 390, meanbuyprice_withDiscount = 390
        , lastbuyprice_withTax = 390, meanbuyprice_withTax = 390, lastbuyprice_withDiscountAndTax = 390
                where buybilldetailid = 153;
UPDATE productunit SET proUnitBuyPrice  = 390 * productnumber WHERE productid = 1438;
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1451';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1438', '1', '21', '0', '31', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '21', '1', '2026-10-05 19:00:39','0','0'); -- id=2223
UPDATE supplier SET  suppliercurrentDebt = '140535',suppliercurrentDebtInCurrency= '140535' , userid = '1', supplierdate = '2026-10-05 19:06:43'   WHERE supplierid = '86';
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 ('86', '0.00', '140535', '0', 'اضافة فاتورة مشتريات', '31', '140535', '2026-10-05 19:00:39', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','140535','1','0','140535','140535','0',''); -- id=148
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '140535', '140535', '2026-10-05', '1', '0', '0', '2026-10-05 19:06:43','اضافة فاتورة مشتريات رقم 31','1','0',null,'0','31','buyBillController.php?do=details&id=31'); -- id=1134
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1134', '382', '140535', '','0'); -- id=1138
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14927098.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1134', '566', '140535', '','0'); -- id=1134
UPDATE accountstree SET name = 'ايطاليانو', customName = 'ايطاليانو', customNameEn = 'ايطاليانو', nameEn = 'ايطاليانو', parent = '81', accountNature = '1', theValue = '140535', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-05 19:01:56' WHERE id = '566';
update buybill set dailyentryid='1134,0' where buybillid=31;
COMMIT;
UPDATE product SET overAllAveragePrice = 370 WHERE productId = 1423;UPDATE product SET overAllAveragePrice = 460 WHERE productId = 1424;UPDATE product SET overAllAveragePrice = 265 WHERE productId = 1425;UPDATE product SET overAllAveragePrice = 560 WHERE productId = 1426;UPDATE product SET overAllAveragePrice = 330 WHERE productId = 1427;UPDATE product SET overAllAveragePrice = 400 WHERE productId = 1428;UPDATE product SET overAllAveragePrice = 345 WHERE productId = 1429;UPDATE product SET overAllAveragePrice = 420 WHERE productId = 1430;UPDATE product SET overAllAveragePrice = 510 WHERE productId = 1431;UPDATE product SET overAllAveragePrice = 485 WHERE productId = 1432;UPDATE product SET overAllAveragePrice = 350 WHERE productId = 1433;UPDATE product SET overAllAveragePrice = 310 WHERE productId = 1434;UPDATE product SET overAllAveragePrice = 410 WHERE productId = 1435;UPDATE product SET overAllAveragePrice = 415 WHERE productId = 1436;UPDATE product SET overAllAveragePrice = 290 WHERE productId = 1437;UPDATE product SET overAllAveragePrice = 390 WHERE productId = 1438;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:36:44";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:06:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 19:06:44', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=31'); -- id=3073
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:36:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:06:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 19:06:55', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3074
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:38:14";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:08:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 19:08:14', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3075
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:40:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:10:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 19:10:03', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php'); -- id=3076
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:40:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:10:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 19:10:39', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3077
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 ('06ac3cb6ebc1eb', '2026-10-05 19:08:14', '75', '151440.00', '237090', '0', '0', '85650.00',  '85650.00', '0', '85650', '2', '2026-10-05 19:10:39', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=32
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 ('01439', '32', '88', '1439', '24', '400', '9600.00', '0', '', '2026-10-05 19:10:39', '1439','','','0','0','0','0','0',null,'400','9600','0','0','0','0','0','0','0','0','2'); -- id=154
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:08:14', 2, 1439, 0, 0
                    , 400, 24, 0, 0, 1, '2026-10-05 19:10:39')
                ON DUPLICATE KEY UPDATE buyprice = 400,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:10:39' ; -- id=220
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1439', '400', '24', '0', 'buyBillController.php', '154', '', '0', '0'); -- id=122
UPDATE product SET  productBuyPrice = "400" WHERE productId = 1439 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 154 ;
UPDATE product SET productName = 'تلبيسه محير سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '400.00', productSellAllPrice = '430.00', productSellUnitPrice = '430.00', productSellHalfPrice = '430.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01439',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 = '7.50' , 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='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 = '1439';
UPDATE buybilldetail SET  lastbuyprice = 400 , meanbuyprice = 400, lastbuyprice_withDiscount = 400, meanbuyprice_withDiscount = 400
        , lastbuyprice_withTax = 400, meanbuyprice_withTax = 400, lastbuyprice_withDiscountAndTax = 400
                where buybilldetailid = 154;
UPDATE productunit SET proUnitBuyPrice  = 400 * productnumber WHERE productid = 1439;
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1439', '2', '24', '1', '2026-10-05 19:08:14'); -- id=1470
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1439', '2', '24', '0', '32', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-05 19:08:14','0','0'); -- id=2224
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 ('01440', '32', '88', '1440', '64', '390', '24960.00', '0', '', '2026-10-05 19:10:39', '1440','','','0','0','0','0','0',null,'390','24960','0','0','0','0','0','0','0','0','2'); -- id=155
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:08:14', 2, 1440, 0, 0
                    , 390, 64, 0, 0, 1, '2026-10-05 19:10:39')
                ON DUPLICATE KEY UPDATE buyprice = 390,
                        buyQuantity =buyQuantity+64, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:10:39' ; -- id=221
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1440', '390', '64', '0', 'buyBillController.php', '155', '', '0', '0'); -- id=123
UPDATE product SET  productBuyPrice = "390" WHERE productId = 1440 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 155 ;
UPDATE product SET productName = 'الياقيه وبنضه سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01440',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '7.69' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1440';
UPDATE buybilldetail SET  lastbuyprice = 390 , meanbuyprice = 390, lastbuyprice_withDiscount = 390, meanbuyprice_withDiscount = 390
        , lastbuyprice_withTax = 390, meanbuyprice_withTax = 390, lastbuyprice_withDiscountAndTax = 390
                where buybilldetailid = 155;
UPDATE productunit SET proUnitBuyPrice  = 390 * productnumber WHERE productid = 1440;
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1440', '2', '64', '1', '2026-10-05 19:08:14'); -- id=1471
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1440', '2', '64', '0', '32', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '64', '1', '2026-10-05 19:08:14','0','0'); -- id=2225
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 ('01441', '32', '88', '1441', '20', '380', '7600.00', '0', '', '2026-10-05 19:10:39', '1441','','','0','0','0','0','0',null,'380','7600','0','0','0','0','0','0','0','0','2'); -- id=156
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:08:14', 2, 1441, 0, 0
                    , 380, 20, 0, 0, 1, '2026-10-05 19:10:39')
                ON DUPLICATE KEY UPDATE buyprice = 380,
                        buyQuantity =buyQuantity+20, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:10:39' ; -- id=222
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1441', '380', '20', '0', 'buyBillController.php', '156', '', '0', '0'); -- id=124
UPDATE product SET  productBuyPrice = "380" WHERE productId = 1441 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 156 ;
UPDATE product SET productName = 'هاف وسوسته عريض سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '380.00', productSellAllPrice = '410.00', productSellUnitPrice = '410.00', productSellHalfPrice = '410.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01441',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 = '7.89' , 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 = '1441';
UPDATE buybilldetail SET  lastbuyprice = 380 , meanbuyprice = 380, lastbuyprice_withDiscount = 380, meanbuyprice_withDiscount = 380
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 380
                where buybilldetailid = 156;
UPDATE productunit SET proUnitBuyPrice  = 380 * productnumber WHERE productid = 1441;
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1441', '2', '20', '1', '2026-10-05 19:08:14'); -- id=1472
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1441', '2', '20', '0', '32', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '20', '1', '2026-10-05 19:08:14','0','0'); -- id=2226
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 ('01442', '32', '88', '1442', '8', '410', '3280.00', '0', '', '2026-10-05 19:10:39', '1442','','','0','0','0','0','0',null,'410','3280','0','0','0','0','0','0','0','0','2'); -- id=157
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:08:14', 2, 1442, 0, 0
                    , 410, 8, 0, 0, 1, '2026-10-05 19:10:39')
                ON DUPLICATE KEY UPDATE buyprice = 410,
                        buyQuantity =buyQuantity+8, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:10:39' ; -- id=223
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1442', '410', '8', '0', 'buyBillController.php', '157', '', '0', '0'); -- id=125
UPDATE product SET  productBuyPrice = "410" WHERE productId = 1442 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 157 ;
UPDATE product SET productName = 'كابيشوه مقطع سفنتي ', productDescription = '', productCatId = '88', productBuyPrice = '410.00', productSellAllPrice = '440.00', productSellUnitPrice = '440.00', productSellHalfPrice = '440.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01442',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 = '7.32' , 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 = '1442';
UPDATE buybilldetail SET  lastbuyprice = 410 , meanbuyprice = 410, lastbuyprice_withDiscount = 410, meanbuyprice_withDiscount = 410
        , lastbuyprice_withTax = 410, meanbuyprice_withTax = 410, lastbuyprice_withDiscountAndTax = 410
                where buybilldetailid = 157;
UPDATE productunit SET proUnitBuyPrice  = 410 * productnumber WHERE productid = 1442;
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1442', '2', '8', '1', '2026-10-05 19:08:14'); -- id=1473
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1442', '2', '8', '0', '32', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '8', '1', '2026-10-05 19:08:14','0','0'); -- id=2227
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 ('01443', '32', '88', '1443', '35', '380', '13300.00', '0', '', '2026-10-05 19:10:39', '1443','','','0','0','0','0','0',null,'380','13300','0','0','0','0','0','0','0','0','2'); -- id=158
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:08:14', 2, 1443, 0, 0
                    , 380, 35, 0, 0, 1, '2026-10-05 19:10:39')
                ON DUPLICATE KEY UPDATE buyprice = 380,
                        buyQuantity =buyQuantity+35, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:10:39' ; -- id=224
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1443', '380', '35', '0', 'buyBillController.php', '158', '', '0', '0'); -- id=126
UPDATE product SET  productBuyPrice = "380" WHERE productId = 1443 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 158 ;
UPDATE product SET productName = 'حوض origian سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '380.00', productSellAllPrice = '410.00', productSellUnitPrice = '410.00', productSellHalfPrice = '410.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01443',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 = '7.89' , 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 = '1443';
UPDATE buybilldetail SET  lastbuyprice = 380 , meanbuyprice = 380, lastbuyprice_withDiscount = 380, meanbuyprice_withDiscount = 380
        , lastbuyprice_withTax = 380, meanbuyprice_withTax = 380, lastbuyprice_withDiscountAndTax = 380
                where buybilldetailid = 158;
UPDATE productunit SET proUnitBuyPrice  = 380 * productnumber WHERE productid = 1443;
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1443', '2', '35', '1', '2026-10-05 19:08:14'); -- id=1474
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1443', '2', '35', '0', '32', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '35', '1', '2026-10-05 19:08:14','0','0'); -- id=2228
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 ('01444', '32', '88', '1444', '19', '390', '7410.00', '0', '', '2026-10-05 19:10:39', '1444','','','0','0','0','0','0',null,'390','7410','0','0','0','0','0','0','0','0','2'); -- id=159
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:08:14', 2, 1444, 0, 0
                    , 390, 19, 0, 0, 1, '2026-10-05 19:10:39')
                ON DUPLICATE KEY UPDATE buyprice = 390,
                        buyQuantity =buyQuantity+19, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:10:39' ; -- id=225
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1444', '390', '19', '0', 'buyBillController.php', '159', '', '0', '0'); -- id=127
UPDATE product SET  productBuyPrice = "390" WHERE productId = 1444 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 159 ;
UPDATE product SET productName = 'ال خطوط طول مثلث سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01444',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '7.69' , buyhalf_precentage = '7.69' , buypart_precentage = '7.69',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1444';
UPDATE buybilldetail SET  lastbuyprice = 390 , meanbuyprice = 390, lastbuyprice_withDiscount = 390, meanbuyprice_withDiscount = 390
        , lastbuyprice_withTax = 390, meanbuyprice_withTax = 390, lastbuyprice_withDiscountAndTax = 390
                where buybilldetailid = 159;
UPDATE productunit SET proUnitBuyPrice  = 390 * productnumber WHERE productid = 1444;
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1444', '2', '19', '1', '2026-10-05 19:08:14'); -- id=1475
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1444', '2', '19', '0', '32', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '19', '1', '2026-10-05 19:08:14','0','0'); -- id=2229
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 ('01445', '32', '88', '1445', '32', '390', '12480.00', '0', '', '2026-10-05 19:10:39', '1445','','','0','0','0','0','0',null,'390','12480','0','0','0','0','0','0','0','0','2'); -- id=160
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:08:14', 2, 1445, 0, 0
                    , 390, 32, 0, 0, 1, '2026-10-05 19:10:39')
                ON DUPLICATE KEY UPDATE buyprice = 390,
                        buyQuantity =buyQuantity+32, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:10:39' ; -- id=226
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1445', '390', '32', '0', 'buyBillController.php', '160', '', '0', '0'); -- id=128
UPDATE product SET  productBuyPrice = "390" WHERE productId = 1445 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 160 ;
UPDATE product SET productName = 'حوض  luxte سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01445',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '7.69' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1445';
UPDATE buybilldetail SET  lastbuyprice = 390 , meanbuyprice = 390, lastbuyprice_withDiscount = 390, meanbuyprice_withDiscount = 390
        , lastbuyprice_withTax = 390, meanbuyprice_withTax = 390, lastbuyprice_withDiscountAndTax = 390
                where buybilldetailid = 160;
UPDATE productunit SET proUnitBuyPrice  = 390 * productnumber WHERE productid = 1445;
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1445', '2', '32', '1', '2026-10-05 19:08:14'); -- id=1476
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1445', '2', '32', '0', '32', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '32', '1', '2026-10-05 19:08:14','0','0'); -- id=2230
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 ('01446', '32', '88', '1446', '18', '390', '7020.00', '0', '', '2026-10-05 19:10:39', '1446','','','0','0','0','0','0',null,'390','7020','0','0','0','0','0','0','0','0','2'); -- id=161
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:08:14', 2, 1446, 0, 0
                    , 390, 18, 0, 0, 1, '2026-10-05 19:10:39')
                ON DUPLICATE KEY UPDATE buyprice = 390,
                        buyQuantity =buyQuantity+18, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:10:39' ; -- id=227
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1446', '390', '18', '0', 'buyBillController.php', '161', '', '0', '0'); -- id=129
UPDATE product SET  productBuyPrice = "390" WHERE productId = 1446 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 161 ;
UPDATE product SET productName = 'حوض اتنين استك سفنتي', productDescription = '', productCatId = '88', productBuyPrice = '390.00', productSellAllPrice = '420.00', productSellUnitPrice = '420.00', productSellHalfPrice = '420.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01446',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '390',lastbuyprice_withDiscount = '390',meanbuyprice = '390',meanbuyprice_withDiscount = '390' , productbuypricereal = '390.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '7.69' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='390',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='390',meanbuyprice_withTax='390',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='390',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1446';
UPDATE buybilldetail SET  lastbuyprice = 390 , meanbuyprice = 390, lastbuyprice_withDiscount = 390, meanbuyprice_withDiscount = 390
        , lastbuyprice_withTax = 390, meanbuyprice_withTax = 390, lastbuyprice_withDiscountAndTax = 390
                where buybilldetailid = 161;
UPDATE productunit SET proUnitBuyPrice  = 390 * productnumber WHERE productid = 1446;
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1446', '2', '18', '1', '2026-10-05 19:08:14'); -- id=1477
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1446', '2', '18', '0', '32', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '18', '1', '2026-10-05 19:08:14','0','0'); -- id=2231
UPDATE supplier SET  suppliercurrentDebt = '237090',suppliercurrentDebtInCurrency= '237090' , userid = '1', supplierdate = '2026-10-05 19:10:39'   WHERE supplierid = '75';
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 ('75', '151440.00', '85650', '0', 'اضافة فاتورة مشتريات', '32', '237090', '2026-10-05 19:08:14', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','85650','1','151440','85650','237090','0',''); -- id=149
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '85650', '85650', '2026-10-05', '1', '0', '0', '2026-10-05 19:10:39','اضافة فاتورة مشتريات رقم 32','1','0',null,'0','32','buyBillController.php?do=details&id=32'); -- id=1135
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1135', '492', '85650', '','0'); -- id=1139
UPDATE accountstree SET name = 'مخزن المحل', customName = 'مخزن المحل', customNameEn = 'مخزن المحل', nameEn = 'مخزن المحل', parent = '49', accountNature = '0', theValue = '863550', 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';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1135', '499', '85650', '','0'); -- id=1135
UPDATE accountstree SET name = 'سفنتي', customName = 'سفنتي', customNameEn = 'سفنتي', nameEn = 'سفنتي', parent = '81', accountNature = '1', theValue = '237090', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-09-30 16:43:09' WHERE id = '499';
update buybill set dailyentryid='1135,0' where buybillid=32;
COMMIT;
UPDATE product SET overAllAveragePrice = 400 WHERE productId = 1439;UPDATE product SET overAllAveragePrice = 390 WHERE productId = 1440;UPDATE product SET overAllAveragePrice = 380 WHERE productId = 1441;UPDATE product SET overAllAveragePrice = 410 WHERE productId = 1442;UPDATE product SET overAllAveragePrice = 380 WHERE productId = 1443;UPDATE product SET overAllAveragePrice = 390 WHERE productId = 1444;UPDATE product SET overAllAveragePrice = 390 WHERE productId = 1445;UPDATE product SET overAllAveragePrice = 390 WHERE productId = 1446;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:40:39";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:10:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 19:10:39', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=32'); -- id=3078
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:40:55";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:10:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 19:10:55', '1', 'add2', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=add2'); -- id=3079
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-05','','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=102
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (102, 1,'2026-10-05 19:10:55',1)
                ON DUPLICATE KEY UPDATE catid = 102, edited = 1, sysdate = '2026-10-05 19:10:55', userid = 1; -- id=103
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '102', '1', '2026-10-05', '1', '0'); -- id=15
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:40:56";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:10:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 19:10:56', '1', 'sucess', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=sucess'); -- id=3080
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:40:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:10:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-05 19:10:57', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productCatController.php?do=show'); -- id=3081
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:41:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:11:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 19:11:33', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3082
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:44:46";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:14:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 19:14:46', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=add'); -- id=3083
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 ('جاكيت زنط و طباعه فيراري','','102','800','850','850','850','2026-10-05','0','1','0','','0','0','0','0','0','800','800','800','800','800','0','6.25','6.25','6.25','.','0','0','0','800','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','800','800','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','800','0','0','0','0','0','0','','','0','0','0','0'); -- id=1453
UPDATE product SET productName = 'جاكيت زنط و طباعه فيراري', productDescription = '', productCatId = '102', productBuyPrice = '800', productSellAllPrice = '850', productSellUnitPrice = '850', productSellHalfPrice = '850', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01453',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '800',meanbuyprice = '800',meanbuyprice_withDiscount = '800' , productbuypricereal = '800' , buypricereal_precentage = '0' , buytotal_precentage = '6.25' , buyhalf_precentage = '6.25' , buypart_precentage = '6.25',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='800',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='800',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='800',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1453';
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', '1453', '1.00', '2026-10-05', '1', '0','0145301','850','850','850','800','','0','0','0','0','0','0','0','0','0','0'); -- id=1453
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1453', '1', '0', '1', '2026-10-05'); -- id=1478
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1453', '1', '0', '0', '1453', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2232
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1453, 1,'2026-10-05 19:14:46',1)
                ON DUPLICATE KEY UPDATE productid = 1453, edited = 1, sysdate = '2026-10-05 19:14:46', userid = 1; -- id=2218
UPDATE product SET productName = 'جاكيت زنط و طباعه فيراري', productDescription = '', productCatId = '102', productBuyPrice = '800.00', productSellAllPrice = '850.00', productSellUnitPrice = '850.00', productSellHalfPrice = '850.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01453',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '800',meanbuyprice = '800',meanbuyprice_withDiscount = '800' , productbuypricereal = '800' , buypricereal_precentage = '0' , buytotal_precentage = '6.25' , buyhalf_precentage = '6.25' , buypart_precentage = '6.25',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='800',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='800',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='800',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1453';
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 ('جلد و تطريز فيراري','','102','500','550','550','550','2026-10-05','0','1','0','','0','0','0','0','0','500','500','500','500','500','0','10','0','0','.','0','0','0','500','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','500','500','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','500','0','0','0','0','0','0','','','0','0','0','0'); -- id=1454
UPDATE product SET productName = 'جلد و تطريز فيراري', productDescription = '', productCatId = '102', productBuyPrice = '500', productSellAllPrice = '550', productSellUnitPrice = '550', productSellHalfPrice = '550', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01454',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500' , buypricereal_precentage = '0' , buytotal_precentage = '10' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1454';
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', '1454', '1.00', '2026-10-05', '1', '0','0145401','550','550','550','500','','0','0','0','0','0','0','0','0','0','0'); -- id=1454
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1454', '1', '0', '1', '2026-10-05'); -- id=1479
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1454', '1', '0', '0', '1454', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-05','0','0'); -- id=2233
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1454, 1,'2026-10-05 19:14:46',1)
                ON DUPLICATE KEY UPDATE productid = 1454, edited = 1, sysdate = '2026-10-05 19:14:46', userid = 1; -- id=2219
UPDATE product SET productName = 'جلد و تطريز فيراري', productDescription = '', productCatId = '102', productBuyPrice = '500.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01454',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '500',lastbuyprice_withDiscount = '500',meanbuyprice = '500',meanbuyprice_withDiscount = '500' , productbuypricereal = '500' , buypricereal_precentage = '0' , buytotal_precentage = '10' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1454';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:44:48";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:14:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 19:14:48', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php'); -- id=3084
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:45:03";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:15:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 19:15:03', '1', 'bill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=3085
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-05 19:15:51', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0'); -- id=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', '0', '', '0', 'إضافة مورد جديد', '87', '', '2026-10-05 19:15:51', '1', 'supplierController.php', '', '0','', '0','1','1','0','1','0','0','0','0',''); -- id=150
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-05 19:15:51'); -- id=567
UPDATE supplier SET suppliername = 'فيراري - مورد', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-05', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='567',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0' WHERE supplierid = '87';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:47:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:17:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 19:17:33', '1', 'add', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=add'); -- id=3086
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 ('06ac3cd077ed81', '2026-10-05 19:15:03', '87', '0.00', '234000', '0', '0', '234000.00',  '234000.00', '0', '234000', '1', '2026-10-05 19:17:33', '', '1', '0', '', '1','1','1','0.00','-1','0','0','1','0','0','.','0','0','0','0','0',''); -- id=33
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 ('01453', '33', '102', '1453', '60', '800', '48000.00', '0', '', '2026-10-05 19:17:33', '1453','','','0','0','0','0','0',null,'800','48000','0','0','0','0','0','0','0','0','1'); -- id=162
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:15:03', 1, 1453, 0, 0
                    , 800, 60, 0, 0, 1, '2026-10-05 19:17:33')
                ON DUPLICATE KEY UPDATE buyprice = 800,
                        buyQuantity =buyQuantity+60, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:17:33' ; -- id=228
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1453', '800', '60', '0', 'buyBillController.php', '162', '', '0', '0'); -- id=130
UPDATE product SET  productBuyPrice = "800" WHERE productId = 1453 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 162 ;
UPDATE product SET productName = 'جاكيت زنط و طباعه فيراري', productDescription = '', productCatId = '102', productBuyPrice = '800.00', productSellAllPrice = '850.00', productSellUnitPrice = '850.00', productSellHalfPrice = '850.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01453',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '800',meanbuyprice = '800',meanbuyprice_withDiscount = '800' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.25' , buyhalf_precentage = '6.25' , buypart_precentage = '6.25',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='800',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='800',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='800',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1453';
UPDATE buybilldetail SET  lastbuyprice = 800 , meanbuyprice = 800, lastbuyprice_withDiscount = 800, meanbuyprice_withDiscount = 800
        , lastbuyprice_withTax = 800, meanbuyprice_withTax = 800, lastbuyprice_withDiscountAndTax = 800
                where buybilldetailid = 162;
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1453;
UPDATE storedetail SET  productquantity = '60', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1478';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1453', '1', '60', '0', '33', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '60', '1', '2026-10-05 19:15:03','0','0'); -- id=2234
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 ('01453', '33', '102', '1453', '60', '800', '48000.00', '0', '', '2026-10-05 19:17:33', '1453','','','0','0','0','0','0',null,'800','48000','0','0','0','0','0','0','0','0','1'); -- id=163
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:15:03', 1, 1453, 0, 0
                    , 800, 60, 0, 0, 1, '2026-10-05 19:17:33')
                ON DUPLICATE KEY UPDATE buyprice = 800,
                        buyQuantity =buyQuantity+60, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:17:33' ; -- id=228
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1453', '800', '60', '0', 'buyBillController.php', '163', '', '0', '0'); -- id=131
UPDATE product SET  productBuyPrice = "800" WHERE productId = 1453 ;
UPDATE buybilldetail SET  quantitybefore = 60 WHERE buybilldetailid = 163 ;
UPDATE product SET productName = 'جاكيت زنط و طباعه فيراري', productDescription = '', productCatId = '102', productBuyPrice = '800.00', productSellAllPrice = '850.00', productSellUnitPrice = '850.00', productSellHalfPrice = '850.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01453',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '800',meanbuyprice = '800',meanbuyprice_withDiscount = '800' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.25' , buyhalf_precentage = '6.25' , buypart_precentage = '6.25',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='800',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='800',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='800',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1453';
UPDATE buybilldetail SET  lastbuyprice = 800 , meanbuyprice = 800, lastbuyprice_withDiscount = 800, meanbuyprice_withDiscount = 800
        , lastbuyprice_withTax = 800, meanbuyprice_withTax = 800, lastbuyprice_withDiscountAndTax = 800
                where buybilldetailid = 163;
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1453;
UPDATE storedetail SET  productquantity = '120', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1478';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1453', '1', '60', '0', '33', 'اضافة فاتورة مشتريات', 'buyBillController.php', '60', '120', '1', '2026-10-05 19:15:03','0','0'); -- id=2235
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 ('01453', '33', '102', '1453', '60', '800', '48000.00', '0', '', '2026-10-05 19:17:33', '1453','','','0','0','0','0','0',null,'800','48000','0','0','0','0','0','0','0','0','1'); -- id=164
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:15:03', 1, 1453, 0, 0
                    , 800, 60, 0, 0, 1, '2026-10-05 19:17:33')
                ON DUPLICATE KEY UPDATE buyprice = 800,
                        buyQuantity =buyQuantity+60, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:17:33' ; -- id=228
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1453', '800', '60', '0', 'buyBillController.php', '164', '', '0', '0'); -- id=132
UPDATE product SET  productBuyPrice = "800" WHERE productId = 1453 ;
UPDATE buybilldetail SET  quantitybefore = 120 WHERE buybilldetailid = 164 ;
UPDATE product SET productName = 'جاكيت زنط و طباعه فيراري', productDescription = '', productCatId = '102', productBuyPrice = '800.00', productSellAllPrice = '850.00', productSellUnitPrice = '850.00', productSellHalfPrice = '850.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01453',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '800',lastbuyprice_withDiscount = '800',meanbuyprice = '800',meanbuyprice_withDiscount = '800' , productbuypricereal = '800.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '6.25' , buyhalf_precentage = '6.25' , buypart_precentage = '6.25',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='800',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='800',meanbuyprice_withTax='800',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='800',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1453';
UPDATE buybilldetail SET  lastbuyprice = 800 , meanbuyprice = 800, lastbuyprice_withDiscount = 800, meanbuyprice_withDiscount = 800
        , lastbuyprice_withTax = 800, meanbuyprice_withTax = 800, lastbuyprice_withDiscountAndTax = 800
                where buybilldetailid = 164;
UPDATE productunit SET proUnitBuyPrice  = 800 * productnumber WHERE productid = 1453;
UPDATE storedetail SET  productquantity = '180', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1478';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1453', '1', '60', '0', '33', 'اضافة فاتورة مشتريات', 'buyBillController.php', '120', '180', '1', '2026-10-05 19:15:03','0','0'); -- id=2236
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 ('01454', '33', '102', '1454', '60', '500', '30000.00', '0', '', '2026-10-05 19:17:33', '1454','','','0','0','0','0','0',null,'500','30000','0','0','0','0','0','0','0','0','1'); -- id=165
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:15:03', 1, 1454, 0, 0
                    , 500, 60, 0, 0, 1, '2026-10-05 19:17:33')
                ON DUPLICATE KEY UPDATE buyprice = 500,
                        buyQuantity =buyQuantity+60, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:17:33' ; -- id=231
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1454', '500', '60', '0', 'buyBillController.php', '165', '', '0', '0'); -- id=133
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1454 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 165 ;
UPDATE product SET productName = 'جلد و تطريز فيراري', productDescription = '', productCatId = '102', productBuyPrice = '500.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01454',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 = '10.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 = '1454';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 500, meanbuyprice_withDiscount = 500
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where buybilldetailid = 165;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1454;
UPDATE storedetail SET  productquantity = '60', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1479';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1454', '1', '60', '0', '33', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '60', '1', '2026-10-05 19:15:03','0','0'); -- id=2237
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 ('01454', '33', '102', '1454', '60', '500', '30000.00', '0', '', '2026-10-05 19:17:33', '1454','','','0','0','0','0','0',null,'500','30000','0','0','0','0','0','0','0','0','1'); -- id=166
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:15:03', 1, 1454, 0, 0
                    , 500, 60, 0, 0, 1, '2026-10-05 19:17:33')
                ON DUPLICATE KEY UPDATE buyprice = 500,
                        buyQuantity =buyQuantity+60, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:17:33' ; -- id=231
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1454', '500', '60', '0', 'buyBillController.php', '166', '', '0', '0'); -- id=134
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1454 ;
UPDATE buybilldetail SET  quantitybefore = 60 WHERE buybilldetailid = 166 ;
UPDATE product SET productName = 'جلد و تطريز فيراري', productDescription = '', productCatId = '102', productBuyPrice = '500.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01454',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 = '10.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 = '1454';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 500, meanbuyprice_withDiscount = 500
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where buybilldetailid = 166;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1454;
UPDATE storedetail SET  productquantity = '120', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1479';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1454', '1', '60', '0', '33', 'اضافة فاتورة مشتريات', 'buyBillController.php', '60', '120', '1', '2026-10-05 19:15:03','0','0'); -- id=2238
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 ('01454', '33', '102', '1454', '60', '500', '30000.00', '0', '', '2026-10-05 19:17:33', '1454','','','0','0','0','0','0',null,'500','30000','0','0','0','0','0','0','0','0','1'); -- id=167
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-05 19:15:03', 1, 1454, 0, 0
                    , 500, 60, 0, 0, 1, '2026-10-05 19:17:33')
                ON DUPLICATE KEY UPDATE buyprice = 500,
                        buyQuantity =buyQuantity+60, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-05 19:17:33' ; -- id=231
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('1454', '500', '60', '0', 'buyBillController.php', '167', '', '0', '0'); -- id=135
UPDATE product SET  productBuyPrice = "500" WHERE productId = 1454 ;
UPDATE buybilldetail SET  quantitybefore = 120 WHERE buybilldetailid = 167 ;
UPDATE product SET productName = 'جلد و تطريز فيراري', productDescription = '', productCatId = '102', productBuyPrice = '500.00', productSellAllPrice = '550.00', productSellUnitPrice = '550.00', productSellHalfPrice = '550.00', productDate = '2026-10-05', conditions = '0', userId = '1', limitamount = '0', parcode = '01454',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 = '10.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 = '1454';
UPDATE buybilldetail SET  lastbuyprice = 500 , meanbuyprice = 500, lastbuyprice_withDiscount = 500, meanbuyprice_withDiscount = 500
        , lastbuyprice_withTax = 500, meanbuyprice_withTax = 500, lastbuyprice_withDiscountAndTax = 500
                where buybilldetailid = 167;
UPDATE productunit SET proUnitBuyPrice  = 500 * productnumber WHERE productid = 1454;
UPDATE storedetail SET  productquantity = '180', userid = '1', storedetaildate = '2026-10-05' WHERE storedetailid = '1479';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1454', '1', '60', '0', '33', 'اضافة فاتورة مشتريات', 'buyBillController.php', '120', '180', '1', '2026-10-05 19:15:03','0','0'); -- id=2239
UPDATE supplier SET  suppliercurrentDebt = '234000',suppliercurrentDebtInCurrency= '234000' , userid = '1', supplierdate = '2026-10-05 19:17:33'   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', '0.00', '234000', '0', 'اضافة فاتورة مشتريات', '33', '234000', '2026-10-05 19:15:03', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0','', '0','1','1','234000','1','0','234000','234000','0',''); -- id=151
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '234000', '234000', '2026-10-05', '1', '0', '0', '2026-10-05 19:17:33','اضافة فاتورة مشتريات رقم 33','1','0',null,'0','33','buyBillController.php?do=details&id=33'); -- id=1136
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1136', '382', '234000', '','0'); -- id=1140
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15161098.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1136', '567', '234000', '','0'); -- id=1136
UPDATE accountstree SET name = 'فيراري - مورد', customName = 'فيراري - مورد', customNameEn = 'فيراري - مورد', nameEn = 'فيراري - مورد', parent = '81', accountNature = '1', theValue = '234000', 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';
update buybill set dailyentryid='1136,0' where buybillid=33;
COMMIT;
UPDATE product SET overAllAveragePrice = 800 WHERE productId = 1453;UPDATE product SET overAllAveragePrice = 500 WHERE productId = 1454;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:47:33";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:17:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-05 19:17:33', '1', 'editprint', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyBillController.php?do=editprint&id=33'); -- id=3087
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:48:04";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:18:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 19:18:04', '1', 'showbarcodebuybill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=33&type=2'); -- id=3088
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:57:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:27:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-05 19:27:07', '1', 'showbarcode', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/productController.php?do=showbarcode'); -- id=3089
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:57:54";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:27:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-05 19:27:54', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3090
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 15:58:01";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:28:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyreport.php', '2026-10-05 19:28:01', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/buyreport.php'); -- id=3091
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:10:57";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:40:57", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 19:40:57', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3092

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac3c7e0bfb8f
-- ----------------------------------------------------------------------------------------------------

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-05 19:40:57', '06ac3c7e0bfb8f', '1', '0.00', '0', '0', '1', '5130.00', '5130', '5130', '0', '1', '2026-10-05 19:40:57', '', '2', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '12' ,'0','','','','','-1','0','0','0','0','0','5130','0','','0','0','5130','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-05','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=91
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','اضافة فاتورة مبيعات','91', '0', '2026-10-05 19:40:57', '2', 'sellbillController.php', 'اضافة فاتورة مبيعات', '5130', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 19:40:57','0','0','',''); -- id=172
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 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', '91', '95', '1386', '3', '390', '1170', '0', '', '0', '2026-10-05 19:40:57', '1386', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','77-3,','1','1','0','0','390','1170','0','','0','0.00','0','0','0','0'); -- id=381
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 = 381;
 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-05', 1170, 1170, 1170
                    , 1170, 1053, 1112.91, 1053
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1170, 570.96, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1170, sellCostBuyPrice =sellCostBuyPrice+1170
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1170, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1170
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1053, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1112.91
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1053
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1170
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+570.96
                        , returnSellVal = returnSellVal+0, 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-05', 1170, 1170, 1170
                    , 1170, 1053, 1112.91, 1053
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1170, 570.96, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1170, sellCostBuyPrice =sellCostBuyPrice+1170
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1170, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1170
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1053, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1112.91
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1053
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1170
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+570.96
                        , returnSellVal = returnSellVal+0, 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 = '180', userid = '2', storedetaildate = '2026-10-05 19:40:57' WHERE storedetailid = '1386';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1386', '1', '3', '1', '91', 'اضافة فاتورة مبيعات', 'sellbillController.php', '183', '180', '2', '2026-10-05 19:40:57','0','0'); -- id=2240
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+3 where id = 83;
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 ('468','01391', '91', '95', '1391', '3', '520', '1560', '0', '', '0', '2026-10-05 19:40:57', '1391', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','83-3,','1','1','0','0','520','1560','0','','0','0.00','0','0','0','0'); -- id=382
UPDATE sellbilldetail SET  lastbuyprice = 520.00 , meanbuyprice = 520.00, lastbuyprice_withDiscount = 468.00, meanbuyprice_withDiscount = 494.00
        , lastbuyprice_withTax = 520, meanbuyprice_withTax = 260, lastbuyprice_withDiscountAndTax = 468
                where sellbilldetailid = 382;
 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 (1391, '2026-10-05', 1560, 1560, 1560
                    , 1560, 1404, 1482, 1404
                    , 0, 0, 0, 0
                    , 0, 0, 0, 3, 0, 1560, 780, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1560, sellCostBuyPrice =sellCostBuyPrice+1560
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1560, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1560
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1404, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1482
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1404
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1560
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+780
                        , returnSellVal = returnSellVal+0, 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-05', 1560, 1560, 1560
                    , 1560, 1404, 1482, 1404
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1560, 780, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1560, sellCostBuyPrice =sellCostBuyPrice+1560
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1560, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1560
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1404, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1482
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1404
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1560
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+780
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '51', userid = '2', storedetaildate = '2026-10-05 19:40:57' WHERE storedetailid = '1391';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1391', '1', '3', '1', '91', 'اضافة فاتورة مبيعات', 'sellbillController.php', '54', '51', '2', '2026-10-05 19:40:57','0','0'); -- id=2241
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+6 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', '91', '94', '1382', '6', '400', '2400', '0', '', '0', '2026-10-05 19:40:57', '1382', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','74-6,','1','1','0','0','400','2400','0','','0','0.00','0','0','0','0'); -- id=383
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 = 383;
 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-05', 2400, 2160, 2160
                    , 2160, 2160, 2160, 2160
                    , 0, 0, 0, 0
                    , 0, 0, 0, 6, 0, 2160, 2160, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2400, sellCostBuyPrice =sellCostBuyPrice+2160
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2160, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2160
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2160, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2160
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2160
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2160
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2160
                        , returnSellVal = returnSellVal+0, 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-05', 2400, 2160, 2160
                    , 2160, 2160, 2160, 2160
                    , 0, 0, 0, 0
                    , 0, 0, 0, 2160, 2160, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+2400, sellCostBuyPrice =sellCostBuyPrice+2160
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2160, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2160
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2160, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2160
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2160
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2160
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2160
                        , returnSellVal = returnSellVal+0, 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 = '270', userid = '2', storedetaildate = '2026-10-05 19:40:57' WHERE storedetailid = '1382';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1382', '1', '6', '1', '91', 'اضافة فاتورة مبيعات', 'sellbillController.php', '276', '270', '2', '2026-10-05 19:40:57','0','0'); -- id=2242
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '348130',  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 ('343000','5130', '0', '2', 'اضافة فاتورة مبيعات', '91', '348130', '2026-10-05 19:40:57', '2',  'sellbillController.php','1','','0'); -- id=111
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '5130', '5130', '2026-10-05', '2', '0', '0', '2026-10-05 19:40:57','اضافة فاتورة مبيعات رقم 91','1','0',null,'0','91','sellbillController.php?do=showDetail&sellbillid=91'); -- id=1137
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1137', '419', '5130', '','0'); -- id=1141
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '348130', 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 ('1137', '143', '5130', '','0'); -- id=1137
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '974480', 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 ( '4617', '4617', '2026-10-05', '2', '0', '0', '2026-10-05 19:40:57','اضافة فاتورة مبيعات رقم 91 - صرف البضاعة من المخزن','1','0',null,'0','91','sellbillController.php?do=showDetail&sellbillid=91'); -- id=1138
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1138', '402', '4617', '','0'); -- id=1142
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '948194.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1138', '382', '4617', '','0'); -- id=1138
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15156481.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
update sellbill set dailyentryid='1137,0,1138' where sellbillid=91;
 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-05', 5130, 4890, 4890
                    , 4890, 4617, 4754.91, 4617
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,4890, 3510.96, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5130, sellCostBuyPrice =sellCostBuyPrice+4890
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4890, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4890
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4617, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4754.91
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4617
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4890
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3510.96
                        , returnSellVal = returnSellVal+0, 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-05', 5130, 4890, 4890
                    , 4890, 4617, 4754.91, 4617
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,4890, 3510.96, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+5130, sellCostBuyPrice =sellCostBuyPrice+4890
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+4890, sellCostMeanBuyPrice = sellCostMeanBuyPrice+4890
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+4617, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+4754.91
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+4617
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+4890
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+3510.96
                        , returnSellVal = returnSellVal+0, 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, 5130, 4890, 4890
                    , 4890, 4617, 4754.91, 4617, 4890, 3510.96)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+5130, netSellCostBuyPrice = netSellCostBuyPrice+4890
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+4890
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+4890
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+4617
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+4754.91
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+4617
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+4890
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+3510.96;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06ac3c7e0bfb8f and sellbillId = 91 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:10:58";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:40:58", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 19:40:58', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=3093
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:21:17";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:51:17", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 19:51:17', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=3094
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:24:20";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:54:21", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 19:54:21', '2', 'addAndRetuen', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=3095

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac3d58550dbd
-- ----------------------------------------------------------------------------------------------------

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-05 19:54:21', '06ac3d58550dbd', '1', '0.00', '0', '0', '1', '36865', '36865', '-36865', '0', '1', '2026-10-05 19:54:21', '', '2', '0', 'نقدي','2', '0', '5', '0', 'نقدي', '107', '0', '', '','','','-1','0','0','0','','0','-36865','0','0','0','0','0','0','0','0','-1','0','0','1','','0'); -- id=3
UPDATE client SET  clientdebt = '0', userid = '2' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','1','اضافة فاتورة مردوات مبيعات','3', '0', '2026-10-05 19:54:21', '2', 'returnsellbillController.php', 'اضافة فاتورة مردوات مبيعات', '36865', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-05 19:54:21','0','0','',''); -- id=173
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 ('280.00', '07630', '3', '36', '1083', '30', '300', '9000', '0', '', '0', '0', '1083', '0.00', '0','1','0','','','0','0','0','0','0','0','1','1','','0','0','300','9000','0','','0'); -- id=3
UPDATE returnsellbilldetail SET  lastbuyprice = 280.00 , meanbuyprice = 280.00, lastbuyprice_withDiscount = 280.00, meanbuyprice_withDiscount = 280.00
        , lastbuyprice_withTax = 280, meanbuyprice_withTax = 280, lastbuyprice_withDiscountAndTax = 280
                where returnsellbilldetailid = 3;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1083, '2026-10-05', 0, 0, 0
                    , 0, 0, 0, 0
                    , 9000, 8400, 8400, 8400
                    , 8400, 8400, 8400, 0, 30, 0, 0, 8400, 8400)
                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+9000, returnSellCostBuyPrice = returnSellCostBuyPrice+8400, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+8400
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+8400, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+8400
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+8400
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+8400
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+8400
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+8400
                        , netQuantity = netQuantity+0
                        , netQuantityRet = netQuantityRet+30;
 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-05', 0, 0, 0
                    , 0, 0, 0, 0
                    , 9000, 8400, 8400, 8400
                    , 8400, 8400, 8400, 0, 0, 8400, 8400)
                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+9000, returnSellCostBuyPrice = returnSellCostBuyPrice+8400, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+8400
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+8400, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+8400
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+8400
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+8400
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+8400
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+8400;
UPDATE storedetail SET  productquantity = '94', userid = '2', storedetaildate = '2026-10-05 19:54:21' WHERE storedetailid = '1083';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1083', '1', '30', '0', '3', 'اضافة فاتورة مردودات مبيعات', 'returnsellbillController.php', '64', '94', '2', '2026-10-05 19:54:21','0','0'); -- id=2243
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', '04826', '3', '36', '1077', '20', '350', '7000', '0', '', '0', '0', '1077', '0.00', '0','1','0','','','0','0','0','0','0','0','1','1','','0','0','350','7000','0','','0'); -- id=4
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 = 4;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1077, '2026-10-05', 0, 0, 0
                    , 0, 0, 0, 0
                    , 7000, 6600, 6600, 6600
                    , 6600, 6600, 6600, 0, 20, 0, 0, 6600, 6600)
                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+7000, returnSellCostBuyPrice = returnSellCostBuyPrice+6600, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+6600
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+6600, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+6600
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+6600
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+6600
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+6600
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+6600
                        , netQuantity = netQuantity+0
                        , netQuantityRet = netQuantityRet+20;
 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-05', 0, 0, 0
                    , 0, 0, 0, 0
                    , 7000, 6600, 6600, 6600
                    , 6600, 6600, 6600, 0, 0, 6600, 6600)
                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+7000, returnSellCostBuyPrice = returnSellCostBuyPrice+6600, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+6600
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+6600, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+6600
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+6600
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+6600
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+6600
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+6600;
UPDATE storedetail SET  productquantity = '60', userid = '2', storedetaildate = '2026-10-05 19:54:21' WHERE storedetailid = '1077';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1077', '1', '20', '0', '3', 'اضافة فاتورة مردودات مبيعات', 'returnsellbillController.php', '40', '60', '2', '2026-10-05 19:54:21','0','0'); -- id=2244
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 ('370.00', '09812', '3', '19', '847', '36', '390', '14040', '0', '', '0', '0', '847', '0.00', '0','1','0','','','0','0','0','0','0','0','1','1','','0','0','390','14040','0','','0'); -- id=5
UPDATE returnsellbilldetail 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 returnsellbilldetailid = 5;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (847, '2026-10-05', 0, 0, 0
                    , 0, 0, 0, 0
                    , 14040, 13320, 13320, 13320
                    , 13320, 13320, 13320, 0, 36, 0, 0, 13320, 13320)
                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+14040, returnSellCostBuyPrice = returnSellCostBuyPrice+13320, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+13320
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+13320, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+13320
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+13320
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+13320
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+13320
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+13320
                        , netQuantity = netQuantity+0
                        , netQuantityRet = netQuantityRet+36;
 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-05', 0, 0, 0
                    , 0, 0, 0, 0
                    , 14040, 13320, 13320, 13320
                    , 13320, 13320, 13320, 0, 0, 13320, 13320)
                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+14040, returnSellCostBuyPrice = returnSellCostBuyPrice+13320, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+13320
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+13320, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+13320
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+13320
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+13320
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+13320
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+13320;
UPDATE storedetail SET  productquantity = '72', userid = '2', storedetaildate = '2026-10-05 19:54:21' WHERE storedetailid = '847';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('847', '1', '36', '0', '3', 'اضافة فاتورة مردودات مبيعات', 'returnsellbillController.php', '36', '72', '2', '2026-10-05 19:54:21','0','0'); -- id=2245
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 ('305.00', '08778', '3', '19', '838', '21', '325', '6825', '0', '', '0', '0', '838', '0.00', '0','1','0','','','0','0','0','0','0','0','1','1','','0','0','325','6825','0','','0'); -- id=6
UPDATE returnsellbilldetail SET  lastbuyprice = 305.00 , meanbuyprice = 305.00, lastbuyprice_withDiscount = 305.00, meanbuyprice_withDiscount = 305.00
        , lastbuyprice_withTax = 305, meanbuyprice_withTax = 305, lastbuyprice_withDiscountAndTax = 305
                where returnsellbilldetailid = 6;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (838, '2026-10-05', 0, 0, 0
                    , 0, 0, 0, 0
                    , 6825, 6405, 6405, 6405
                    , 6405, 6405, 6405, 0, 21, 0, 0, 6405, 6405)
                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+6825, returnSellCostBuyPrice = returnSellCostBuyPrice+6405, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+6405
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+6405, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+6405
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+6405
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+6405
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+6405
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+6405
                        , netQuantity = netQuantity+0
                        , netQuantityRet = netQuantityRet+21;
 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-05', 0, 0, 0
                    , 0, 0, 0, 0
                    , 6825, 6405, 6405, 6405
                    , 6405, 6405, 6405, 0, 0, 6405, 6405)
                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+6825, returnSellCostBuyPrice = returnSellCostBuyPrice+6405, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+6405
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+6405, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+6405
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+6405
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+6405
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+6405
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+6405;
UPDATE storedetail SET  productquantity = '40', userid = '2', storedetaildate = '2026-10-05 19:54:21' WHERE storedetailid = '838';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('838', '1', '21', '0', '3', 'اضافة فاتورة مردودات مبيعات', 'returnsellbillController.php', '19', '40', '2', '2026-10-05 19:54:21','0','0'); -- id=2246
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '311265',  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 ('348130','-36865', '1', '2', 'اضافة فاتورة مردوات مبيعات', '3', '311265', '2026-10-05 19:54:21', '2',  'returnsellbillController.php','1','','0'); -- id=112
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '36865', '36865', '2026-10-05', '2', '0', '0', '2026-10-05 19:54:21','اضافة فاتورة مردود مبيعات رقم 3','1','0',null,'0','3','returnsellbillController.php?do=showDetail&returnsellbillid=3'); -- id=1139
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1139', '143', '36865', '','0'); -- id=1143
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '937615', 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 ('1139', '419', '36865', '','0'); -- id=1139
UPDATE accountstree SET name = 'خزنة كاشير ', customName = 'خزنة كاشير ', customNameEn = 'خزنة كاشير ', nameEn = 'خزنة كاشير ', parent = '40', accountNature = '0', theValue = '311265', 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 ( '34725', '34725', '2026-10-05', '2', '0', '0', '2026-10-05 19:54:21','اضافة فاتورة مردود مبيعات رقم 3 - صرف البضاعة من المخزن','1','0',null,'0','3','returnsellbillController.php?do=showDetail&returnsellbillid=3'); -- id=1140
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1140', '382', '34725', '','0'); -- id=1144
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '15191206.2', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1140', '402', '34725', '','0'); -- id=1140
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '913469.8', theOrder = '0', layingOrder = '530101', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '1', del = '0', sysdate = '2023-07-25 23:37:18' WHERE id = '402';
update returnsellbill set dailyentryid='1139,0,1140' where returnsellbillid=3;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-05', 0, 0, 0
                    , 0, 0, 0, 0
                    , 36865, 34725, 34725, 34725
                    , 34725, 34725, 34725 ,0, 0, 34725, 34725)
                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+36865, returnSellCostBuyPrice = returnSellCostBuyPrice+34725, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+34725
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+34725, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+34725
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+34725
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+34725
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+34725
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+34725;
 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-05', 0, 0, 0
                    , 0, 0, 0, 0
                    , 36865, 34725, 34725, 34725
                    , 34725, 34725, 34725 ,0, 0, 34725, 34725)
                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+36865, returnSellCostBuyPrice = returnSellCostBuyPrice+34725, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+34725
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+34725, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+34725
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+34725
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+34725
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+34725
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+34725;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice,netSellCostLastBuyPricewithTax,netSellCostMeanBuyPricewithTax)
                    VALUES (1, -36865, -34725, -34725
                    , -34725, -34725, -34725, -34725, -34725, -34725)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+-36865, netSellCostBuyPrice = netSellCostBuyPrice+-34725
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+-34725
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+-34725
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+-34725
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+-34725
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+-34725
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+-34725
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+-34725;
COMMIT;

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

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:24:21";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:54:21", deviceType = "DESKTOP" WHERE userid = 2;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-05 19:54:21', '2', 'addsellBill', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=3096
update user set blockedByLimits = 0;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:27:25";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:57:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 19:57:25', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3097
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-05 16:27:25";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 19:57:25', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3098
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:29:34";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:29: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-05 16:29:36";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 19:59:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 19:59:36', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3099
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-05 16:29:37";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 19:59:37', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3100
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:30:06";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 20:00:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellBillReportsController.php', '2026-10-05 20:00:06', '1', 'show', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellBillReportsController.php?do=show'); -- id=3101
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:30:32";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 20:00:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellBillReportsController.php', '2026-10-05 20:00:32', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellBillReportsController.php'); -- id=3102
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:31:07";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 20:01:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreportbills.php', '2026-10-05 20:01:07', '1', 'showbills', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreportbills.php?do=showbills'); -- id=3103
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:39:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 20:09:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreportbills.php', '2026-10-05 20:09:09', '1', 'showbills', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreportbills.php?do=showbills'); -- id=3104
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:40:09";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 20:10:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellBillReportsController.php', '2026-10-05 20:10:09', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/sellBillReportsController.php'); -- id=3105
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:40:18";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 20:10:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreportbills.php', '2026-10-05 20:10:18', '1', 'showbills', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreportbills.php?do=showbills'); -- id=3106
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:40:57";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:40:57";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:40:59";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 20:10:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 20:10:59', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3107
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-05 16:41:00";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 20:11:00', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3108
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:41:12";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 20:11:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('salesreportbills.php', '2026-10-05 20:11:12', '1', 'showbills', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/salesreportbills.php?do=showbills'); -- id=3109
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:41:49";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 16:41: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 loginip = "" WHERE lastactivetime < "2026-10-05 16:41:51";
UPDATE user SET loginip = "156.196.79.176", lastactivetime = "2026-10-05 20:11:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-05 20:11:51', '1', '', '156.196.79.176', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/index.php'); -- id=3110
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-05 16:41:52";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-05 20:11:52', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://elaraby.gt4it.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=3111
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-05 19:51:06";
