-- ALTER TABLE erp1.accountmovement AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.accountmovementkind AUTO_INCREMENT = 4;
-- ALTER TABLE erp1.accountstree AUTO_INCREMENT = 420;
-- ALTER TABLE erp1.accountstreefromprog AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.accountstreesetting AUTO_INCREMENT = 7;
-- ALTER TABLE erp1.ads AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.area AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.assets AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.assetscat AUTO_INCREMENT = 25;
-- ALTER TABLE erp1.assetssale AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.availableparcode AUTO_INCREMENT = 100001;
-- ALTER TABLE erp1.bank AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.bankaccount AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.beneficiaries AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.beneficiaries_eco AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.beneficiaries_family AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.billname AUTO_INCREMENT = 7;
-- ALTER TABLE erp1.billoperation AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.billprint AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.billprinter AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.billproperty AUTO_INCREMENT = 130;
-- ALTER TABLE erp1.bills AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.billsbuy AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.billsettings AUTO_INCREMENT = 1196;
-- ALTER TABLE erp1.billsproducts AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.billsproductsbuy AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.billsreturn AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.billsreturnproducts AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.billtemplate AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.billtemplatedetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.bind AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.bindsettlement AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.boarding AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.branch AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.buyandruternbill AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.buyandruternbillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.buyandruternbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.buybill AUTO_INCREMENT = 27;
-- ALTER TABLE erp1.buybillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.buybilldetail AUTO_INCREMENT = 27;
-- ALTER TABLE erp1.buybilldetailoffer AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.buybilloffer AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.buypriceshistorybook AUTO_INCREMENT = 26;
-- ALTER TABLE erp1.capital AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.carfile AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.carreview AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.carreviewer AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.cars AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.cartracking AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.cashtransfer AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.charities AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.charitiescenter AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.charitysearchlog AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.checkcontroller AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.checkdeposit AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.checkwithdrawal AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.claimdebts AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.claimreturnsellbills AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.claims AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.claimsclientbills AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.claimsellbills AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.claimstypeclients AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.client AUTO_INCREMENT = 3;
-- ALTER TABLE erp1.clientarea AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.clientdebtchange AUTO_INCREMENT = 30;
-- ALTER TABLE erp1.clientdetails AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.clientpaymentreceiptt AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.clientproductreview AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.clinic AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.collectedparcodestemp AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.commentclient AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.costcenter AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.costcenterdetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.country AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.coupons AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.currency AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.dailyentry AUTO_INCREMENT = 49;
-- ALTER TABLE erp1.dailyentrycreditor AUTO_INCREMENT = 49;
-- ALTER TABLE erp1.dailyentrydebtor AUTO_INCREMENT = 49;
-- ALTER TABLE erp1.damagedproduct AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.datedchecked AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.discountcontrol AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.disease AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.doctorkashf AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.dollarearnings AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.ebillsetting AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.eclientsetting AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employee AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employeeattendance AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employeeattendancesystem AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employeeclosedaygroupstatus AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employeeclosedayhistory AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employeeclosedaystatus AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employeeclosedaysubgroupstatus AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employeedoctor AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employeedoctordebtandpay AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employeedoctordebtchange AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employeegroup AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employeepersonnel AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.employeesubgroup AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.entryproductspurchased AUTO_INCREMENT = 26;
-- ALTER TABLE erp1.expenseexchange AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.expenses AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.expensestype AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.faida AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.faidadirector AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.faidaproduct AUTO_INCREMENT = 3;
-- ALTER TABLE erp1.goverarea AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.government AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.importcontract AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.impotencetreatmentsuppliersave AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.income AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.incometype AUTO_INCREMENT = 8;
-- ALTER TABLE erp1.insurancecompanies AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.kashf AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.kempiala AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.knownways AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.languages AUTO_INCREMENT = 3;
-- ALTER TABLE erp1.lastbillidspricesupdated AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.lastbillidsquickprofit AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_check AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_comreceipt AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_comreceiptdetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_comreceiptimage AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_externalmaintenance AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_finishingpayed AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_handedreport AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_initialmaintenance AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_initialmaintenancedetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_insurance AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_maintenancereceipt AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_maintenancereceiptfinish AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_producthistory AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_stage AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.m_stageproperity AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.maccontrol AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.maintenancecases AUTO_INCREMENT = 5;
-- ALTER TABLE erp1.maintenancecenters AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.maintenancecomments AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.maintenancecompanies AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.maintenancepolicys AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.maintenanceprocedures AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.maintenances AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.manufacuresetting AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.menuurl AUTO_INCREMENT = 31;
-- ALTER TABLE erp1.movementmanage AUTO_INCREMENT = 430;
-- ALTER TABLE erp1.movementmanagedeleted AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.newdbbackup AUTO_INCREMENT = 3;
-- ALTER TABLE erp1.newdbname AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.notics AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.offerpricebill AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.offerpricebillprop AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.offerpricecondition AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.onlinecat AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.onlineproductcat AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.onlinestoresetting AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.onlinetempcategory AUTO_INCREMENT = 5;
-- ALTER TABLE erp1.onlinetemporder AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.onlinetemporderclient AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.onlinetemporderproduct AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.onlinetempproduct AUTO_INCREMENT = 7;
-- ALTER TABLE erp1.onlinetempstoredetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.onlinetempstorereport AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.otherrequest AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.otherstoremovement AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.pages AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.partner AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.partnertransferbetween AUTO_INCREMENT = 25;
-- ALTER TABLE erp1.partnerwithdrawal AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.paymentnetworks AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.playstationcard AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.playstationclientcard AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.playstationclientcardpayhistory AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.policy AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.premium AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.premiumautomatic AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.premiumclient AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.premiuminstallments AUTO_INCREMENT = 24;
-- ALTER TABLE erp1.product AUTO_INCREMENT = 7;
-- ALTER TABLE erp1.productcat AUTO_INCREMENT = 4;
-- ALTER TABLE erp1.productcatunit AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.productingredients AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productionexecution AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productionexecutionoutput AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productionexecutionproduct AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productionexecutionwaste AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productionorder AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productionout AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productionoutdetails AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productionoutmany AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productionoutmanyinproducts AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productionoutmanyoutproducts AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productionrate AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productionrateproduct AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productrecieve AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productrequests AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productserial AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productsetting AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productstore AUTO_INCREMENT = 4;
-- ALTER TABLE erp1.producttemp AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.producttempunit AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.productunit AUTO_INCREMENT = 7;
-- ALTER TABLE erp1.programsettings AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.project AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.projectexchmaterial AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.projectexchmaterialdetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.projectexchmaterialdetailreturn AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.projectexchmaterialreturn AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.projectkind AUTO_INCREMENT = 4;
-- ALTER TABLE erp1.properties AUTO_INCREMENT = 688;
-- ALTER TABLE erp1.qrerpuserpass AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.quickprofitclient AUTO_INCREMENT = 22;
-- ALTER TABLE erp1.quickprofitday AUTO_INCREMENT = 22;
-- ALTER TABLE erp1.quickprofitgeneral AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.quickprofitproduct AUTO_INCREMENT = 26;
-- ALTER TABLE erp1.quickprofitstore AUTO_INCREMENT = 26;
-- ALTER TABLE erp1.religions AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.relusergroupproperties AUTO_INCREMENT = 3224;
-- ALTER TABLE erp1.rentbill AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.rentbillprop AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.rentproduct AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.rentstore AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.representativecompany AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.restauranthall AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.restaurantkitchenprint AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.restaurantorder AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.restaurantorderdeliverydetails AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.restaurantorderdetails AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.restaurantplaystation AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.restaurantplaystationplay AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.restaurantprinter AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.restaurantrawdestruction AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.restauranttable AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.resturantcategory AUTO_INCREMENT = 4;
-- ALTER TABLE erp1.returnbuybill AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.returnbuybillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.returnbuybilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.returnsellbill AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.returnsellbillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.returnsellbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.returnsellbillreview AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.richproperity AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.salaryreport AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.saudielectronicinvoice AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.save AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.saveclose AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.savedaily AUTO_INCREMENT = 25;
-- ALTER TABLE erp1.savestock AUTO_INCREMENT = 5;
-- ALTER TABLE erp1.savetype AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.searchfilters AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellandruternbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellbill AUTO_INCREMENT = 28;
-- ALTER TABLE erp1.sellbillandreturnreview AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellbillandrutern AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellbillandruterncurr AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellbillcurr AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellbilldetail AUTO_INCREMENT = 29;
-- ALTER TABLE erp1.sellbilldetailoffer AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellbilldetailorder AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellbilldetailtax AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellbillimage AUTO_INCREMENT = 9;
-- ALTER TABLE erp1.sellbilloffer AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellbillorder AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellbillpayed AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellbillreview AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sellbillstatus AUTO_INCREMENT = 25;
-- ALTER TABLE erp1.sellbillview AUTO_INCREMENT = ;
-- ALTER TABLE erp1.settingoperation AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.shippercompanies AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.shippingfile AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.simplemanufacturesetting AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.sizecolor AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sizecolorstoredetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sliders AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.soldserialproduct AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sparepart AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sparepartstore AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.sparepartstoredetails AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.sparepartstorereport AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.stage AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.stagestep AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.stock_import_logs AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.store AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.storedetail AUTO_INCREMENT = 7;
-- ALTER TABLE erp1.storemovement AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.storemovement_main AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.storereport AUTO_INCREMENT = 56;
-- ALTER TABLE erp1.studentabsences AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.studentaddsubjectdetails AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.studentaddsubjects AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.students AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.studentsetting AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.studentsexams AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.studentsexamsval AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.studentspaymentsystems AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.studentspays AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.studentsubjectgroupdays AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.studentsubjectgroups AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.studentsubjects AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.subvention AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.subventionpay AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.suppay AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.supplier AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.supplierdebtchange AUTO_INCREMENT = 23;
-- ALTER TABLE erp1.supplieropen AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.supplieropendebtchange AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.supplieropenexchangeorclosing AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.tamweenbill AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.tamweenclientdetail AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.tamweenda3mstatus AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.tamweenremainstatus AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.taskorder AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.taskorderproducts AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.taskscases AUTO_INCREMENT = 6;
-- ALTER TABLE erp1.temreturnsellbill AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.temreturnsellbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.temsellandruternbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.temsellbill AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.temsellbillandrutern AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.temsellbilldetail AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.toworkshoporder AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.toworkshoporderbill AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.transferbtweenbankaccount AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.transferclientaccounts AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.transfermoney AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.typeclient AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.typesimpotencetreatment AUTO_INCREMENT = 4;
-- ALTER TABLE erp1.typesupplier AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.unit AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.user AUTO_INCREMENT = 2;
-- ALTER TABLE erp1.usergroup AUTO_INCREMENT = 5;
-- ALTER TABLE erp1.usergroupadmin AUTO_INCREMENT = 1029;
-- ALTER TABLE erp1.vatpayment AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.wishlist AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.workshop AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.workstation AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.workstationassets AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.workstationworker AUTO_INCREMENT = 1;
-- ALTER TABLE erp1.youtube_link AUTO_INCREMENT = 290;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-19 23:08:25";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 02:38:25", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-19 23:08:30";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 02:38:30", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-19 23:08:44";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 02:38:44", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-19 23:08:46";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 02:38:46", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-19 23:08:46";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 02:38:46", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-19 23:08:47";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 02:38:47", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-19 23:08:47";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 02:38:47", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-19 23:08:48";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 02:38:48", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-19 23:08:49";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 02:38:49", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-19 23:08:49";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 02:38:49", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-19 23:08:50";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 02:38:50", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-19 23:08:52";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 02:38:52", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:15";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:15", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:21";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:21", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:22";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:22", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:22";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:22", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:23";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:23", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:24";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:24", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:24";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:24", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:25";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:25", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:25";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:25", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:26";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:26", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:27";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:27", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:27";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:27", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:31";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:31", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:27:33";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:57:33", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:28:29";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:58:29", deviceType = "DESKTOP" WHERE userid = -1;

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06946811d7baff
-- ----------------------------------------------------------------------------------------------------

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 ('2025-12-20 12:58:29', '06946811d7baff', '1', '0.00', '0', '0', '1', '150.00', '150', '150', '0', '1', '2025-12-20 12:58:29', '', '-1', '0', 'نقدي', '1', '0', '3', '0', 'نقدي', '4' ,'0','','','','','-1','0','0','0','0','0','150','0','','0','0','150','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2025-12-20','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=28
UPDATE client SET  clientdebt = '0', userid = '-1' WHERE clientid = '1';
INSERT INTO clientdebtchange (clientid, clientdebtchangebefore, clientdebtchangeamount, clientdebtchangetype, processname, clientdebtchangemodelid, clientdebtchangeafter, clientdebtchangedate, userid, tablename, comment, totalOperationCost,discount,reciptid,dailyentryid , num , billid , paytype, costcenterid,currencyId,conversionFactor,payedInCurrency,saveConversionFactor,userSelectedDate,paySerialNo,totalpayments,tagids,file) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','28', '0', '2025-12-20 12:58:29', '-1', 'sellbillController.php', 'اضافة فاتورة مبيعات', '150', '0', null, '0', null, null,'', '0','1','1','0','1','2025-12-20 12:58:29','0','0','',''); -- id=30
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 where id = 3;
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 ('10','00004', '28', '3', '4', '1', '10', '10', '0', '', '0', '2025-12-20 12:58:29', '4', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','3-1,','1','1','0','0','10','10','0','','0','0.00','0','0','0','0'); -- id=29
UPDATE sellbilldetail SET  lastbuyprice = 10.00 , meanbuyprice = 10.00, lastbuyprice_withDiscount = 10.00, meanbuyprice_withDiscount = 10.00
        , lastbuyprice_withTax = 10, meanbuyprice_withTax = 10, lastbuyprice_withDiscountAndTax = 10
                where sellbilldetailid = 29;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (4, '2025-12-20', 10, 10, 10
                    , 10, 10, 10, 10
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 10, 10, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+10, sellCostBuyPrice =sellCostBuyPrice+10
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+10, sellCostMeanBuyPrice = sellCostMeanBuyPrice+10
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+10, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+10
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+10
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+10
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+10
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+1
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2025-12-20', 10, 10, 10
                    , 10, 10, 10, 10
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 10, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+10, sellCostBuyPrice =sellCostBuyPrice+10
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+10, sellCostMeanBuyPrice = sellCostMeanBuyPrice+10
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+10, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+10
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+10
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+10
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+10
                        , returnSellVal = returnSellVal+0, 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 = '14', userid = '-1', storedetaildate = '2025-12-20 12:58:29' WHERE storedetailid = '4';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('4', '1', '1', '1', '28', 'اضافة فاتورة مبيعات', 'sellbillController.php', '15', '14', '-1', '2025-12-20 12:58:29','0','0'); -- 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 ('100','00005', '28', '3', '5', '1', '120', '120', '0', '', '0', '2025-12-20 12:58:29', '5', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','120','120','0','','0','0.00','0','0','0','0'); -- id=30
UPDATE sellbilldetail SET  lastbuyprice = 100.00 , meanbuyprice = 100.00, lastbuyprice_withDiscount = 100.00, meanbuyprice_withDiscount = 100.00
        , lastbuyprice_withTax = 100, meanbuyprice_withTax = 100, lastbuyprice_withDiscountAndTax = 100
                where sellbilldetailid = 30;
 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 (5, '2025-12-20', 120, 100, 100
                    , 100, 100, 100, 100
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 100, 100, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+120, sellCostBuyPrice =sellCostBuyPrice+100
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+100, sellCostMeanBuyPrice = sellCostMeanBuyPrice+100
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+100, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+100
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+100
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+100
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+100
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+1
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2025-12-20', 120, 100, 100
                    , 100, 100, 100, 100
                    , 0, 0, 0, 0
                    , 0, 0, 0, 100, 100, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+120, sellCostBuyPrice =sellCostBuyPrice+100
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+100, sellCostMeanBuyPrice = sellCostMeanBuyPrice+100
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+100, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+100
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+100
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+100
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+100
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '-1', userid = '-1', storedetaildate = '2025-12-20 12:58:29' WHERE storedetailid = '5';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '1', '1', '28', 'اضافة فاتورة مبيعات', 'sellbillController.php', '0', '-1', '-1', '2025-12-20 12:58:29','0','0'); -- id=57
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('10','00006', '28', '3', '6', '1', '10', '10', '0', '', '0', '2025-12-20 12:58:29', '6', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','','1','1','0','0','10','10','0','','0','0.00','0','0','0','0'); -- id=31
UPDATE sellbilldetail SET  lastbuyprice = 10.00 , meanbuyprice = 10.00, lastbuyprice_withDiscount = 10.00, meanbuyprice_withDiscount = 10.00
        , lastbuyprice_withTax = 10, meanbuyprice_withTax = 10
                where sellbilldetailid = 31;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (6, '2025-12-20', 10, 10, 10
                    , 10, 10, 10, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 10, 10, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+10, sellCostBuyPrice =sellCostBuyPrice+10
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+10, sellCostMeanBuyPrice = sellCostMeanBuyPrice+10
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+10, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+10
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+10
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+10
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+1
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2025-12-20', 10, 10, 10
                    , 10, 10, 10, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 10, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+10, sellCostBuyPrice =sellCostBuyPrice+10
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+10, sellCostMeanBuyPrice = sellCostMeanBuyPrice+10
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+10, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+10
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+10
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+10
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '-1', userid = '-1', storedetaildate = '2025-12-20 12:58:29' WHERE storedetailid = '6';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '1', '1', '1', '28', 'اضافة فاتورة مبيعات', 'sellbillController.php', '0', '-1', '-1', '2025-12-20 12:58:29','0','0'); -- id=58
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 where id = 3;
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 ('10','00004', '28', '3', '4', '1', '10', '10', '0', '', '0', '2025-12-20 12:58:29', '4', '0.00', '-1', '1','0.00','','','0','0','0','0','0','0','0','0','','3-1,','1','1','0','0','10','10','0','','0','0.00','0','0','0','0'); -- id=32
UPDATE sellbilldetail SET  lastbuyprice = 10.00 , meanbuyprice = 10.00, lastbuyprice_withDiscount = 10.00, meanbuyprice_withDiscount = 10.00
        , lastbuyprice_withTax = 10, meanbuyprice_withTax = 10, lastbuyprice_withDiscountAndTax = 10
                where sellbilldetailid = 32;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (4, '2025-12-20', 10, 10, 10
                    , 10, 10, 10, 10
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 10, 10, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+10, sellCostBuyPrice =sellCostBuyPrice+10
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+10, sellCostMeanBuyPrice = sellCostMeanBuyPrice+10
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+10, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+10
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+10
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+10
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+10
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+1
                        , netQuantityRet = netQuantityRet+0;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2025-12-20', 10, 10, 10
                    , 10, 10, 10, 10
                    , 0, 0, 0, 0
                    , 0, 0, 0, 10, 10, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+10, sellCostBuyPrice =sellCostBuyPrice+10
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+10, sellCostMeanBuyPrice = sellCostMeanBuyPrice+10
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+10, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+10
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+10
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+10
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+10
                        , returnSellVal = returnSellVal+0, 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 = '13', userid = '-1', storedetaildate = '2025-12-20 12:58:29' WHERE storedetailid = '4';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('4', '1', '1', '1', '28', 'اضافة فاتورة مبيعات', 'sellbillController.php', '14', '13', '-1', '2025-12-20 12:58:29','0','0'); -- id=59
CALL saveInUse(1,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '1140',  userid = '-1' WHERE saveid = '1';
UPDATE save SET  inUse = 0 where saveid = 1;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('990','150', '0', '1', 'اضافة فاتورة مبيعات', '28', '1140', '2025-12-20 12:58:29', '-1',  'sellbillController.php','1','','0'); -- id=25
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '150', '150', '2025-12-20', '-1', '0', '0', '2025-12-20 12:58:29','اضافة فاتورة مبيعات رقم 28','1','0',null,'0','28','sellbillController.php?do=showDetail&sellbillid=28'); -- id=49
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('49', '383', '150', '','0'); -- id=49
UPDATE accountstree SET name = 'الخزنة الرئيسية', customName = 'الخزنة الرئيسية', customNameEn = 'الخزنة الرئيسية', nameEn = 'الخزنة الرئيسية', parent = '40', accountNature = '0', theValue = '1130', theOrder = '0', layingOrder = '12010200002', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = 'Bank and Cash ', userid = '1', del = '0', sysdate = '2022-05-08 23:12:28' WHERE id = '383';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('49', '143', '150', '','0'); -- id=49
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '660', 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 ( '130', '130', '2025-12-20', '-1', '0', '0', '2025-12-20 12:58:29','اضافة فاتورة مبيعات رقم 28 - صرف البضاعة من المخزن','1','0',null,'0','28','sellbillController.php?do=showDetail&sellbillid=28'); -- id=50
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('50', '402', '130', '','0'); -- id=50
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '-259', theOrder = '0', layingOrder = '510104', 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 ('50', '382', '130', '','0'); -- id=50
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '10259', 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='49,0,50' where sellbillid=28;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2025-12-20', 150, 130, 130
                    , 130, 130, 130, 120
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,130, 130, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+150, sellCostBuyPrice =sellCostBuyPrice+130
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+130, sellCostMeanBuyPrice = sellCostMeanBuyPrice+130
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+130, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+130
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+120
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+130
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+130
                        , returnSellVal = returnSellVal+0, 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, '2025-12-20', 150, 130, 130
                    , 130, 130, 130, 120
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,130, 130, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+150, sellCostBuyPrice =sellCostBuyPrice+130
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+130, sellCostMeanBuyPrice = sellCostMeanBuyPrice+130
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+130, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+130
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+120
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+130
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+130
                        , returnSellVal = returnSellVal+0, 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, 150, 130, 130
                    , 130, 130, 130, 120, 130, 130)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+150, netSellCostBuyPrice = netSellCostBuyPrice+130
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+130
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+130
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+130
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+130
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+120
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+130
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+130;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 06946811d7baff and sellbillId = 28 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:28:29";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:58:29", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 09:28:47";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 12:58:47", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2025-12-20 19:53:15";
UPDATE user SET loginip = "127.0.0.1", lastactivetime = "2025-12-20 23:23:15", deviceType = "DESKTOP" WHERE userid = -1;
