UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 02:32:29";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:34:53";
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = 'D', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2024-02-13',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
update user set blockedByLimits = 0;
INSERT INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder) VALUES (1, 511, 1,0),(1, 512, 0,0),(1, 513, 0,0),(1, 514, 0,0),(1, 515, 0,0),(1, 516, 0,0),(1, 517, 0,0),(1, 518, 0,0),(1, 519, 0,0),(1, 520, 0,0),(1, 521, 0,0),(1, 522, 1,0),(1, 523, 0,0),(1, 524, 0,0),(1, 525, 0,0),(1, 526, 0,0),(1, 527, 1,0),(1, 528, 1,0),(1, 529, 1,0),(1, 530, 0,0),(1, 531, 0,0),(1, 532, 0,0),(1, 533, 0,0),(1, 534, 1,0),(1, 535, 1,0),(1, 536, 1,0),(1, 537, 1,0),(1, 538, 1,0),(1, 539, 1,0),(1, 540, 0,0),(1, 541, 0,0),(1, 542, 0,0),(1, 543, 1,0),(1, 544, 0,0),(1, 545, 0,0),(1, 546, 0,0),(1, 547, 0,0),(1, 548, 0,0),(1, 549, 1,0),(1, 550, 0,0),(1, 551, 0,0),(1, 552, 0,0),(1, 553, 0,0),(1, 554, 0,0),(1, 555, 0,0),(1, 556, 0,0),(1, 557, 0,0),(1, 558, 0,0),(1, 559, 0,0),(1, 560, 0,0),(1, 561, 0,0),(1, 562, 0,0),(1, 563, 0,0),(1, 564, 0,0),(1, 565, 0,0),(1, 566, 0,0),(1, 567, 0,0),(1, 568, 0,0),(1, 569, 0,0),(1, 570, 1,0),(1, 571, 1,0),(1, 572, 1,0),(1, 573, 1,0),(1, 574, 1,0),(1, 575, 1,0),(1, 576, 1,0),(1, 577, 1,0),(1, 578, 1,0),(1, 579, 0,0),(1, 580, 0,0),(1, 581, 0,0),(1, 582, 0,0),(1, 583, 0,0),(1, 584, 0,0),(1, 585, 1,0),(1, 586, 1,0),(1, 587, 0,0),(1, 588, 1,0),(1, 589, 1,0),(1, 590, 1,0),(1, 591, 1,0),(1, 592, 1,0),(1, 593, 1,0),(1, 594, 1,0),(1, 595, 0,0),(1, 596, 0,0),(1, 597, 0,0),(1, 598, 0,0),(1, 599, 0,0),(1, 600, 0,0),(1, 601, 0,0),(1, 602, 0,0),(1, 603, 1,0),(1, 604, 1,0),(1, 605, 1,0),(1, 606, 1,0),(1, 607, 1,0),(1, 608, 1,0),(1, 609, 1,0),(1, 610, 1,0),(1, 611, 0,0),(1, 612, 1,0),(1, 613, 1,0),(1, 614, 1,0),(1, 615, 1,0),(1, 616, 0,0),(1, 617, 0,0),(1, 618, 0,0),(1, 619, 1,0),(1, 620, 1,0),(1, 621, 1,0),(1, 622, 1,0),(1, 623, 1,0),(1, 624, 1,0),(1, 625, 0,0),(1, 626, 0,0),(1, 627, 1,0),(1, 628, 1,0),(1, 629, 1,0),(1, 630, 0,0),(1, 631, 1,0),(1, 632, 0,0),(1, 633, 0,0),(1, 634, 0,0),(1, 635, 0,0),(1, 636, 1,0),(1, 637, 1,0),(1, 638, 1,0),(1, 639, 1,0),(1, 640, 0,0),(1, 641, 1,0),(1, 642, 1,0),(1, 643, 1,0),(1, 644, 1,0),(1, 645, 1,0),(1, 646, 1,0),(1, 647, 1,0),(1, 648, 1,0),(1, 649, 1,0),(1, 650, 1,0),(1, 651, 1,0),(1, 652, 1,0),(1, 653, 1,0),(1, 654, 1,0),(1, 655, 1,0),(1, 656, 1,0),(1, 657, 1,0),(1, 658, 1,0),(1, 659, 1,0),(1, 660, 1,0),(1, 661, 1,0),(1, 662, 1,0),(1, 663, 1,0),(1, 664, 1,0),(1, 665, 1,0),(1, 666, 1,0),(1, 667, 1,0),(1, 668, 1,0),(1, 669, 1,0),(1, 670, 1,0),(1, 671, 1,0),(1, 672, 1,0),(1, 673, 1,0),(1, 674, 1,0),(1, 675, 1,0),(1, 676, 1,0),(1, 677, 1,0),(1, 678, 1,0),(1, 679, 1,0),(1, 680, 1,0),(1, 681, 1,0),(1, 682, 1,0),(1, 683, 1,0),(1, 684, 1,0),(1, 685, 1,0),(1, 686, 1,0),(1, 687, 1,0),(1, 688, 1,0),(1, 689, 1,0),(1, 690, 1,0),(1, 691, 1,0),(1, 692, 1,0),(1, 693, 1,0),(1, 694, 1,0),(1, 695, 1,0),(1, 696, 1,0),(1, 697, 1,0),(1, 698, 1,0),(1, 699, 1,0),(1, 700, 1,0),(1, 701, 1,0),(1, 702, 1,0),(1, 703, 1,0),(1, 704, 1,0),(1, 705, 1,0),(1, 706, 1,0),(1, 707, 1,0),(1, 708, 1,0),(1, 709, 1,0),(1, 710, 1,0),(1, 711, 1,0),(1, 712, 1,0),(1, 713, 1,0),(1, 714, 1,0),(1, 715, 1,0),(1, 716, 1,0),(1, 717, 1,0),(1, 718, 1,0),(1, 719, 1,0),(1, 720, 1,0),(1, 721, 1,0),(1, 722, 1,0),(1, 723, 1,0),(1, 724, 1,0),(1, 725, 1,0),(1, 726, 1,0),(1, 727, 1,0),(1, 728, 1,0),(1, 729, 1,0),(1, 730, 1,0),(1, 731, 1,0),(1, 732, 1,0),(1, 733, 1,0),(1, 734, 1,0),(1, 735, 1,0),(1, 736, 1,0),(1, 737, 1,0),(1, 738, 1,0),(1, 739, 1,0),(1, 740, 1,0),(1, 741, 1,0),(1, 742, 1,0),(1, 743, 1,0),(1, 744, 1,0),(1, 745, 1,0),(1, 746, 1,0),(1, 747, 1,0),(1, 748, 1,0),(1, 749, 1,0),(1, 750, 1,0),(1, 751, 1,0),(1, 752, 1,0),(1, 753, 1,0),(1, 754, 1,0),(1, 755, 1,0),(1, 756, 1,0),(1, 757, 1,0),(1, 758, 1,0),(1, 759, 1,0),(1, 760, 1,0),(1, 761, 1,0),(1, 762, 1,0),(1, 763, 1,0),(1, 764, 1,0),(1, 765, 1,0),(1, 766, 1,0),(1, 767, 1,0),(1, 768, 1,0),(1, 769, 1,0),(1, 770, 1,0),(1, 771, 1,0),(1, 772, 1,0),(1, 773, 1,0),(1, 774, 1,0),(1, 775, 1,0),(1, 776, 1,0),(1, 777, 1,0),(1, 778, 1,0),(1, 779, 1,0),(1, 780, 1,0),(1, 781, 1,0),(1, 782, 1,0),(1, 783, 1,0),(1, 784, 1,0),(1, 785, 1,0),(1, 786, 1,0),(1, 787, 1,0),(1, 788, 1,0),(1, 789, 1,0),(1, 790, 1,0),(1, 791, 1,0),(1, 792, 1,0),(1, 793, 1,0),(1, 794, 1,0),(1, 795, 1,0),(1, 796, 1,0),(1, 797, 1,0),(1, 798, 1,0),(1, 799, 1,0),(1, 800, 1,0),(1, 801, 0,0),(1, 802, 1,0),(1, 803, 1,0),(1, 804, 0,0),(1, 805, 0,0),(1, 806, 1,0),(1, 807, 1,0),(1, 808, 1,0),(1, 809, 1,0),(1, 810, 1,0),(1, 811, 1,0),(1, 812, 1,0),(1, 813, 1,0),(1, 814, 1,0),(1, 815, 1,0),(1, 816, 1,0),(1, 817, 1,0),(1, 818, 1,0),(1, 819, 1,0),(1, 820, 1,0),(1, 821, 1,0),(1, 822, 1,0),(1, 823, 1,0),(1, 824, 1,0),(1, 825, 1,0),(1, 826, 1,0),(1, 827, 1,0),(1, 828, 1,0),(1, 829, 1,0),(1, 830, 1,0),(1, 831, 1,0),(1, 832, 1,0),(1, 833, 1,0),(1, 834, 1,0),(1, 835, 1,0),(1, 836, 1,0),(2, 511, 1,0),(2, 512, 0,0),(2, 513, 0,0),(2, 514, 0,0),(2, 515, 0,0),(2, 516, 0,0),(2, 517, 0,0),(2, 518, 0,0),(2, 519, 0,0),(2, 520, 0,0),(2, 521, 0,0),(2, 522, 1,0),(2, 523, 0,0),(2, 524, 0,0),(2, 525, 0,0),(2, 526, 0,0),(2, 527, 1,0),(2, 528, 1,0),(2, 529, 1,0),(2, 530, 0,0),(2, 531, 0,0),(2, 532, 0,0),(2, 533, 0,0),(2, 534, 1,0),(2, 535, 1,0),(2, 536, 1,0),(2, 537, 1,0),(2, 538, 1,0),(2, 539, 1,0),(2, 540, 0,0),(2, 541, 0,0),(2, 542, 0,0),(2, 543, 1,0),(2, 544, 0,0),(2, 545, 0,0),(2, 546, 0,0),(2, 547, 0,0),(2, 548, 0,0),(2, 549, 1,0),(2, 550, 0,0),(2, 551, 0,0),(2, 552, 0,0),(2, 553, 0,0),(2, 554, 0,0),(2, 555, 0,0),(2, 556, 0,0),(2, 557, 0,0),(2, 558, 0,0),(2, 559, 0,0),(2, 560, 0,0),(2, 561, 0,0),(2, 562, 0,0),(2, 563, 0,0),(2, 564, 0,0),(2, 565, 0,0),(2, 566, 0,0),(2, 567, 0,0),(2, 568, 0,0),(2, 569, 0,0),(2, 570, 1,0),(2, 571, 1,0),(2, 572, 1,0),(2, 573, 1,0),(2, 574, 1,0),(2, 575, 1,0),(2, 576, 1,0),(2, 577, 1,0),(2, 578, 1,0),(2, 579, 0,0),(2, 580, 0,0),(2, 581, 0,0),(2, 582, 0,0),(2, 583, 0,0),(2, 584, 0,0),(2, 585, 1,0),(2, 586, 1,0),(2, 587, 0,0),(2, 588, 1,0),(2, 589, 1,0),(2, 590, 1,0),(2, 591, 1,0),(2, 592, 1,0),(2, 593, 1,0),(2, 594, 1,0),(2, 595, 0,0),(2, 596, 0,0),(2, 597, 0,0),(2, 598, 0,0),(2, 599, 0,0),(2, 600, 0,0),(2, 601, 0,0),(2, 602, 0,0),(2, 603, 1,0),(2, 604, 1,0),(2, 605, 1,0),(2, 606, 1,0),(2, 607, 1,0),(2, 608, 1,0),(2, 609, 1,0),(2, 610, 1,0),(2, 611, 0,0),(2, 612, 1,0),(2, 613, 1,0),(2, 614, 1,0),(2, 615, 1,0),(2, 616, 0,0),(2, 617, 0,0),(2, 618, 0,0),(2, 619, 1,0),(2, 620, 1,0),(2, 621, 1,0),(2, 622, 1,0),(2, 623, 1,0),(2, 624, 1,0),(2, 625, 0,0),(2, 626, 0,0),(2, 627, 1,0),(2, 628, 1,0),(2, 629, 1,0),(2, 630, 0,0),(2, 631, 1,0),(2, 632, 0,0),(2, 633, 0,0),(2, 634, 0,0),(2, 635, 0,0),(2, 636, 1,0),(2, 637, 1,0),(2, 638, 1,0),(2, 639, 1,0),(2, 640, 0,0),(2, 641, 1,0),(2, 642, 1,0),(2, 643, 1,0),(2, 644, 1,0),(2, 645, 1,0),(2, 646, 1,0),(2, 647, 1,0),(2, 648, 1,0),(2, 649, 1,0),(2, 650, 1,0),(2, 651, 1,0),(2, 652, 1,0),(2, 653, 1,0),(2, 654, 1,0),(2, 655, 1,0),(2, 656, 1,0),(2, 657, 1,0),(2, 658, 1,0),(2, 659, 1,0),(2, 660, 1,0),(2, 661, 1,0),(2, 662, 1,0),(2, 663, 1,0),(2, 664, 1,0),(2, 665, 1,0),(2, 666, 1,0),(2, 667, 1,0),(2, 668, 1,0),(2, 669, 1,0),(2, 670, 1,0),(2, 671, 1,0),(2, 672, 1,0),(2, 673, 1,0),(2, 674, 1,0),(2, 675, 1,0),(2, 676, 1,0),(2, 677, 1,0),(2, 678, 1,0),(2, 679, 1,0),(2, 680, 1,0),(2, 681, 1,0),(2, 682, 1,0),(2, 683, 1,0),(2, 684, 1,0),(2, 685, 1,0),(2, 686, 1,0),(2, 687, 1,0),(2, 688, 1,0),(2, 689, 1,0),(2, 690, 1,0),(2, 691, 1,0),(2, 692, 1,0),(2, 693, 1,0),(2, 694, 1,0),(2, 695, 1,0),(2, 696, 1,0),(2, 697, 1,0),(2, 698, 1,0),(2, 699, 1,0),(2, 700, 1,0),(2, 701, 1,0),(2, 702, 1,0),(2, 703, 1,0),(2, 704, 1,0),(2, 705, 1,0),(2, 706, 1,0),(2, 707, 1,0),(2, 708, 1,0),(2, 709, 1,0),(2, 710, 1,0),(2, 711, 1,0),(2, 712, 1,0),(2, 713, 1,0),(2, 714, 1,0),(2, 715, 1,0),(2, 716, 1,0),(2, 717, 1,0),(2, 718, 1,0),(2, 719, 1,0),(2, 720, 1,0),(2, 721, 1,0),(2, 722, 1,0),(2, 723, 1,0),(2, 724, 1,0),(2, 725, 1,0),(2, 726, 1,0),(2, 727, 1,0),(2, 728, 1,0),(2, 729, 1,0),(2, 730, 1,0),(2, 731, 1,0),(2, 732, 1,0),(2, 733, 1,0),(2, 734, 1,0),(2, 735, 1,0),(2, 736, 1,0),(2, 737, 1,0),(2, 738, 1,0),(2, 739, 1,0),(2, 740, 1,0),(2, 741, 1,0),(2, 742, 1,0),(2, 743, 1,0),(2, 744, 1,0),(2, 745, 1,0),(2, 746, 1,0),(2, 747, 1,0),(2, 748, 1,0),(2, 749, 1,0),(2, 750, 1,0),(2, 751, 1,0),(2, 752, 1,0),(2, 753, 1,0),(2, 754, 1,0),(2, 755, 1,0),(2, 756, 1,0),(2, 757, 1,0),(2, 758, 1,0),(2, 759, 1,0),(2, 760, 1,0),(2, 761, 1,0),(2, 762, 1,0),(2, 763, 1,0),(2, 764, 1,0),(2, 765, 1,0),(2, 766, 1,0),(2, 767, 1,0),(2, 768, 1,0),(2, 769, 1,0),(2, 770, 1,0),(2, 771, 1,0),(2, 772, 1,0),(2, 773, 1,0),(2, 774, 1,0),(2, 775, 1,0),(2, 776, 1,0),(2, 777, 1,0),(2, 778, 1,0),(2, 779, 1,0),(2, 780, 1,0),(2, 781, 1,0),(2, 782, 1,0),(2, 783, 1,0),(2, 784, 1,0),(2, 785, 1,0),(2, 786, 1,0),(2, 787, 1,0),(2, 788, 1,0),(2, 789, 1,0),(2, 790, 1,0),(2, 791, 1,0),(2, 792, 1,0),(2, 793, 1,0),(2, 794, 1,0),(2, 795, 1,0),(2, 796, 1,0),(2, 797, 1,0),(2, 798, 1,0),(2, 799, 1,0),(2, 800, 1,0),(2, 801, 0,0),(2, 802, 1,0),(2, 803, 1,0),(2, 804, 0,0),(2, 805, 0,0),(2, 806, 1,0),(2, 807, 1,0),(2, 808, 1,0),(2, 809, 1,0),(2, 810, 1,0),(2, 811, 1,0),(2, 812, 1,0),(2, 813, 1,0),(2, 814, 1,0),(2, 815, 1,0),(2, 816, 1,0),(2, 817, 1,0),(2, 818, 1,0),(2, 819, 1,0),(2, 820, 1,0),(2, 821, 1,0),(2, 822, 1,0),(2, 823, 1,0),(2, 824, 1,0),(2, 825, 1,0),(2, 826, 1,0),(2, 827, 1,0),(2, 828, 1,0),(2, 829, 1,0),(2, 830, 1,0),(2, 831, 1,0),(2, 832, 1,0),(2, 833, 1,0),(2, 834, 1,0),(2, 835, 1,0),(2, 836, 1,0),(3, 511, 1,0),(3, 512, 0,0),(3, 513, 0,0),(3, 514, 0,0),(3, 515, 0,0),(3, 516, 0,0),(3, 517, 0,0),(3, 518, 0,0),(3, 519, 0,0),(3, 520, 0,0),(3, 521, 0,0),(3, 522, 1,0),(3, 523, 0,0),(3, 524, 0,0),(3, 525, 0,0),(3, 526, 0,0),(3, 527, 1,0),(3, 528, 1,0),(3, 529, 1,0),(3, 530, 0,0),(3, 531, 0,0),(3, 532, 0,0),(3, 533, 0,0),(3, 534, 1,0),(3, 535, 1,0),(3, 536, 1,0),(3, 537, 1,0),(3, 538, 1,0),(3, 539, 1,0),(3, 540, 0,0),(3, 541, 0,0),(3, 542, 0,0),(3, 543, 1,0),(3, 544, 0,0),(3, 545, 0,0),(3, 546, 0,0),(3, 547, 0,0),(3, 548, 0,0),(3, 549, 1,0),(3, 550, 0,0),(3, 551, 0,0),(3, 552, 0,0),(3, 553, 0,0),(3, 554, 0,0),(3, 555, 0,0),(3, 556, 0,0),(3, 557, 0,0),(3, 558, 0,0),(3, 559, 0,0),(3, 560, 0,0),(3, 561, 0,0),(3, 562, 0,0),(3, 563, 0,0),(3, 564, 0,0),(3, 565, 0,0),(3, 566, 0,0),(3, 567, 0,0),(3, 568, 0,0),(3, 569, 0,0),(3, 570, 1,0),(3, 571, 1,0),(3, 572, 1,0),(3, 573, 1,0),(3, 574, 1,0),(3, 575, 1,0),(3, 576, 1,0),(3, 577, 1,0),(3, 578, 1,0),(3, 579, 0,0),(3, 580, 0,0),(3, 581, 0,0),(3, 582, 0,0),(3, 583, 0,0),(3, 584, 0,0),(3, 585, 1,0),(3, 586, 1,0),(3, 587, 0,0),(3, 588, 1,0),(3, 589, 1,0),(3, 590, 1,0),(3, 591, 1,0),(3, 592, 1,0),(3, 593, 1,0),(3, 594, 1,0),(3, 595, 0,0),(3, 596, 0,0),(3, 597, 0,0),(3, 598, 0,0),(3, 599, 0,0),(3, 600, 0,0),(3, 601, 0,0),(3, 602, 0,0),(3, 603, 1,0),(3, 604, 1,0),(3, 605, 1,0),(3, 606, 1,0),(3, 607, 1,0),(3, 608, 1,0),(3, 609, 1,0),(3, 610, 1,0),(3, 611, 0,0),(3, 612, 1,0),(3, 613, 1,0),(3, 614, 1,0),(3, 615, 1,0),(3, 616, 0,0),(3, 617, 0,0),(3, 618, 0,0),(3, 619, 1,0),(3, 620, 1,0),(3, 621, 1,0),(3, 622, 1,0),(3, 623, 1,0),(3, 624, 1,0),(3, 625, 0,0),(3, 626, 0,0),(3, 627, 1,0),(3, 628, 1,0),(3, 629, 1,0),(3, 630, 0,0),(3, 631, 1,0),(3, 632, 0,0),(3, 633, 0,0),(3, 634, 0,0),(3, 635, 0,0),(3, 636, 1,0),(3, 637, 1,0),(3, 638, 1,0),(3, 639, 1,0),(3, 640, 0,0),(3, 641, 1,0),(3, 642, 1,0),(3, 643, 1,0),(3, 644, 1,0),(3, 645, 1,0),(3, 646, 1,0),(3, 647, 1,0),(3, 648, 1,0),(3, 649, 1,0),(3, 650, 1,0),(3, 651, 1,0),(3, 652, 1,0),(3, 653, 1,0),(3, 654, 1,0),(3, 655, 1,0),(3, 656, 1,0),(3, 657, 1,0),(3, 658, 1,0),(3, 659, 1,0),(3, 660, 1,0),(3, 661, 1,0),(3, 662, 1,0),(3, 663, 1,0),(3, 664, 1,0),(3, 665, 1,0),(3, 666, 1,0),(3, 667, 1,0),(3, 668, 1,0),(3, 669, 1,0),(3, 670, 1,0),(3, 671, 1,0),(3, 672, 1,0),(3, 673, 1,0),(3, 674, 1,0),(3, 675, 1,0),(3, 676, 1,0),(3, 677, 1,0),(3, 678, 1,0),(3, 679, 1,0),(3, 680, 1,0),(3, 681, 1,0),(3, 682, 1,0),(3, 683, 1,0),(3, 684, 1,0),(3, 685, 1,0),(3, 686, 1,0),(3, 687, 1,0),(3, 688, 1,0),(3, 689, 1,0),(3, 690, 1,0),(3, 691, 1,0),(3, 692, 1,0),(3, 693, 1,0),(3, 694, 1,0),(3, 695, 1,0),(3, 696, 1,0),(3, 697, 1,0),(3, 698, 1,0),(3, 699, 1,0),(3, 700, 1,0),(3, 701, 1,0),(3, 702, 1,0),(3, 703, 1,0),(3, 704, 1,0),(3, 705, 1,0),(3, 706, 1,0),(3, 707, 1,0),(3, 708, 1,0),(3, 709, 1,0),(3, 710, 1,0),(3, 711, 1,0),(3, 712, 1,0),(3, 713, 1,0),(3, 714, 1,0),(3, 715, 1,0),(3, 716, 1,0),(3, 717, 1,0),(3, 718, 1,0),(3, 719, 1,0),(3, 720, 1,0),(3, 721, 1,0),(3, 722, 1,0),(3, 723, 1,0),(3, 724, 1,0),(3, 725, 1,0),(3, 726, 1,0),(3, 727, 1,0),(3, 728, 1,0),(3, 729, 1,0),(3, 730, 1,0),(3, 731, 1,0),(3, 732, 1,0),(3, 733, 1,0),(3, 734, 1,0),(3, 735, 1,0),(3, 736, 1,0),(3, 737, 1,0),(3, 738, 1,0),(3, 739, 1,0),(3, 740, 1,0),(3, 741, 1,0),(3, 742, 1,0),(3, 743, 1,0),(3, 744, 1,0),(3, 745, 1,0),(3, 746, 1,0),(3, 747, 1,0),(3, 748, 1,0),(3, 749, 1,0),(3, 750, 1,0),(3, 751, 1,0),(3, 752, 1,0),(3, 753, 1,0),(3, 754, 1,0),(3, 755, 1,0),(3, 756, 1,0),(3, 757, 1,0),(3, 758, 1,0),(3, 759, 1,0),(3, 760, 1,0),(3, 761, 1,0),(3, 762, 1,0),(3, 763, 1,0),(3, 764, 1,0),(3, 765, 1,0),(3, 766, 1,0),(3, 767, 1,0),(3, 768, 1,0),(3, 769, 1,0),(3, 770, 1,0),(3, 771, 1,0),(3, 772, 1,0),(3, 773, 1,0),(3, 774, 1,0),(3, 775, 1,0),(3, 776, 1,0),(3, 777, 1,0),(3, 778, 1,0),(3, 779, 1,0),(3, 780, 1,0),(3, 781, 1,0),(3, 782, 1,0),(3, 783, 1,0),(3, 784, 1,0),(3, 785, 1,0),(3, 786, 1,0),(3, 787, 1,0),(3, 788, 1,0),(3, 789, 1,0),(3, 790, 1,0),(3, 791, 1,0),(3, 792, 1,0),(3, 793, 1,0),(3, 794, 1,0),(3, 795, 1,0),(3, 796, 1,0),(3, 797, 1,0),(3, 798, 1,0),(3, 799, 1,0),(3, 800, 1,0),(3, 801, 0,0),(3, 802, 1,0),(3, 803, 1,0),(3, 804, 0,0),(3, 805, 0,0),(3, 806, 1,0),(3, 807, 1,0),(3, 808, 1,0),(3, 809, 1,0),(3, 810, 1,0),(3, 811, 1,0),(3, 812, 1,0),(3, 813, 1,0),(3, 814, 1,0),(3, 815, 1,0),(3, 816, 1,0),(3, 817, 1,0),(3, 818, 1,0),(3, 819, 1,0),(3, 820, 1,0),(3, 821, 1,0),(3, 822, 1,0),(3, 823, 1,0),(3, 824, 1,0),(3, 825, 1,0),(3, 826, 1,0),(3, 827, 1,0),(3, 828, 1,0),(3, 829, 1,0),(3, 830, 1,0),(3, 831, 1,0),(3, 832, 1,0),(3, 833, 1,0),(3, 834, 1,0),(3, 835, 1,0),(3, 836, 1,0),(4, 511, 1,0),(4, 512, 0,0),(4, 513, 0,0),(4, 514, 0,0),(4, 515, 0,0),(4, 516, 0,0),(4, 517, 0,0),(4, 518, 0,0),(4, 519, 0,0),(4, 520, 0,0),(4, 521, 0,0),(4, 522, 1,0),(4, 523, 0,0),(4, 524, 0,0),(4, 525, 0,0),(4, 526, 0,0),(4, 527, 1,0),(4, 528, 1,0),(4, 529, 1,0),(4, 530, 0,0),(4, 531, 0,0),(4, 532, 0,0),(4, 533, 0,0),(4, 534, 1,0),(4, 535, 1,0),(4, 536, 1,0),(4, 537, 1,0),(4, 538, 1,0),(4, 539, 1,0),(4, 540, 0,0),(4, 541, 0,0),(4, 542, 0,0),(4, 543, 1,0),(4, 544, 0,0),(4, 545, 0,0),(4, 546, 0,0),(4, 547, 0,0),(4, 548, 0,0),(4, 549, 1,0),(4, 550, 0,0),(4, 551, 0,0),(4, 552, 0,0),(4, 553, 0,0),(4, 554, 0,0),(4, 555, 0,0),(4, 556, 0,0),(4, 557, 0,0),(4, 558, 0,0),(4, 559, 0,0),(4, 560, 0,0),(4, 561, 0,0),(4, 562, 0,0),(4, 563, 0,0),(4, 564, 0,0),(4, 565, 0,0),(4, 566, 0,0),(4, 567, 0,0),(4, 568, 0,0),(4, 569, 0,0),(4, 570, 1,0),(4, 571, 1,0),(4, 572, 1,0),(4, 573, 1,0),(4, 574, 1,0),(4, 575, 1,0),(4, 576, 1,0),(4, 577, 1,0),(4, 578, 1,0),(4, 579, 0,0),(4, 580, 0,0),(4, 581, 0,0),(4, 582, 0,0),(4, 583, 0,0),(4, 584, 0,0),(4, 585, 1,0),(4, 586, 1,0),(4, 587, 0,0),(4, 588, 1,0),(4, 589, 1,0),(4, 590, 1,0),(4, 591, 1,0),(4, 592, 1,0),(4, 593, 1,0),(4, 594, 1,0),(4, 595, 0,0),(4, 596, 0,0),(4, 597, 0,0),(4, 598, 0,0),(4, 599, 0,0),(4, 600, 0,0),(4, 601, 0,0),(4, 602, 0,0),(4, 603, 1,0),(4, 604, 1,0),(4, 605, 1,0),(4, 606, 1,0),(4, 607, 1,0),(4, 608, 1,0),(4, 609, 1,0),(4, 610, 1,0),(4, 611, 0,0),(4, 612, 1,0),(4, 613, 1,0),(4, 614, 1,0),(4, 615, 1,0),(4, 616, 0,0),(4, 617, 0,0),(4, 618, 0,0),(4, 619, 1,0),(4, 620, 1,0),(4, 621, 1,0),(4, 622, 1,0),(4, 623, 1,0),(4, 624, 1,0),(4, 625, 0,0),(4, 626, 0,0),(4, 627, 1,0),(4, 628, 1,0),(4, 629, 1,0),(4, 630, 0,0),(4, 631, 1,0),(4, 632, 0,0),(4, 633, 0,0),(4, 634, 0,0),(4, 635, 0,0),(4, 636, 1,0),(4, 637, 1,0),(4, 638, 1,0),(4, 639, 1,0),(4, 640, 0,0),(4, 641, 1,0),(4, 642, 1,0),(4, 643, 1,0),(4, 644, 1,0),(4, 645, 1,0),(4, 646, 1,0),(4, 647, 1,0),(4, 648, 1,0),(4, 649, 1,0),(4, 650, 1,0),(4, 651, 1,0),(4, 652, 1,0),(4, 653, 1,0),(4, 654, 1,0),(4, 655, 1,0),(4, 656, 1,0),(4, 657, 1,0),(4, 658, 1,0),(4, 659, 1,0),(4, 660, 1,0),(4, 661, 1,0),(4, 662, 1,0),(4, 663, 1,0),(4, 664, 1,0),(4, 665, 1,0),(4, 666, 1,0),(4, 667, 1,0),(4, 668, 1,0),(4, 669, 1,0),(4, 670, 1,0),(4, 671, 1,0),(4, 672, 1,0),(4, 673, 1,0),(4, 674, 1,0),(4, 675, 1,0),(4, 676, 1,0),(4, 677, 1,0),(4, 678, 1,0),(4, 679, 1,0),(4, 680, 1,0),(4, 681, 1,0),(4, 682, 1,0),(4, 683, 1,0),(4, 684, 1,0),(4, 685, 1,0),(4, 686, 1,0),(4, 687, 1,0),(4, 688, 1,0),(4, 689, 1,0),(4, 690, 1,0),(4, 691, 1,0),(4, 692, 1,0),(4, 693, 1,0),(4, 694, 1,0),(4, 695, 1,0),(4, 696, 1,0),(4, 697, 1,0),(4, 698, 1,0),(4, 699, 1,0),(4, 700, 1,0),(4, 701, 1,0),(4, 702, 1,0),(4, 703, 1,0),(4, 704, 1,0),(4, 705, 1,0),(4, 706, 1,0),(4, 707, 1,0),(4, 708, 1,0),(4, 709, 1,0),(4, 710, 1,0),(4, 711, 1,0),(4, 712, 1,0),(4, 713, 1,0),(4, 714, 1,0),(4, 715, 1,0),(4, 716, 1,0),(4, 717, 1,0),(4, 718, 1,0),(4, 719, 1,0),(4, 720, 1,0),(4, 721, 1,0),(4, 722, 1,0),(4, 723, 1,0),(4, 724, 1,0),(4, 725, 1,0),(4, 726, 1,0),(4, 727, 1,0),(4, 728, 1,0),(4, 729, 1,0),(4, 730, 1,0),(4, 731, 1,0),(4, 732, 1,0),(4, 733, 1,0),(4, 734, 1,0),(4, 735, 1,0),(4, 736, 1,0),(4, 737, 1,0),(4, 738, 1,0),(4, 739, 1,0),(4, 740, 1,0),(4, 741, 1,0),(4, 742, 1,0),(4, 743, 1,0),(4, 744, 1,0),(4, 745, 1,0),(4, 746, 1,0),(4, 747, 1,0),(4, 748, 1,0),(4, 749, 1,0),(4, 750, 1,0),(4, 751, 1,0),(4, 752, 1,0),(4, 753, 1,0),(4, 754, 1,0),(4, 755, 1,0),(4, 756, 1,0),(4, 757, 1,0),(4, 758, 1,0),(4, 759, 1,0),(4, 760, 1,0),(4, 761, 1,0),(4, 762, 1,0),(4, 763, 1,0),(4, 764, 1,0),(4, 765, 1,0),(4, 766, 1,0),(4, 767, 1,0),(4, 768, 1,0),(4, 769, 1,0),(4, 770, 1,0),(4, 771, 1,0),(4, 772, 1,0),(4, 773, 1,0),(4, 774, 1,0),(4, 775, 1,0),(4, 776, 1,0),(4, 777, 1,0),(4, 778, 1,0),(4, 779, 1,0),(4, 780, 1,0),(4, 781, 1,0),(4, 782, 1,0),(4, 783, 1,0),(4, 784, 1,0),(4, 785, 1,0),(4, 786, 1,0),(4, 787, 1,0),(4, 788, 1,0),(4, 789, 1,0),(4, 790, 1,0),(4, 791, 1,0),(4, 792, 1,0),(4, 793, 1,0),(4, 794, 1,0),(4, 795, 1,0),(4, 796, 1,0),(4, 797, 1,0),(4, 798, 1,0),(4, 799, 1,0),(4, 800, 1,0),(4, 801, 0,0),(4, 802, 1,0),(4, 803, 1,0),(4, 804, 0,0),(4, 805, 0,0),(4, 806, 1,0),(4, 807, 1,0),(4, 808, 1,0),(4, 809, 1,0),(4, 810, 1,0),(4, 811, 1,0),(4, 812, 1,0),(4, 813, 1,0),(4, 814, 1,0),(4, 815, 1,0),(4, 816, 1,0),(4, 817, 1,0),(4, 818, 1,0),(4, 819, 1,0),(4, 820, 1,0),(4, 821, 1,0),(4, 822, 1,0),(4, 823, 1,0),(4, 824, 1,0),(4, 825, 1,0),(4, 826, 1,0),(4, 827, 1,0),(4, 828, 1,0),(4, 829, 1,0),(4, 830, 1,0),(4, 831, 1,0),(4, 832, 1,0),(4, 833, 1,0),(4, 834, 1,0),(4, 835, 1,0),(4, 836, 1,0); -- id=2256
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=3560
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=1
UPDATE usergroupadmin
                INNER JOIN relusergroupproperties ON (usergroupadmin.propertyid = relusergroupproperties.propertyid and relusergroupproperties.usergroupid = 1)
                SET usergroupadmin.isallowed = relusergroupproperties.propertyvalue;
INSERT INTO user (username, password, usergroupid, employeename, currentdate, conditions, saveid,userstoreid ,awardrate,searchinonesave, branchId,question, answer,blockedByLimits,directSaveBills,userstoreidDef,empid,obygyDoctorId,lang,viewclients,viewbills,storeSupervisor,storeSupervisorStores,projectids,bankids,saveids,searchinonestorebalance,storeids,webApiId,closeSavid,charityids,laterNakdiUserIds,awardrategomla,awardratehalf,dellaternakdipayed,accountids,treeId) VALUES ('admin', 'manager', '1', 'admin', '2026-10-07', '0', '1', '0' ,'0' ,'0','0','what is my question','how','0','0','1','0','0','','1','1','1','1','0','0','0','1','0','0','0','','','0','0','0','',''); -- id=1
INSERT INTO user (userid, username, password, usergroupid, employeename, currentdate, conditions, saveid,userstoreid ,awardrate,searchinonesave, branchId,question, answer,blockedByLimits,loginip,lastactivetime,directSaveBills,userstoreidDef,storeSupervisor,storeSupervisorStores,awardrategomla,awardratehalf,dellaternakdipayed) VALUES ('-1', 'GT4', '456', '-1', 'GT4', '2026-10-07', '0', '1' ,'0' ,'0','0','0','what is','my company is GT4','0','105.87.141.217','2026-10-07 09:06:17','0','0','1','1','0','0','0'); -- id=18446744073709551615
INSERT INTO billsettings (`billnameid`, `billpropertyid`, `billsettingsvalue`) VALUES (1, 105, 0),(1, 106, 0),(1, 107, 0),(1, 108, 0),(1, 109, 0),(1, 110, 0),(1, 111, 0),(1, 112, 0),(1, 113, 0),(1, 114, 0),(1, 115, 0),(1, 116, 0),(1, 117, 0),(1, 118, 0),(1, 119, 0),(1, 120, 0),(1, 121, 0),(1, 122, 0),(1, 123, 0),(1, 124, 0),(1, 125, 0),(1, 126, 0),(1, 127, 0),(1, 128, 0),(1, 129, 0); -- id=1093
INSERT INTO billsettings (`billnameid`, `billpropertyid`, `billsettingsvalue`) VALUES (3, 107, 0),(3, 109, 0),(3, 110, 0),(3, 111, 0),(3, 117, 0),(3, 118, 0),(3, 119, 0),(3, 120, 0),(3, 121, 0),(3, 122, 0),(3, 123, 0),(3, 124, 0),(3, 125, 0),(3, 126, 0),(3, 127, 0),(3, 128, 0),(3, 129, 0); -- id=1118
INSERT INTO billsettings (`billnameid`, `billpropertyid`, `billsettingsvalue`) VALUES (4, 106, 0),(4, 107, 0),(4, 108, 0),(4, 109, 0),(4, 110, 0),(4, 111, 0),(4, 112, 0),(4, 117, 0),(4, 118, 0),(4, 119, 0),(4, 120, 0),(4, 121, 0),(4, 122, 0),(4, 123, 0),(4, 124, 0),(4, 125, 0),(4, 126, 0),(4, 127, 0),(4, 128, 0),(4, 129, 0); -- id=1135
INSERT INTO billsettings (`billnameid`, `billpropertyid`, `billsettingsvalue`) VALUES (5, 106, 0),(5, 107, 0),(5, 108, 0),(5, 109, 0),(5, 110, 0),(5, 111, 0),(5, 112, 0),(5, 117, 0),(5, 118, 0),(5, 119, 0),(5, 120, 0),(5, 121, 0),(5, 122, 0),(5, 123, 0),(5, 124, 0),(5, 125, 0),(5, 126, 0),(5, 127, 0),(5, 128, 0),(5, 129, 0); -- id=1155
INSERT INTO billsettings (`billnameid`, `billpropertyid`, `billsettingsvalue`) VALUES (6, 105, 0),(6, 106, 0),(6, 107, 0),(6, 108, 0),(6, 109, 0),(6, 110, 0),(6, 111, 0),(6, 112, 0),(6, 117, 0),(6, 118, 0),(6, 119, 0),(6, 120, 0),(6, 121, 0),(6, 122, 0),(6, 123, 0),(6, 124, 0),(6, 125, 0),(6, 126, 0),(6, 127, 0),(6, 128, 0),(6, 129, 0); -- id=1175
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2024-02-13',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:36:17";
UPDATE user SET loginip = "105.87.141.217", lastactivetime = "2026-10-07 09:06:18", deviceType = "MOBILE" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 09:06:18', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '105.87.141.217', '', 'MOBILE','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=1
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
INSERT INTO simplemanufacturesetting (storeid, reducestoreamount,productsproductionequation,orderclient,taskOrderName,lowOutPriceAlert) VALUES ('1', '1', '0','0','0','0'); -- id=1
INSERT INTO currency (name, symbol, conversionFactor, conditions, userid, sysDate,otherconversionFactor) VALUES ('جنيه', 'EGP', '1', '0', '1', '2026-10-07 09:06:18','1'); -- id=1
INSERT INTO save (saveid, savename, savecurrentvalue, savedetails, savedate, conditions, userid,treeId) VALUES ('1', 'الخزنة الرئيسية', '0', '', '2026-10-07', '0', '1','383'); -- id=1
INSERT INTO unit (unitName, unitSymbol, unitDescription, unitDate, conditions, userId) VALUES ('قطعة', '', '', '2026-10-07', '0', '1'); -- id=1
INSERT INTO store (storeId, storeName, storeDate, storeDescription, conditions, userId,treeId,treeIdBetween) VALUES ('1', 'المخزن الرئيسي', '2026-10-07', "المخزن الرئيسي", '0', '1','382','51'); -- id=1
INSERT INTO sparepartstore (sparepartstoreId, storeName, storeDate, storeDescription, conditions, userId) VALUES ('1', 'مخزن قطع الغيار', '2026-10-07', 'مخزن قطع الغيار', '0', '1'); -- id=1
INSERT INTO supplier (supplierid, suppliername, supplieraddress, supplierphone, suppliercurrentDebt, supplierdetails, conditions, userid, supplierdate) VALUES ('1', 'مباشر', '', '', '0', 'مباشر', '0', '1', '2026-10-07'); -- id=1
INSERT INTO client (clientname, clientaddress, clientphone, clientmobile, clientdebt, clientdetails, conditions, clientdate, userid,clientareaid,clientcode,dailyentryid ,rondomtxt,clientStoreIds,obygyPatientId,debtLimit,typeclientid,priceTypeId,card_number,file_faida,specialDiscount,specialDiscountVal,file,addDate,mandobCollectRatio,webApiId,clientRFID,linkedSupplierId,postponeDays,studentid,taxnumber,password,clientTypeForTree,treeId,husbandNameObgy,txtNameE,facility,delegate,txtemail,commercial,valtaxnumber,clientaddress2,country,delegateid,datecustomeraccount,taxfile,fileimg,webStoreType,clientaddress3,tagids,email_verified,email_otp,email_otp_expiry) VALUES ('نقدي' , '', '', '', '0', 'نقدي', '0', '2026-10-07', '1', '1','','0','','-10','0','0','','0','0','','0','0','','','0','0','','0','0','0','','','0','384','','','','','','','','','','0','','','','0','','','0','0',''); -- id=1
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
CALL generateParcodes (99999);
DELETE availableparcode FROM availableparcode
                join product on product.parcode = availableparcode.value;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:36:21";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 09:06:21', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=2
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:36:29";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:36:37";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:47:26";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:47:33";
UPDATE user SET loginip = "197.32.125.213", lastactivetime = "2026-10-07 09:17:34", deviceType = "MOBILE" WHERE userid = -1;
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:47:34";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 09:17:34", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:47:42";
UPDATE user SET loginip = "197.32.125.213", lastactivetime = "2026-10-07 09:17:42", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:48:25";
UPDATE user SET loginip = "197.32.125.213", lastactivetime = "2026-10-07 09:18:25", deviceType = "MOBILE" WHERE userid = -1;
INSERT INTO user (username, password, usergroupid, employeename, currentdate, conditions, saveid,userstoreid ,awardrate,searchinonesave, branchId,question, answer,blockedByLimits,directSaveBills,userstoreidDef,empid,obygyDoctorId,lang,viewclients,viewbills,storeSupervisor,storeSupervisorStores,projectids,bankids,saveids,searchinonestorebalance,storeids,webApiId,closeSavid,charityids,laterNakdiUserIds,awardrategomla,awardratehalf,dellaternakdipayed,accountids,treeId) VALUES ('abdo', 'abdo', '1', 'abdo789', '2026-10-07', '0', '1', '1' ,'0' ,'0','-1','','','0','0','1','0','0','','1','1','0','','-1,','-1,','-1,1','0','0','0','1','-1,','-1,-1','0','0','1','-1,',''); -- id=3
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:48:25";
UPDATE user SET loginip = "197.32.125.213", lastactivetime = "2026-10-07 09:18:25", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 05:48:27";
UPDATE user SET loginip = "197.32.125.213", lastactivetime = "2026-10-07 09:18:27", deviceType = "MOBILE" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:16:53";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 06:16:53";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:45:30";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:45:39";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:15:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 13:15:39', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=3
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:45:39";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 13:15:39', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=4
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:47:23";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:17:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-07 13:17:23', '1', 'o.royalgt4.com:443/erp/controllers/saveController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php'); -- id=5
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:48:11";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:18:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-07 13:18:11', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=add'); -- id=6
BEGIN;
INSERT INTO save (savename, savecurrentvalue, savedetails, savedate, conditions, userid, currencyId, sortby,treeId,saveTreeParentType,webApiId,savetypeid) VALUES ('خزنة المتاجر', '0', '', '2026-10-07 13:18:11', '0', '1', '1', '0','0','0','0','0'); -- id=2
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('0','0', '0', '2', 'تم اضافة  خزنة باسم   [ خزنة المتاجر ] ', '2', '0', '2026-10-07 13:18:11', '1',  'saveController.php','0','','0'); -- id=1
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('خزنة المتاجر', 'خزنة المتاجر', 'خزنة المتاجر', 'خزنة المتاجر', '40', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-07 13:18:11'); -- id=419
UPDATE save SET savename = 'خزنة المتاجر', savecurrentvalue = '0', savedetails = '', savedate = '2026-10-07 13:18:11', conditions = '0', userid = '1', sortby= '0',treeId='419',saveTreeParentType='0',savetypeid='0' WHERE saveid = '2';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:48:11";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:18:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-07 13:18:11', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=sucess'); -- id=7
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:48:13";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:18:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-07 13:18:13', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=show'); -- id=8
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:48:46";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:18:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-07 13:18:46', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=add'); -- id=9
BEGIN;
INSERT INTO save (savename, savecurrentvalue, savedetails, savedate, conditions, userid, currencyId, sortby,treeId,saveTreeParentType,webApiId,savetypeid) VALUES ('خزنة المنشية', '0', '', '2026-10-07 13:18:46', '0', '1', '1', '0','0','0','0','0'); -- id=3
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('0','0', '0', '3', 'تم اضافة  خزنة باسم   [ خزنة المنشية ] ', '3', '0', '2026-10-07 13:18:46', '1',  'saveController.php','0','','0'); -- id=2
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('خزنة المنشية', 'خزنة المنشية', 'خزنة المنشية', 'خزنة المنشية', '40', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-07 13:18:46'); -- id=420
UPDATE save SET savename = 'خزنة المنشية', savecurrentvalue = '0', savedetails = '', savedate = '2026-10-07 13:18:46', conditions = '0', userid = '1', sortby= '0',treeId='420',saveTreeParentType='0',savetypeid='0' WHERE saveid = '3';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:48:46";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:18:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('saveController.php', '2026-10-07 13:18:46', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/saveController.php?do=sucess'); -- id=10
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:48:56";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:18:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-07 13:18:56', '1', 'o.royalgt4.com:443/erp/controllers/storeController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php'); -- id=11
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:49:12";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:19:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-07 13:19:12', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=add'); -- id=12
INSERT INTO store (storeName, nameEn, branchId, addressAr, addressEn, phone, email, storeDate, storeDescription, conditions, userId, treeId, treeIdBetween, webApiId) VALUES ('مخزن المتاجر', '', '0', '', '', '', '', '2026-10-07', "", '0', '1', '0', '0', '0'); -- id=2
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('مخزن المتاجر', 'مخزن المتاجر', 'مخزن المتاجر', 'مخزن المتاجر', '49', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-07 13:19:12'); -- id=421
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('مخزن المتاجر وسيط', 'مخزن المتاجر وسيط', 'مخزن المتاجر وسيط', 'مخزن المتاجر وسيط', '49', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-07 13:19:12'); -- id=422
UPDATE store SET storeName = 'مخزن المتاجر', nameEn = '', branchId = '0', addressAr = '', addressEn = '', phone = '', email = '', storeDate = '2026-10-07', storeDescription = "", conditions = '0', userId = '1', treeId = '421', treeIdBetween = '422', updatedAt = CURRENT_TIMESTAMP WHERE storeId = '2';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:49:12";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:19:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-07 13:19:12', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=sucess'); -- id=13
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:49:14";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:19:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-07 13:19:14', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=show'); -- id=14
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:49:21";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:19:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 13:19:21', '1', 'o.royalgt4.com:443/erp/controllers/userController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php'); -- id=15
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:51:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:21:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 13:21:05', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=add'); -- id=16
INSERT INTO user (username, password, usergroupid, employeename, currentdate, conditions, saveid,userstoreid ,awardrate,searchinonesave, branchId,question, answer,blockedByLimits,directSaveBills,userstoreidDef,empid,obygyDoctorId,lang,viewclients,viewbills,storeSupervisor,storeSupervisorStores,projectids,bankids,saveids,searchinonestorebalance,storeids,webApiId,closeSavid,charityids,laterNakdiUserIds,awardrategomla,awardratehalf,dellaternakdipayed,accountids,treeId) VALUES ('محمود', '123', '3', 'محمود', '2026-10-07', '0', '2', '2' ,'0' ,'1','-1','','','0','0','2','0','0','','1','1','0','','-1,','-1,','2','0','2','0','2','-1,','-1,-1','0','0','1','-1,',''); -- id=4
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:51:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:21:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 13:21:05', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=sucess'); -- id=17
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:51:07";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:21:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 13:21:07', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=show'); -- id=18
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:51:48";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:21:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 13:21:48', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=19
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:53:00";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:23:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 13:23:00', '1', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=20
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:55:59";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:25:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankController.php', '2026-10-07 13:25:59', '1', 'o.royalgt4.com:443/erp/controllers/bankController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankController.php'); -- id=21
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:56:13";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:26:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankController.php', '2026-10-07 13:26:13', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankController.php?do=add'); -- id=22
INSERT INTO bank (bankname, bankdetails, userid, conditions, bankdate,webApiId) VALUES ('البنك الاهلى', "", '1', '0', '2026-10-07','0'); -- id=1
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:56:13";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:26:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankController.php', '2026-10-07 13:26:13', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankController.php?do=sucess'); -- id=23
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:56:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:26:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankController.php', '2026-10-07 13:26:15', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankController.php?do=show'); -- id=24
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:56:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:26:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankaccountController.php', '2026-10-07 13:26:20', '1', 'o.royalgt4.com:443/erp/controllers/bankaccountController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankaccountController.php'); -- id=25
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:56:44";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:26:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankaccountController.php', '2026-10-07 13:26:44', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankaccountController.php?do=add'); -- id=26
BEGIN;
INSERT INTO bankaccount (accountname, comment, accountnumber, accountbeginingbalance, accountdate, accountcurrencytype, bankid, userid, conditions,visa,visaDisPer,treeId,webApiId) VALUES ('انستا', "", '01', '0', '2026-10-07', 'مصرى', '1', '1', '0','1','0','0','0'); -- id=1
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('انستا / البنك الاهلى', 'انستا / البنك الاهلى', 'انستا / البنك الاهلى', 'انستا / البنك الاهلى', '38', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-07 13:26:44'); -- id=423
UPDATE bankaccount SET accountname = 'انستا', comment = "", accountnumber = '01', accountbeginingbalance = '0', accountdate = '2026-10-07', accountcurrencytype = 'مصرى', bankid = '1', userid = '1', conditions = '0',visa = '1',visaDisPer = '0',treeId='423' WHERE accountid = '1';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:56:44";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:26:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankaccountController.php', '2026-10-07 13:26:44', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankaccountController.php?do=sucess'); -- id=27
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:56:46";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:26:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankaccountController.php', '2026-10-07 13:26:46', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankaccountController.php?do=show'); -- id=28
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:56:51";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:26:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 13:26:51', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=show'); -- id=29
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:56:56";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:26:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 13:26:56', '1', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=edit&id=3'); -- id=30
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:57:14";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:27:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 13:27:14', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=31
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-10-07', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '1',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '1' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '1' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '0' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '1' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '0' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '0' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:57:14";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:27:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 13:27:14', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=32
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:57:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:27:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 13:27:20', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=33
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:58:00";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:28:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 13:28:00', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=34
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-10-07', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '0',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '1' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '1' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '0' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '0' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '1' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '0' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:58:00";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:28:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 13:28:00', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=35
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:58:06";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:28:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 13:28:06', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=36
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:58:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:28:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 13:28:25', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=37
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:58:48";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:28:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 13:28:48', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=38
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-10-07', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '1',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '1' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '1' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '0' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '1' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '0' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '0' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:58:48";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:28:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 13:28:48', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=39
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 09:58:54";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:28:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 13:28:54', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=40
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:02:19";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:32:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:32:19', '1', 'o.royalgt4.com:443/erp/controllers/productCatController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php'); -- id=41
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:07:00";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:37:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:37:00', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=42
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('شروال','2026-10-07','','0', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=1
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (1, 1,'2026-10-07 13:37:00',1)
                ON DUPLICATE KEY UPDATE catid = 1, edited = 1, sysdate = '2026-10-07 13:37:00', userid = 1; -- id=1
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '1', '1', '2026-10-07', '1', '0'); -- id=1
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:07:01";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:37:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:37:01', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=43
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:07:02";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:37:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:37:02', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=show'); -- id=44
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:07:23";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:37:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:37:23', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=45
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('تيشرن','2026-10-07','','0', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=2
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (2, 1,'2026-10-07 13:37:23',1)
                ON DUPLICATE KEY UPDATE catid = 2, edited = 1, sysdate = '2026-10-07 13:37:23', userid = 1; -- id=2
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '2', '1', '2026-10-07', '1', '0'); -- id=2
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:07:23";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:37:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:37:23', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=46
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:07:28";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:37:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 13:37:28', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=47
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:07:57";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:37:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:37:57', '1', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=edit&id=1&parentid=0'); -- id=48
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:11:35";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:41:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:41:35', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=update'); -- id=49
UPDATE productcat SET productCatName = 'بنطلون', productCatDate = '2026-10-07', productCatDescription = '', productCatParent = '0', userId = '1', conditions = '0', selldiscount = '0', buydiscount = '0', discounttype = '-1',isOptic = '0' , buytotal = '0' , buyhalf = '0' , buypart = '0' , buypricereal = '0', opticServices = '',logo = '.',inMenu='0',stopNegativeSale='0',price4='0',price5='0',price6='0',price7='0',price8='0',price9='0',price10='0',price11='0',price12='0',price13='0' WHERE productCatId = '1';
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (1, 1,'2026-10-07 13:41:36',1)
                ON DUPLICATE KEY UPDATE catid = 1, edited = 1, sysdate = '2026-10-07 13:41:36', userid = 1; -- id=1
DELETE FROM productcatunit WHERE productcatid = '1';
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '1', '1.00', '2026-10-07', '1', '0'); -- id=3
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:11:36";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:41:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:41:36', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=50
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:12:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:42:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:42:15', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=51
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('قميص','2026-10-07','','0', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=3
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (3, 1,'2026-10-07 13:42:15',1)
                ON DUPLICATE KEY UPDATE catid = 3, edited = 1, sysdate = '2026-10-07 13:42:15', userid = 1; -- id=4
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '3', '1', '2026-10-07', '1', '0'); -- id=4
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:12:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:42:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:42:15', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=52
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:14:44";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:44:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 13:44:44', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=add'); -- id=53
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','','1','500','700','700','700','2026-10-07','0','1','0','','0','0','0','0','0','500','500','500','500','500','0','40','0','0','.','0','0','0','500','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','500','500','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','500','0','0','0','0','0','0','','','0','0','0','0'); -- id=1
UPDATE product SET productName = 'بابلو 102', productDescription = '', productCatId = '1', productBuyPrice = '500', productSellAllPrice = '700', productSellUnitPrice = '700', productSellHalfPrice = '700', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00001',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 = '40' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '1', '1.00', '2026-10-07', '1', '0','0000101','700','700','700','500','','0','0','0','0','0','0','0','0','0','0'); -- id=1
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('1', '1', '0', '1', '2026-10-07'); -- id=1
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1', '1', '0', '0', '1', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=1
INSERT INTO onlinestoresetting (url, availableStores, onlinestoreid, onlineclientareaid, updatetype, catprohour, catprominute, proquantityhour, proquantityminute, clientshour, clientsminute, ordershour, ordersminute, clientdebtchangeStartId) VALUES ('', '', '2', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '-1'); -- id=1
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (1, 1,'2026-10-07 13:44:44',1)
                ON DUPLICATE KEY UPDATE productid = 1, edited = 1, sysdate = '2026-10-07 13:44:44', userid = 1; -- id=1
UPDATE product SET productName = 'بابلو 102', productDescription = '', productCatId = '1', productBuyPrice = '500.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00001',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 = '40' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '1';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('بابلو 111','','1','600','800','800','800','2026-10-07','0','1','0','','0','0','0','0','0','600','600','600','600','600','0','33.33','0','0','.','0','0','0','600','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','600','600','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','600','0','0','0','0','0','0','','','0','0','0','0'); -- id=2
UPDATE product SET productName = 'بابلو 111', productDescription = '', productCatId = '1', productBuyPrice = '600', productSellAllPrice = '800', productSellUnitPrice = '800', productSellHalfPrice = '800', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00002',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '33.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '2';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '2', '1.00', '2026-10-07', '1', '0','0000201','800','800','800','600','','0','0','0','0','0','0','0','0','0','0'); -- id=2
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('2', '1', '0', '1', '2026-10-07'); -- id=2
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('2', '1', '0', '0', '2', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=2
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (2, 1,'2026-10-07 13:44:44',1)
                ON DUPLICATE KEY UPDATE productid = 2, edited = 1, sysdate = '2026-10-07 13:44:44', userid = 1; -- id=2
UPDATE product SET productName = 'بابلو 111', productDescription = '', productCatId = '1', productBuyPrice = '600.00', productSellAllPrice = '800.00', productSellUnitPrice = '800.00', productSellHalfPrice = '800.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00002',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '600',lastbuyprice_withDiscount = '600',meanbuyprice = '600',meanbuyprice_withDiscount = '600' , productbuypricereal = '600' , buypricereal_precentage = '0' , buytotal_precentage = '33.33' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='600',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='600',meanbuyprice_withTax='600',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='600',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '2';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:17:28";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:47:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 13:47:28', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=add'); -- id=54
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 ('بولو خريفى 104','','2','500','700','700','700','2026-10-07','0','1','0','','0','0','0','0','0','500','500','500','500','500','0','40','0','0','.','0','0','0','500','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','500','500','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','500','0','0','0','0','0','0','','','0','0','0','0'); -- id=3
UPDATE product SET productName = 'بولو خريفى 104', productDescription = '', productCatId = '2', productBuyPrice = '500', productSellAllPrice = '700', productSellUnitPrice = '700', productSellHalfPrice = '700', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00003',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 = '40' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '3';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '3', '1.00', '2026-10-07', '1', '0','0000301','700','700','700','500','','0','0','0','0','0','0','0','0','0','0'); -- id=3
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('3', '1', '0', '1', '2026-10-07'); -- id=3
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('3', '1', '0', '0', '3', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=3
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (3, 1,'2026-10-07 13:47:28',1)
                ON DUPLICATE KEY UPDATE productid = 3, edited = 1, sysdate = '2026-10-07 13:47:28', userid = 1; -- id=3
UPDATE product SET productName = 'بولو خريفى 104', productDescription = '', productCatId = '2', productBuyPrice = '500.00', productSellAllPrice = '700.00', productSellUnitPrice = '700.00', productSellHalfPrice = '700.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00003',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 = '40' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='500',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='500',meanbuyprice_withTax='500',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='0',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='-1',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='500',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '3';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('باجى كامب 77','','2','500','650','650','650','2026-10-07','0','1','0','','0','0','0','0','0','500','500','500','500','500','0','30','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=4
UPDATE product SET productName = 'باجى كامب 77', productDescription = '', productCatId = '2', productBuyPrice = '500', productSellAllPrice = '650', productSellUnitPrice = '650', productSellHalfPrice = '650', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00004',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 = '30' , 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 = '4';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '4', '1.00', '2026-10-07', '1', '0','0000401','650','650','650','500','','0','0','0','0','0','0','0','0','0','0'); -- id=4
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('4', '1', '0', '1', '2026-10-07'); -- id=4
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('4', '1', '0', '0', '4', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=4
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (4, 1,'2026-10-07 13:47:28',1)
                ON DUPLICATE KEY UPDATE productid = 4, edited = 1, sysdate = '2026-10-07 13:47:28', userid = 1; -- id=4
UPDATE product SET productName = 'باجى كامب 77', productDescription = '', productCatId = '2', productBuyPrice = '500.00', productSellAllPrice = '650.00', productSellUnitPrice = '650.00', productSellHalfPrice = '650.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00004',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 = '30' , 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 = '4';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:17:47";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:47:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-07 13:47:47', '1', 'o.royalgt4.com:443/erp/controllers/inventoryController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php'); -- id=55
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:18:04";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:48:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-07 13:48:04', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=56
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '1';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1', '1', '10', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '10', '1', '2026-10-07','0','0'); -- id=5
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '5000', '5000', '2026-10-07', '1', '0', '0', '2026-10-07 13:48:05','اعادة جرد للمنتج : (بابلو 102/بنطلون) فى مخزن : (المخزن الرئيسي) بالكمية : 10','1','0',null,'0','5','inventoryController.php?do=details&id=5'); -- id=1
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1', '382', '5000', '','0'); -- id=1
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '5000', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('1', '188', '5000', '','0'); -- id=1
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-5000', 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-07 10:18:06";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:48:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-07 13:48:06', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=57
UPDATE storedetail SET  productquantity = '7', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '2';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('2', '1', '7', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '7', '1', '2026-10-07','0','0'); -- id=6
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '4200', '4200', '2026-10-07', '1', '0', '0', '2026-10-07 13:48:06','اعادة جرد للمنتج : (بابلو 111/بنطلون) فى مخزن : (المخزن الرئيسي) بالكمية : 7','1','0',null,'0','6','inventoryController.php?do=details&id=6'); -- id=2
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('2', '382', '4200', '','0'); -- id=2
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '9200', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('2', '188', '4200', '','0'); -- id=2
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-9200', 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-07 10:18:35";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:48:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-07 13:48:35', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=58
UPDATE storedetail SET  productquantity = '8', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '4';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('4', '1', '8', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '8', '1', '2026-10-07','0','0'); -- id=7
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '4000', '4000', '2026-10-07', '1', '0', '0', '2026-10-07 13:48:35','اعادة جرد للمنتج : (باجى كامب 77/تيشرن) فى مخزن : (المخزن الرئيسي) بالكمية : 8','1','0',null,'0','7','inventoryController.php?do=details&id=7'); -- id=3
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('3', '382', '4000', '','0'); -- id=3
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '13200', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('3', '188', '4000', '','0'); -- id=3
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-13200', 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-07 10:18:37";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:48:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-07 13:48:37', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=59
UPDATE storedetail SET  productquantity = '11', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '3';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('3', '1', '11', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0', '11', '1', '2026-10-07','0','0'); -- id=8
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '5500', '5500', '2026-10-07', '1', '0', '0', '2026-10-07 13:48:37','اعادة جرد للمنتج : (بولو خريفى 104/تيشرن) فى مخزن : (المخزن الرئيسي) بالكمية : 11','1','0',null,'0','8','inventoryController.php?do=details&id=8'); -- id=4
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4', '382', '5500', '','0'); -- id=4
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18700', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4', '188', '5500', '','0'); -- id=4
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-18700', 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-07 10:18:40";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:48:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 13:48:40', '1', 'o.royalgt4.com:443/erp/controllers/storedetailController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php'); -- id=60
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:18:52";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:48:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 13:48:52', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=61
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:19:37";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:49:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 13:49:37', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=62
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:20:06";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:50:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 13:50:06', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=63
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:23:58";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:53:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 13:53:58', '1', 'bill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=64
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:25:59";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:55:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:55:59', '1', 'add2', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=add2'); -- id=65
INSERT INTO productcat (productCatName, productCatDate, productCatDescription, productCatParent, userId, conditions, selldiscount, buydiscount, discounttype,isOptic , buytotal , buyhalf , buypart ,buypricereal,opticServices,logo,inMenu,stopNegativeSale,catExcelid,webApiId,obygyInvestigationCatId,price4,price5,price6,price7,price8,price9,price10,price11,price12,price13) VALUES ('جاكت','2026-10-07','','0', '1','0', '0', '0', '-1', '0', '0', '0', '0','0','','.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); -- id=4
INSERT INTO onlinetempcategory (catid, edited, sysdate, userid)
                VALUES (4, 1,'2026-10-07 13:56:00',1)
                ON DUPLICATE KEY UPDATE catid = 4, edited = 1, sysdate = '2026-10-07 13:56:00', userid = 1; -- id=5
INSERT INTO productcatunit (unitid, productcatid, productnumber, productcatunitdate, userid, conditions) VALUES ('1', '4', '1', '2026-10-07', '1', '0'); -- id=5
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:26:00";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:56:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productCatController.php', '2026-10-07 13:56:00', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productCatController.php?do=sucess'); -- id=66
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:26:30";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:56:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 13:56:30', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=67
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:26:31";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:56:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 13:56:31', '1', 'o.royalgt4.com:443/erp/controllers/productController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php'); -- id=68
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:28:41";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 13:58:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 13:58:41', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=add'); -- id=69
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 ('جاكت 8804','','4','1150','1500','1500','1500','2026-10-07','0','1','0','','0','0','0','0','0','1150','1150','1150','1150','1150','0','30.43','30.43','0','.','0','0','0','1150','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','1150','1150','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','','1150','0','0','0','0','0','0','','','0','0','0','0'); -- id=5
UPDATE product SET productName = 'جاكت 8804', productDescription = '', productCatId = '4', productBuyPrice = '1150', productSellAllPrice = '1500', productSellUnitPrice = '1500', productSellHalfPrice = '1500', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00005',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1150',lastbuyprice_withDiscount = '1150',meanbuyprice = '1150',meanbuyprice_withDiscount = '1150' , productbuypricereal = '1150' , buypricereal_precentage = '0' , buytotal_precentage = '30.43' , buyhalf_precentage = '30.43' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1150',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='1150',meanbuyprice_withTax='1150',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='1150',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '5';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '5', '1.00', '2026-10-07', '1', '0','0000501','1500','1500','1500','1150','','0','0','0','0','0','0','0','0','0','0'); -- id=5
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('5', '1', '0', '1', '2026-10-07'); -- id=5
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '0', '0', '5', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=9
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (5, 1,'2026-10-07 13:58:41',1)
                ON DUPLICATE KEY UPDATE productid = 5, edited = 1, sysdate = '2026-10-07 13:58:41', userid = 1; -- id=5
UPDATE product SET productName = 'جاكت 8804', productDescription = '', productCatId = '4', productBuyPrice = '1150.00', productSellAllPrice = '1500.00', productSellUnitPrice = '1500.00', productSellHalfPrice = '1500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00005',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1150',lastbuyprice_withDiscount = '1150',meanbuyprice = '1150',meanbuyprice_withDiscount = '1150' , productbuypricereal = '1150' , buypricereal_precentage = '0' , buytotal_precentage = '30.43' , buyhalf_precentage = '30.43' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1150',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='1150',meanbuyprice_withTax='1150',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='1150',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '5';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 8807','','4','1250','1600','1600','1600','2026-10-07','0','1','0','','0','0','0','0','0','1250','1250','1250','1250','1250','0','28','28','0','.','0','0','0','1250','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','1250','1250','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','1250','0','0','0','0','0','0','','','0','0','0','0'); -- id=6
UPDATE product SET productName = 'جاكت 8807', productDescription = '', productCatId = '4', productBuyPrice = '1250', productSellAllPrice = '1600', productSellUnitPrice = '1600', productSellHalfPrice = '1600', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00006',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1250',lastbuyprice_withDiscount = '1250',meanbuyprice = '1250',meanbuyprice_withDiscount = '1250' , productbuypricereal = '1250' , buypricereal_precentage = '0' , buytotal_precentage = '28' , buyhalf_precentage = '28' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1250',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='1250',meanbuyprice_withTax='1250',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1250',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '6';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '6', '1.00', '2026-10-07', '1', '0','0000601','1600','1600','1600','1250','','0','0','0','0','0','0','0','0','0','0'); -- id=6
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('6', '1', '0', '1', '2026-10-07'); -- id=6
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '1', '0', '0', '6', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=10
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (6, 1,'2026-10-07 13:58:41',1)
                ON DUPLICATE KEY UPDATE productid = 6, edited = 1, sysdate = '2026-10-07 13:58:41', userid = 1; -- id=6
UPDATE product SET productName = 'جاكت 8807', productDescription = '', productCatId = '4', productBuyPrice = '1250.00', productSellAllPrice = '1600.00', productSellUnitPrice = '1600.00', productSellHalfPrice = '1600.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00006',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1250',lastbuyprice_withDiscount = '1250',meanbuyprice = '1250',meanbuyprice_withDiscount = '1250' , productbuypricereal = '1250' , buypricereal_precentage = '0' , buytotal_precentage = '28' , buyhalf_precentage = '28' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1250',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='1250',meanbuyprice_withTax='1250',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1250',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '6';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 90206','','4','1950','2500','2500','2500','2026-10-07','0','1','0','','0','0','0','0','0','1950','1950','1950','1950','1950','0','28.21','0','0','.','0','0','0','1950','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','1950','1950','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','1950','0','0','0','0','0','0','','','0','0','0','0'); -- id=7
UPDATE product SET productName = 'جاكت 90206', productDescription = '', productCatId = '4', productBuyPrice = '1950', productSellAllPrice = '2500', productSellUnitPrice = '2500', productSellHalfPrice = '2500', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00007',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1950',lastbuyprice_withDiscount = '1950',meanbuyprice = '1950',meanbuyprice_withDiscount = '1950' , productbuypricereal = '1950' , buypricereal_precentage = '0' , buytotal_precentage = '28.21' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1950',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='1950',meanbuyprice_withTax='1950',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1950',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '7';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '7', '1.00', '2026-10-07', '1', '0','0000701','2500','2500','2500','1950','','0','0','0','0','0','0','0','0','0','0'); -- id=7
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('7', '1', '0', '1', '2026-10-07'); -- id=7
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '1', '0', '0', '7', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=11
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (7, 1,'2026-10-07 13:58:41',1)
                ON DUPLICATE KEY UPDATE productid = 7, edited = 1, sysdate = '2026-10-07 13:58:41', userid = 1; -- id=7
UPDATE product SET productName = 'جاكت 90206', productDescription = '', productCatId = '4', productBuyPrice = '1950.00', productSellAllPrice = '2500.00', productSellUnitPrice = '2500.00', productSellHalfPrice = '2500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00007',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1950',lastbuyprice_withDiscount = '1950',meanbuyprice = '1950',meanbuyprice_withDiscount = '1950' , productbuypricereal = '1950' , buypricereal_precentage = '0' , buytotal_precentage = '28.21' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1950',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='1950',meanbuyprice_withTax='1950',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1950',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '7';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 8803','','4','1230','1600','1600','1600','2026-10-07','0','1','0','','0','0','0','0','0','1230','1230','1230','1230','1230','0','30.08','0','0','.','0','0','0','1230','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','1230','1230','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','1230','0','0','0','0','0','0','','','0','0','0','0'); -- id=8
UPDATE product SET productName = 'جاكت 8803', productDescription = '', productCatId = '4', productBuyPrice = '1230', productSellAllPrice = '1600', productSellUnitPrice = '1600', productSellHalfPrice = '1600', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00008',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1230',lastbuyprice_withDiscount = '1230',meanbuyprice = '1230',meanbuyprice_withDiscount = '1230' , productbuypricereal = '1230' , buypricereal_precentage = '0' , buytotal_precentage = '30.08' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1230',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='1230',meanbuyprice_withTax='1230',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1230',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '8';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '8', '1.00', '2026-10-07', '1', '0','0000801','1600','1600','1600','1230','','0','0','0','0','0','0','0','0','0','0'); -- id=8
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('8', '1', '0', '1', '2026-10-07'); -- id=8
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('8', '1', '0', '0', '8', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=12
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (8, 1,'2026-10-07 13:58:41',1)
                ON DUPLICATE KEY UPDATE productid = 8, edited = 1, sysdate = '2026-10-07 13:58:41', userid = 1; -- id=8
UPDATE product SET productName = 'جاكت 8803', productDescription = '', productCatId = '4', productBuyPrice = '1230.00', productSellAllPrice = '1600.00', productSellUnitPrice = '1600.00', productSellHalfPrice = '1600.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00008',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1230',lastbuyprice_withDiscount = '1230',meanbuyprice = '1230',meanbuyprice_withDiscount = '1230' , productbuypricereal = '1230' , buypricereal_precentage = '0' , buytotal_precentage = '30.08' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1230',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='1230',meanbuyprice_withTax='1230',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1230',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '8';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 8631','','4','1400','1800','1800','1800','2026-10-07','0','1','0','','0','0','0','0','0','1400','1400','1400','1400','1400','0','28.57','0','0','.','0','0','0','1400','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','1400','1400','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','1400','0','0','0','0','0','0','','','0','0','0','0'); -- id=9
UPDATE product SET productName = 'جاكت 8631', productDescription = '', productCatId = '4', productBuyPrice = '1400', productSellAllPrice = '1800', productSellUnitPrice = '1800', productSellHalfPrice = '1800', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00009',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1400',lastbuyprice_withDiscount = '1400',meanbuyprice = '1400',meanbuyprice_withDiscount = '1400' , productbuypricereal = '1400' , buypricereal_precentage = '0' , buytotal_precentage = '28.57' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1400',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='1400',meanbuyprice_withTax='1400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '9';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '9', '1.00', '2026-10-07', '1', '0','0000901','1800','1800','1800','1400','','0','0','0','0','0','0','0','0','0','0'); -- id=9
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('9', '1', '0', '1', '2026-10-07'); -- id=9
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '1', '0', '0', '9', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=13
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (9, 1,'2026-10-07 13:58:41',1)
                ON DUPLICATE KEY UPDATE productid = 9, edited = 1, sysdate = '2026-10-07 13:58:41', userid = 1; -- id=9
UPDATE product SET productName = 'جاكت 8631', productDescription = '', productCatId = '4', productBuyPrice = '1400.00', productSellAllPrice = '1800.00', productSellUnitPrice = '1800.00', productSellHalfPrice = '1800.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00009',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1400',lastbuyprice_withDiscount = '1400',meanbuyprice = '1400',meanbuyprice_withDiscount = '1400' , productbuypricereal = '1400' , buypricereal_precentage = '0' , buytotal_precentage = '28.57' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1400',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='1400',meanbuyprice_withTax='1400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '9';
INSERT INTO product (productName,productDescription,productCatId,productBuyPrice,productSellAllPrice,productSellUnitPrice,productSellHalfPrice,productDate,conditions,userId,limitamount,parcode,type,expireDate,dailyentryId,isService,isOptic,lastbuyprice,lastbuyprice_withDiscount,meanbuyprice,meanbuyprice_withDiscount,productbuypricereal,buypricereal_precentage,buytotal_precentage,buyhalf_precentage,buypart_precentage,logo,inMenu,obygyDetectionId,hasSizeAndColor,overAllAveragePrice,reviewType,online,updatebyuser,proExcelid,proExcelParcode,webApiId,runquery,weightedDiscount,sortby,obygyInvestigationId,TypeOfBarcodeInTax,itemsymbol,barcodeInTax,productNameE,partNumber,vehicleType,company,weight,origin,hscode,power,ProductionDate,expiry,procode,lastbuyprice_withTax,meanbuyprice_withTax,price4,price5,price6,price7,price8,clientid,grantduration,onlinepro,minappearonline,selladdpercent,selldiscountpercent,buydiscountpercent,onlinecatid,sellpercenttype,searchfiltersid,lastbuyprice_withDiscountAndTax,price9,price10,price11,price12,price13,productCatIdOnline,tagids,productDescriptionE,discountType,discount,discountRatio,priceAfterDiscount) VALUES ('جاكت 268809','','4','1550','2000','2000','2000','2026-10-07','0','1','0','','0','0','0','0','0','1550','1550','1550','1550','1550','0','29.03','0','0','.','0','0','0','1550','0','','','0','0','0','','0','0','0','GS1','','','','0','0','0','0','','0','0','','0','','1550','1550','0','0','0','0','0','0','0','1','0','0','0','0','0','0','','1550','0','0','0','0','0','0','','','0','0','0','0'); -- id=10
UPDATE product SET productName = 'جاكت 268809', productDescription = '', productCatId = '4', productBuyPrice = '1550', productSellAllPrice = '2000', productSellUnitPrice = '2000', productSellHalfPrice = '2000', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00010',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1550',lastbuyprice_withDiscount = '1550',meanbuyprice = '1550',meanbuyprice_withDiscount = '1550' , productbuypricereal = '1550' , buypricereal_precentage = '0' , buytotal_precentage = '29.03' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1550',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='1550',meanbuyprice_withTax='1550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '10';
INSERT INTO productunit (unitid, productid, productnumber, productunitdate, userid, conditions,proUnitParcode,proUnitSellAllPrice,proUnitSellHalfPrice,proUnitSellUnitPrice,proUnitBuyPrice,unitInTax,proUnitPrice4,proUnitPrice5,proUnitPrice6,proUnitPrice7,proUnitPrice8,proUnitPrice9,proUnitPrice10,proUnitPrice11,proUnitPrice12,proUnitPrice13) VALUES ('1', '10', '1.00', '2026-10-07', '1', '0','0001001','2000','2000','2000','1550','','0','0','0','0','0','0','0','0','0','0'); -- id=10
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('10', '1', '0', '1', '2026-10-07'); -- id=10
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '1', '0', '0', '10', 'إضافة منتج', 'productController.php', '0', '0', '1', '2026-10-07','0','0'); -- id=14
INSERT INTO onlinetempproduct (productid, edited, sysdate, userid)
                VALUES (10, 1,'2026-10-07 13:58:41',1)
                ON DUPLICATE KEY UPDATE productid = 10, edited = 1, sysdate = '2026-10-07 13:58:41', userid = 1; -- id=10
UPDATE product SET productName = 'جاكت 268809', productDescription = '', productCatId = '4', productBuyPrice = '1550.00', productSellAllPrice = '2000.00', productSellUnitPrice = '2000.00', productSellHalfPrice = '2000.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00010',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1550',lastbuyprice_withDiscount = '1550',meanbuyprice = '1550',meanbuyprice_withDiscount = '1550' , productbuypricereal = '1550' , buypricereal_precentage = '0' , buytotal_precentage = '29.03' , buyhalf_precentage = '0' , buypart_precentage = '0',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1550',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='1550',meanbuyprice_withTax='1550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '10';
COMMIT;
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,suppSettlementDiscount) VALUES ('دكتور فرج', '', '', '0', '', '0', '1', '2026-10-07 13:59:05', '0', '', '','0','0','','','','','','','','','','0','0','1','0','0','0',''); -- id=2
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,billid,paytype) VALUES ('2','0', '0', '0', 'إضافة مورد جديد', '2', '0', '2026-10-07 13:59:05', '1', 'supplierController.php', '', '0', '','0', '1','1','0','1','0','0','0','0','','0',''); -- id=1
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('دكتور فرج', 'دكتور فرج', 'دكتور فرج', 'دكتور فرج', '81', '1', '0', '0', '', '1', '1', '', '0', '1', '1', '', '1', '0', '2026-10-07 13:59:05'); -- id=424
UPDATE supplier SET suppliername = 'دكتور فرج', supplieraddress = '', supplierphone = '', suppliercurrentDebt = '0.00', supplierdetails = '', conditions = '0', userid = '1', supplierdate = '2026-10-07', dailyentryid = '0', category_id = '', typesupplier_id = '',linkedClientId = '0',inUse='0',suppliercode = '',goverareaid='',namepayeecheck = '',suppliermobile='',warrantyOfficer = '',warrantymobile='',sellername = '',sellermobile='',taxnumber = '',supplierTypeForTree='0',treeId='424',sullpierCurrencyid='1',suppliercurrentDebtInCurrency='0',webApiId='0',shippingDiscountPer='0',suppSettlementDiscount='' WHERE supplierid = '2';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:33:07";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:03:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:03:07', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/buyBillController.php?do=add&return_url=1&billnameid=1'); -- id=70
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,projectid,supervision_type,supervision_amount,supervision_value,paidbyclient) VALUES ('06ac624c639f3a', '2026-10-07 13:53:58', '2', '0.00', '242230','0', '1', '242230.00', '242230.00', '0', '242230', '1', '2026-10-07 14:03:07',  '', '1', '0', '', '1', '1', '1', '0', '-1', '0','0','1','0','0','.','0','0','0','0','0','','0','0','0','0','0'); -- id=1
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 ('00005', '1', '4', '5', '64', '1150', '73600.00', '0', '', '2026-10-07 14:03:07', '5','','','0','0','0','0','0',null,'1150','73600','0','0','0','0','0','0','0','0','1'); -- id=1
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:53:58', 1, 5, 0, 0
                    , 1150, 64, 0, 0, 1, '2026-10-07 14:03:07')
                ON DUPLICATE KEY UPDATE buyprice = 1150,
                        buyQuantity =buyQuantity+64, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:03:07' ; -- id=1
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('5', '1150', '64', '0', 'buyBillController.php', '1', '', '0', '0'); -- id=1
UPDATE product SET  productBuyPrice = "1150" WHERE productId = 5 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 1 ;
UPDATE product SET productName = 'جاكت 8804', productDescription = '', productCatId = '4', productBuyPrice = '1150.00', productSellAllPrice = '1500.00', productSellUnitPrice = '1500.00', productSellHalfPrice = '1500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00005',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1150',lastbuyprice_withDiscount = '1150',meanbuyprice = '1150',meanbuyprice_withDiscount = '1150' , productbuypricereal = '1150.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '30.43' , buyhalf_precentage = '30.43' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1150',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1150',meanbuyprice_withTax='1150',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='1150',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '5';
UPDATE buybilldetail SET  lastbuyprice = 1150 , meanbuyprice = 1150, lastbuyprice_withDiscount = 1150, meanbuyprice_withDiscount = 1150
        , lastbuyprice_withTax = 1150, meanbuyprice_withTax = 1150, lastbuyprice_withDiscountAndTax = 1150
                where buybilldetailid = 1;
UPDATE productunit SET proUnitBuyPrice  = 1150 * productnumber WHERE productid = 5;
UPDATE storedetail SET  productquantity = '64', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '5';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '64', '0', '1', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '64', '1', '2026-10-07 13:53:58','0','0'); -- id=15
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 ('00006', '1', '4', '6', '24', '1250', '30000.00', '0', '', '2026-10-07 14:03:07', '6','','','0','0','0','0','0',null,'1250','30000','0','0','0','0','0','0','0','0','1'); -- id=2
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:53:58', 1, 6, 0, 0
                    , 1250, 24, 0, 0, 1, '2026-10-07 14:03:07')
                ON DUPLICATE KEY UPDATE buyprice = 1250,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:03:07' ; -- id=2
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('6', '1250', '24', '0', 'buyBillController.php', '2', '', '0', '0'); -- id=2
UPDATE product SET  productBuyPrice = "1250" WHERE productId = 6 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 2 ;
UPDATE product SET productName = 'جاكت 8807', productDescription = '', productCatId = '4', productBuyPrice = '1250.00', productSellAllPrice = '1600.00', productSellUnitPrice = '1600.00', productSellHalfPrice = '1600.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00006',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1250',lastbuyprice_withDiscount = '1250',meanbuyprice = '1250',meanbuyprice_withDiscount = '1250' , productbuypricereal = '1250.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '28.00' , buyhalf_precentage = '28.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1250',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1250',meanbuyprice_withTax='1250',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1250',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '6';
UPDATE buybilldetail SET  lastbuyprice = 1250 , meanbuyprice = 1250, lastbuyprice_withDiscount = 1250, meanbuyprice_withDiscount = 1250
        , lastbuyprice_withTax = 1250, meanbuyprice_withTax = 1250, lastbuyprice_withDiscountAndTax = 1250
                where buybilldetailid = 2;
UPDATE productunit SET proUnitBuyPrice  = 1250 * productnumber WHERE productid = 6;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '6';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '1', '24', '0', '1', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-07 13:53:58','0','0'); -- id=16
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 ('00007', '1', '4', '7', '24', '1950', '46800.00', '0', '', '2026-10-07 14:03:07', '7','','','0','0','0','0','0',null,'1950','46800','0','0','0','0','0','0','0','0','1'); -- id=3
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:53:58', 1, 7, 0, 0
                    , 1950, 24, 0, 0, 1, '2026-10-07 14:03:07')
                ON DUPLICATE KEY UPDATE buyprice = 1950,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:03:07' ; -- id=3
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('7', '1950', '24', '0', 'buyBillController.php', '3', '', '0', '0'); -- id=3
UPDATE product SET  productBuyPrice = "1950" WHERE productId = 7 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 3 ;
UPDATE product SET productName = 'جاكت 90206', productDescription = '', productCatId = '4', productBuyPrice = '1950.00', productSellAllPrice = '2500.00', productSellUnitPrice = '2500.00', productSellHalfPrice = '2500.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00007',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1950',lastbuyprice_withDiscount = '1950',meanbuyprice = '1950',meanbuyprice_withDiscount = '1950' , productbuypricereal = '1950.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '28.21' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1950',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1950',meanbuyprice_withTax='1950',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1950',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '7';
UPDATE buybilldetail SET  lastbuyprice = 1950 , meanbuyprice = 1950, lastbuyprice_withDiscount = 1950, meanbuyprice_withDiscount = 1950
        , lastbuyprice_withTax = 1950, meanbuyprice_withTax = 1950, lastbuyprice_withDiscountAndTax = 1950
                where buybilldetailid = 3;
UPDATE productunit SET proUnitBuyPrice  = 1950 * productnumber WHERE productid = 7;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '7';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '1', '24', '0', '1', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-07 13:53:58','0','0'); -- id=17
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 ('00008', '1', '4', '8', '36', '1230', '44280.00', '0', '', '2026-10-07 14:03:07', '8','','','0','0','0','0','0',null,'1230','44280','0','0','0','0','0','0','0','0','1'); -- id=4
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:53:58', 1, 8, 0, 0
                    , 1230, 36, 0, 0, 1, '2026-10-07 14:03:07')
                ON DUPLICATE KEY UPDATE buyprice = 1230,
                        buyQuantity =buyQuantity+36, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:03:07' ; -- id=4
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('8', '1230', '36', '0', 'buyBillController.php', '4', '', '0', '0'); -- id=4
UPDATE product SET  productBuyPrice = "1230" WHERE productId = 8 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 4 ;
UPDATE product SET productName = 'جاكت 8803', productDescription = '', productCatId = '4', productBuyPrice = '1230.00', productSellAllPrice = '1600.00', productSellUnitPrice = '1600.00', productSellHalfPrice = '1600.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00008',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1230',lastbuyprice_withDiscount = '1230',meanbuyprice = '1230',meanbuyprice_withDiscount = '1230' , productbuypricereal = '1230.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '30.08' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1230',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1230',meanbuyprice_withTax='1230',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1230',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '8';
UPDATE buybilldetail SET  lastbuyprice = 1230 , meanbuyprice = 1230, lastbuyprice_withDiscount = 1230, meanbuyprice_withDiscount = 1230
        , lastbuyprice_withTax = 1230, meanbuyprice_withTax = 1230, lastbuyprice_withDiscountAndTax = 1230
                where buybilldetailid = 4;
UPDATE productunit SET proUnitBuyPrice  = 1230 * productnumber WHERE productid = 8;
UPDATE storedetail SET  productquantity = '36', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '8';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('8', '1', '36', '0', '1', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '36', '1', '2026-10-07 13:53:58','0','0'); -- id=18
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 ('00009', '1', '4', '9', '24', '1400', '33600.00', '0', '', '2026-10-07 14:03:07', '9','','','0','0','0','0','0',null,'1400','33600','0','0','0','0','0','0','0','0','1'); -- id=5
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:53:58', 1, 9, 0, 0
                    , 1400, 24, 0, 0, 1, '2026-10-07 14:03:07')
                ON DUPLICATE KEY UPDATE buyprice = 1400,
                        buyQuantity =buyQuantity+24, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:03:07' ; -- id=5
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('9', '1400', '24', '0', 'buyBillController.php', '5', '', '0', '0'); -- id=5
UPDATE product SET  productBuyPrice = "1400" WHERE productId = 9 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 5 ;
UPDATE product SET productName = 'جاكت 8631', productDescription = '', productCatId = '4', productBuyPrice = '1400.00', productSellAllPrice = '1800.00', productSellUnitPrice = '1800.00', productSellHalfPrice = '1800.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00009',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1400',lastbuyprice_withDiscount = '1400',meanbuyprice = '1400',meanbuyprice_withDiscount = '1400' , productbuypricereal = '1400.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '28.57' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1400',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1400',meanbuyprice_withTax='1400',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1400',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '9';
UPDATE buybilldetail SET  lastbuyprice = 1400 , meanbuyprice = 1400, lastbuyprice_withDiscount = 1400, meanbuyprice_withDiscount = 1400
        , lastbuyprice_withTax = 1400, meanbuyprice_withTax = 1400, lastbuyprice_withDiscountAndTax = 1400
                where buybilldetailid = 5;
UPDATE productunit SET proUnitBuyPrice  = 1400 * productnumber WHERE productid = 9;
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '9';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '1', '24', '0', '1', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '24', '1', '2026-10-07 13:53:58','0','0'); -- id=19
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 ('00010', '1', '4', '10', '9', '1550', '13950.00', '0', '', '2026-10-07 14:03:07', '10','','','0','0','0','0','0',null,'1550','13950','0','0','0','0','0','0','0','0','1'); -- id=6
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07 13:53:58', 1, 10, 0, 0
                    , 1550, 9, 0, 0, 1, '2026-10-07 14:03:07')
                ON DUPLICATE KEY UPDATE buyprice = 1550,
                        buyQuantity =buyQuantity+9, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:03:07' ; -- id=6
INSERT INTO entryproductspurchased (productid, price, productquantity, soldquantity, tablename, modelid, expirationDate, priority, del) VALUES ('10', '1550', '9', '0', 'buyBillController.php', '6', '', '0', '0'); -- id=6
UPDATE product SET  productBuyPrice = "1550" WHERE productId = 10 ;
UPDATE buybilldetail SET  quantitybefore = 0 WHERE buybilldetailid = 6 ;
UPDATE product SET productName = 'جاكت 268809', productDescription = '', productCatId = '4', productBuyPrice = '1550.00', productSellAllPrice = '2000.00', productSellUnitPrice = '2000.00', productSellHalfPrice = '2000.00', productDate = '2026-10-07', conditions = '0', userId = '1', limitamount = '0', parcode = '00010',type ='0', expireDate = '0' , dailyentryId = '0',isService = '0',isOptic = '0',lastbuyprice = '1550',lastbuyprice_withDiscount = '1550',meanbuyprice = '1550',meanbuyprice_withDiscount = '1550' , productbuypricereal = '1550.00' , buypricereal_precentage = '0.00' , buytotal_precentage = '29.03' , buyhalf_precentage = '0.00' , buypart_precentage = '0.00',logo = '.',inMenu='0', obygyDetectionId = '0',hasSizeAndColor = '0',overAllAveragePrice='1550',logo1 = '',logo2 = '',logo3 = '',logo4 = '',logo5 = '',logo6 = '',logo7 = '',reviewType ='0' , online = '' , updatebyuser = '0',webApiId='0',weightedDiscount='0',sortby='0',TypeOfBarcodeInTax='GS1',itemsymbol='',barcodeInTax='',productNameE='',partNumber='0',vehicleType='0',company='0',weight='0',origin='',hscode='0',power='0',ProductionDate='',expiry='0',procode='',lastbuyprice_withTax='1550',meanbuyprice_withTax='1550',price4='0',price5='0',price6='0',price7='0',price8='0',clientid='0',grantduration='0',onlinepro='1',minappearonline='0',selladdpercent='0',selldiscountpercent='0',buydiscountpercent='0',onlinecatid='0',sellpercenttype='0',searchfiltersid='',lastbuyprice_withDiscountAndTax='1550',price9='0',price10='0',price11='0',price12='0',price13='0',productCatIdOnline='0',tagids='',productDescriptionE='', discountType = '0', discount = '0', discountRatio = '0',priceAfterDiscount = '0' WHERE productId = '10';
UPDATE buybilldetail SET  lastbuyprice = 1550 , meanbuyprice = 1550, lastbuyprice_withDiscount = 1550, meanbuyprice_withDiscount = 1550
        , lastbuyprice_withTax = 1550, meanbuyprice_withTax = 1550, lastbuyprice_withDiscountAndTax = 1550
                where buybilldetailid = 6;
UPDATE productunit SET proUnitBuyPrice  = 1550 * productnumber WHERE productid = 10;
UPDATE storedetail SET  productquantity = '9', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '10';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '1', '9', '0', '1', 'اضافة فاتورة مشتريات', 'buyBillController.php', '0', '9', '1', '2026-10-07 13:53:58','0','0'); -- id=20
UPDATE supplier SET  suppliercurrentDebt = '242230',suppliercurrentDebtInCurrency= '242230' , userid = '1', supplierdate = '2026-10-07 14:03:07'   WHERE supplierid = '2';
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,billid,paytype) VALUES ('2','0.00', '242230', '0', 'اضافة فاتورة مشتريات', '1', '242230', '2026-10-07 13:53:58', '1', 'buyBillController.php', 'اضافة فاتورة مشتريات', '0', '','0', '1','1','242230','1','0','242230','242230','0','','0',''); -- id=2
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '242230', '242230', '2026-10-07', '1', '0', '0', '2026-10-07 14:03:07','اضافة فاتورة مشتريات رقم 1','1','0',null,'0','1','buyBillController.php?do=details&id=1'); -- id=5
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('5', '382', '242230', '','0'); -- id=5
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '260930', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('5', '424', '242230', '','0'); -- id=5
UPDATE accountstree SET name = 'دكتور فرج', customName = 'دكتور فرج', customNameEn = 'دكتور فرج', nameEn = 'دكتور فرج', parent = '81', accountNature = '1', theValue = '242230', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '1', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 13:59:05' WHERE id = '424';
update buybill set dailyentryid='5,0' where buybillid=1;
COMMIT;
UPDATE product SET overAllAveragePrice = 1150 WHERE productId = 5;UPDATE product SET overAllAveragePrice = 1250 WHERE productId = 6;UPDATE product SET overAllAveragePrice = 1950 WHERE productId = 7;UPDATE product SET overAllAveragePrice = 1230 WHERE productId = 8;UPDATE product SET overAllAveragePrice = 1400 WHERE productId = 9;UPDATE product SET overAllAveragePrice = 1550 WHERE productId = 10;;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:33:08";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:03:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillController.php', '2026-10-07 14:03:08', '1', 'bill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/buyBillController.php?do=bill&billnameid=1'); -- id=71
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:33:41";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:03:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:03:41', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=72
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:33:56";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:03:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:03:56', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=73
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:34:04";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:04:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:04:04', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=74
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:36:07";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:06:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:06:07', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=add'); -- id=75
BEGIN;
CALL insertUniqueOptNum(1,1,2,5,10,'2026-10-07',1,0, '' , '' ,0,0,0,0,0,'2026-10-07 14:06:07',0,'',0,'','hide',0,@id,@optnum);
UPDATE storedetail SET  productquantity = '54', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '5';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 5, 0, 0
                    , 1150.00, 10, 0, 0, 1, '2026-10-07 14:06:07')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-10, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:06:07' ; -- id=1
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-07*1150.00," WHERE transferproductid = 1;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '10', '1', '1', 'تحويل منتجات من المخزن', 'storemovementController.php', '64', '54', '1', '2026-10-07','0','0'); -- id=21
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('5', '2', '10', '1', '2026-10-07'); -- id=11
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 5, 0, 0
                    , 1150.00, 10, 0, 0, 1, '2026-10-07 14:06:07')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:06:07' ; -- id=8
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '2', '10', '0', '1', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-07','0','0'); -- id=22
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '6', '10', '2026-10-07', '1', '0','1','0','0','2026-10-07 14:06:07','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=2
UPDATE storedetail SET  productquantity = '14', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '6';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 6, 0, 0
                    , 1250.00, 10, 0, 0, 1, '2026-10-07 14:06:07')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-10, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:06:07' ; -- id=2
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-07*1250.00," WHERE transferproductid = 2;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '1', '10', '1', '2', 'تحويل منتجات من المخزن', 'storemovementController.php', '24', '14', '1', '2026-10-07','0','0'); -- id=23
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('6', '2', '10', '1', '2026-10-07'); -- id=12
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 6, 0, 0
                    , 1250.00, 10, 0, 0, 1, '2026-10-07 14:06:07')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:06:07' ; -- id=10
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '2', '10', '0', '2', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-07','0','0'); -- id=24
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '7', '10', '2026-10-07', '1', '0','1','0','0','2026-10-07 14:06:07','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=3
UPDATE storedetail SET  productquantity = '14', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '7';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 7, 0, 0
                    , 1950.00, 10, 0, 0, 1, '2026-10-07 14:06:07')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-10, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:06:07' ; -- id=3
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-07*1950.00," WHERE transferproductid = 3;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '1', '10', '1', '3', 'تحويل منتجات من المخزن', 'storemovementController.php', '24', '14', '1', '2026-10-07','0','0'); -- id=25
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('7', '2', '10', '1', '2026-10-07'); -- id=13
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 7, 0, 0
                    , 1950.00, 10, 0, 0, 1, '2026-10-07 14:06:07')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:06:07' ; -- id=12
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '2', '10', '0', '3', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-07','0','0'); -- id=26
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '8', '10', '2026-10-07', '1', '0','1','0','0','2026-10-07 14:06:07','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=4
UPDATE storedetail SET  productquantity = '26', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '8';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 8, 0, 0
                    , 1230.00, 10, 0, 0, 1, '2026-10-07 14:06:07')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-10, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:06:07' ; -- id=4
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-07*1230.00," WHERE transferproductid = 4;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('8', '1', '10', '1', '4', 'تحويل منتجات من المخزن', 'storemovementController.php', '36', '26', '1', '2026-10-07','0','0'); -- id=27
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('8', '2', '10', '1', '2026-10-07'); -- id=14
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 8, 0, 0
                    , 1230.00, 10, 0, 0, 1, '2026-10-07 14:06:07')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:06:07' ; -- id=14
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('8', '2', '10', '0', '4', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-07','0','0'); -- id=28
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '9', '10', '2026-10-07', '1', '0','1','0','0','2026-10-07 14:06:07','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=5
UPDATE storedetail SET  productquantity = '14', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '9';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 9, 0, 0
                    , 1400.00, 10, 0, 0, 1, '2026-10-07 14:06:07')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-10, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:06:07' ; -- id=5
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-07*1400.00," WHERE transferproductid = 5;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '1', '10', '1', '5', 'تحويل منتجات من المخزن', 'storemovementController.php', '24', '14', '1', '2026-10-07','0','0'); -- id=29
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('9', '2', '10', '1', '2026-10-07'); -- id=15
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 9, 0, 0
                    , 1400.00, 10, 0, 0, 1, '2026-10-07 14:06:07')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:06:07' ; -- id=16
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '2', '10', '0', '5', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-07','0','0'); -- id=30
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid,expireDate,comment,maincomment,recieveType,recieveUserid,recieveTime,deloperationnum) VALUES ('1', '2', '10', '3', '2026-10-07', '1', '0','1','0','0','2026-10-07 14:06:07','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=6
UPDATE storedetail SET  productquantity = '6', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '10';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 10, 0, 0
                    , 1550.00, 3, 0, 0, 1, '2026-10-07 14:06:07')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-3, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:06:07' ; -- id=6
UPDATE storemovement SET  buyPricesHistoryBookData = "3*2026-10-07*1550.00," WHERE transferproductid = 6;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '1', '3', '1', '6', 'تحويل منتجات من المخزن', 'storemovementController.php', '9', '6', '1', '2026-10-07','0','0'); -- id=31
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('10', '2', '3', '1', '2026-10-07'); -- id=16
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 10, 0, 0
                    , 1550.00, 3, 0, 0, 1, '2026-10-07 14:06:07')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:06:07' ; -- id=18
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '2', '3', '0', '6', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '3', '1', '2026-10-07','0','0'); -- id=32
UPDATE storedetail SET inUse = 0 WHERE storedetailid=5;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=6;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=7;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=8;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=9;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=10;
COMMIT;
BEGIN;
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '74450', '74450', '2026-10-07', '1', '0', '0', '2026-10-07 14:06:07','تحويل من مخزن المخزن الرئيسي الى مخزن مخزن المتاجر','1','0',null,'0','1','storemovementController.php?do=show&operationnum=1'); -- id=6
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('6', '421', '74450', '','0'); -- id=6
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '74450', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 13:19:12' WHERE id = '421';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('6', '382', '74450', '','0'); -- id=6
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '186480', 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 =6 WHERE operationnum = 1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:37:45";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:07:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:07:45', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=76
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:37:59";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:07:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:07:59', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=77
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:38:19";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:08:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:08:19', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=78
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:38:41";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:08:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:08:41', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=79
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:39:21";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:09:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:09:21', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=80
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:39:54";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:09:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:09:54', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=81
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:41:53";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:11:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:11:53', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=82
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:42:01";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:12:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:12:01', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=83
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:42:12";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:12:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:12:12', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=84
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:42:31";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:12:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 14:12:31', '1', 'o.royalgt4.com:443/erp/controllers/buyBillreportController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/buyBillreportController.php'); -- id=85
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:42:32";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:12:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 14:12:32', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/buyBillreportController.php?do=show'); -- id=86
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:42:35";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:12:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('buyBillreportController.php', '2026-10-07 14:12:35', '1', 'details', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/buyBillreportController.php?do=details&id=1'); -- id=87
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:42:38";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:12:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('productController.php', '2026-10-07 14:12:38', '1', 'showbarcodebuybill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/productController.php?do=showbarcodebuybill&buybillid=1&type=2'); -- id=88
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:45:17";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:15:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-07 14:15:17', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=add'); -- id=89
INSERT INTO store (storeName, nameEn, branchId, addressAr, addressEn, phone, email, storeDate, storeDescription, conditions, userId, treeId, treeIdBetween, webApiId) VALUES ('مخزن المنشية', '', '0', '', '', '', '', '2026-10-07', "", '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-07 14:15:17'); -- id=425
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-07 14:15:17'); -- id=426
UPDATE store SET storeName = 'مخزن المنشية', nameEn = '', branchId = '0', addressAr = '', addressEn = '', phone = '', email = '', storeDate = '2026-10-07', storeDescription = "", conditions = '0', userId = '1', treeId = '425', treeIdBetween = '426', updatedAt = CURRENT_TIMESTAMP WHERE storeId = '3';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:45:17";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:15:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-07 14:15:17', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=sucess'); -- id=90
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:45:42";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:15:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:15:42', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=91
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:46:51";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:16:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:16:51', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=add'); -- id=92
BEGIN;
CALL insertUniqueOptNum(2,1,3,5,10,'2026-10-07',1,0, '' , '' ,0,0,0,0,0,'2026-10-07 14:16:51',0,'',0,'','hide',0,@id,@optnum);
UPDATE storedetail SET  productquantity = '44', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '5';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 5, 0, 0
                    , 1150.00, 10, 0, 0, 1, '2026-10-07 14:16:51')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-10, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:16:51' ; -- id=1
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-07*1150.00," WHERE transferproductid = 7;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '10', '1', '7', 'تحويل منتجات من المخزن', 'storemovementController.php', '54', '44', '1', '2026-10-07','0','0'); -- id=33
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('5', '3', '10', '1', '2026-10-07'); -- id=17
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 3, 5, 0, 0
                    , 1150.00, 10, 0, 0, 1, '2026-10-07 14:16:51')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:16:51' ; -- id=20
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '3', '10', '0', '7', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-07','0','0'); -- id=34
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', '6', '10', '2026-10-07', '1', '0','2','0','0','2026-10-07 14:16:51','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=8
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '6';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 6, 0, 0
                    , 1250.00, 10, 0, 0, 1, '2026-10-07 14:16:51')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-10, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:16:51' ; -- id=2
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-07*1250.00," WHERE transferproductid = 8;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '1', '10', '1', '8', 'تحويل منتجات من المخزن', 'storemovementController.php', '14', '4', '1', '2026-10-07','0','0'); -- id=35
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('6', '3', '10', '1', '2026-10-07'); -- id=18
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 3, 6, 0, 0
                    , 1250.00, 10, 0, 0, 1, '2026-10-07 14:16:51')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:16:51' ; -- id=22
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '3', '10', '0', '8', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-07','0','0'); -- id=36
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', '7', '10', '2026-10-07', '1', '0','2','0','0','2026-10-07 14:16:51','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=9
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '7';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 7, 0, 0
                    , 1950.00, 10, 0, 0, 1, '2026-10-07 14:16:51')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-10, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:16:51' ; -- id=3
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-07*1950.00," WHERE transferproductid = 9;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '1', '10', '1', '9', 'تحويل منتجات من المخزن', 'storemovementController.php', '14', '4', '1', '2026-10-07','0','0'); -- id=37
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('7', '3', '10', '1', '2026-10-07'); -- id=19
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 3, 7, 0, 0
                    , 1950.00, 10, 0, 0, 1, '2026-10-07 14:16:51')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:16:51' ; -- id=24
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '3', '10', '0', '9', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-07','0','0'); -- id=38
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', '8', '10', '2026-10-07', '1', '0','2','0','0','2026-10-07 14:16:51','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=10
UPDATE storedetail SET  productquantity = '16', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '8';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 8, 0, 0
                    , 1230.00, 10, 0, 0, 1, '2026-10-07 14:16:51')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-10, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:16:51' ; -- id=4
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-07*1230.00," WHERE transferproductid = 10;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('8', '1', '10', '1', '10', 'تحويل منتجات من المخزن', 'storemovementController.php', '26', '16', '1', '2026-10-07','0','0'); -- id=39
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('8', '3', '10', '1', '2026-10-07'); -- id=20
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 3, 8, 0, 0
                    , 1230.00, 10, 0, 0, 1, '2026-10-07 14:16:51')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:16:51' ; -- id=26
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('8', '3', '10', '0', '10', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-07','0','0'); -- id=40
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', '9', '10', '2026-10-07', '1', '0','2','0','0','2026-10-07 14:16:51','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=11
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '9';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 9, 0, 0
                    , 1400.00, 10, 0, 0, 1, '2026-10-07 14:16:51')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-10, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:16:51' ; -- id=5
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-07*1400.00," WHERE transferproductid = 11;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '1', '10', '1', '11', 'تحويل منتجات من المخزن', 'storemovementController.php', '14', '4', '1', '2026-10-07','0','0'); -- id=41
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('9', '3', '10', '1', '2026-10-07'); -- id=21
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 3, 9, 0, 0
                    , 1400.00, 10, 0, 0, 1, '2026-10-07 14:16:51')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:16:51' ; -- id=28
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '3', '10', '0', '11', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '10', '1', '2026-10-07','0','0'); -- id=42
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', '10', '3', '2026-10-07', '1', '0','2','0','0','2026-10-07 14:16:51','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=12
UPDATE storedetail SET  productquantity = '3', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '10';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 10, 0, 0
                    , 1550.00, 3, 0, 0, 1, '2026-10-07 14:16:51')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-3, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:16:51' ; -- id=6
UPDATE storemovement SET  buyPricesHistoryBookData = "3*2026-10-07*1550.00," WHERE transferproductid = 12;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '1', '3', '1', '12', 'تحويل منتجات من المخزن', 'storemovementController.php', '6', '3', '1', '2026-10-07','0','0'); -- id=43
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('10', '3', '3', '1', '2026-10-07'); -- id=22
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 3, 10, 0, 0
                    , 1550.00, 3, 0, 0, 1, '2026-10-07 14:16:51')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:16:51' ; -- id=30
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '3', '3', '0', '12', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '3', '1', '2026-10-07','0','0'); -- id=44
UPDATE storedetail SET inUse = 0 WHERE storedetailid=5;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=6;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=7;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=8;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=9;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=10;
COMMIT;
BEGIN;
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '74450', '74450', '2026-10-07', '1', '0', '0', '2026-10-07 14:16:51','تحويل من مخزن المخزن الرئيسي الى مخزن مخزن المنشية','1','0',null,'0','2','storemovementController.php?do=show&operationnum=2'); -- id=7
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('7', '425', '74450', '','0'); -- id=7
UPDATE accountstree SET name = 'مخزن المنشية', customName = 'مخزن المنشية', customNameEn = 'مخزن المنشية', nameEn = 'مخزن المنشية', parent = '49', accountNature = '0', theValue = '74450', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 14:15:17' WHERE id = '425';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('7', '382', '74450', '','0'); -- id=7
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '112030', 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 =7 WHERE operationnum = 2;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:46:51";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:16:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:16:51', '1', 'editshow', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=editshow&operationnum=2'); -- id=93
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:47:16";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:17:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:17:16', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=94
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:47:17";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:17:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:17:17', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=95
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:47:34";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:17:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:17:34', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=96
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:47:46";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:17:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:17:46', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=97
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:48:18";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:18:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:18:18', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=98
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:48:33";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:18:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:18:33', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=99
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:48:53";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:18:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-07 14:18:53', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=add'); -- id=100
INSERT INTO store (storeName, nameEn, branchId, addressAr, addressEn, phone, email, storeDate, storeDescription, conditions, userId, treeId, treeIdBetween, webApiId) VALUES ('مخزن الزقازيق', '', '0', '', '', '', '', '2026-10-07', "", '0', '1', '0', '0', '0'); -- id=4
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('مخزن الزقازيق', 'مخزن الزقازيق', 'مخزن الزقازيق', 'مخزن الزقازيق', '49', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-07 14:18:53'); -- id=427
INSERT INTO accountstree (name, customName, customNameEn, nameEn, parent, accountNature, theValue, theOrder, layingOrder, reportid, listId, notes, itemfrom, itemtype, itemtype2, itemtype3, userid, del, sysdate) VALUES ('مخزن الزقازيق وسيط', 'مخزن الزقازيق وسيط', 'مخزن الزقازيق وسيط', 'مخزن الزقازيق وسيط', '49', '0', '0', '0', '', '1', '1', '', '0', '3', '1', '', '1', '0', '2026-10-07 14:18:53'); -- id=428
UPDATE store SET storeName = 'مخزن الزقازيق', nameEn = '', branchId = '0', addressAr = '', addressEn = '', phone = '', email = '', storeDate = '2026-10-07', storeDescription = "", conditions = '0', userId = '1', treeId = '427', treeIdBetween = '428', updatedAt = CURRENT_TIMESTAMP WHERE storeId = '4';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:48:53";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:18:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storeController.php', '2026-10-07 14:18:53', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storeController.php?do=sucess'); -- id=101
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:49:04";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:19:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:19:04', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=102
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:49:04";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:19:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:19:04', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=103
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:49:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:19:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:19:05', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=104
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:50:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:20:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:20:25', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=add'); -- id=105
BEGIN;
CALL insertUniqueOptNum(3,1,4,5,44,'2026-10-07',1,0, '' , '' ,0,0,0,0,0,'2026-10-07 14:20:25',0,'',0,'','hide',0,@id,@optnum);
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '5';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 5, 0, 0
                    , 1150.00, 44, 0, 0, 1, '2026-10-07 14:20:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-44, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:20:25' ; -- id=1
UPDATE storemovement SET  buyPricesHistoryBookData = "44*2026-10-07*1150.00," WHERE transferproductid = 13;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '44', '1', '13', 'تحويل منتجات من المخزن', 'storemovementController.php', '44', '0', '1', '2026-10-07','0','0'); -- id=45
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('5', '4', '44', '1', '2026-10-07'); -- id=23
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 4, 5, 0, 0
                    , 1150.00, 44, 0, 0, 1, '2026-10-07 14:20:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+44, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:20:25' ; -- id=32
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '4', '44', '0', '13', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '44', '1', '2026-10-07','0','0'); -- id=46
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', '4', '6', '4', '2026-10-07', '1', '0','3','0','0','2026-10-07 14:20:25','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=14
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '6';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 6, 0, 0
                    , 1250.00, 4, 0, 0, 1, '2026-10-07 14:20:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-4, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:20:25' ; -- id=2
UPDATE storemovement SET  buyPricesHistoryBookData = "4*2026-10-07*1250.00," WHERE transferproductid = 14;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '1', '4', '1', '14', 'تحويل منتجات من المخزن', 'storemovementController.php', '4', '0', '1', '2026-10-07','0','0'); -- id=47
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('6', '4', '4', '1', '2026-10-07'); -- id=24
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 4, 6, 0, 0
                    , 1250.00, 4, 0, 0, 1, '2026-10-07 14:20:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:20:25' ; -- id=34
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '4', '4', '0', '14', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '4', '1', '2026-10-07','0','0'); -- id=48
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', '4', '7', '4', '2026-10-07', '1', '0','3','0','0','2026-10-07 14:20:25','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=15
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '7';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 7, 0, 0
                    , 1950.00, 4, 0, 0, 1, '2026-10-07 14:20:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-4, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:20:25' ; -- id=3
UPDATE storemovement SET  buyPricesHistoryBookData = "4*2026-10-07*1950.00," WHERE transferproductid = 15;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '1', '4', '1', '15', 'تحويل منتجات من المخزن', 'storemovementController.php', '4', '0', '1', '2026-10-07','0','0'); -- id=49
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('7', '4', '4', '1', '2026-10-07'); -- id=25
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 4, 7, 0, 0
                    , 1950.00, 4, 0, 0, 1, '2026-10-07 14:20:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:20:25' ; -- id=36
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '4', '4', '0', '15', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '4', '1', '2026-10-07','0','0'); -- id=50
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', '4', '8', '16', '2026-10-07', '1', '0','3','0','0','2026-10-07 14:20:25','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=16
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '8';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 8, 0, 0
                    , 1230.00, 16, 0, 0, 1, '2026-10-07 14:20:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-16, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:20:25' ; -- id=4
UPDATE storemovement SET  buyPricesHistoryBookData = "16*2026-10-07*1230.00," WHERE transferproductid = 16;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('8', '1', '16', '1', '16', 'تحويل منتجات من المخزن', 'storemovementController.php', '16', '0', '1', '2026-10-07','0','0'); -- id=51
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('8', '4', '16', '1', '2026-10-07'); -- id=26
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 4, 8, 0, 0
                    , 1230.00, 16, 0, 0, 1, '2026-10-07 14:20:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+16, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:20:25' ; -- id=38
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('8', '4', '16', '0', '16', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '16', '1', '2026-10-07','0','0'); -- id=52
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', '4', '9', '4', '2026-10-07', '1', '0','3','0','0','2026-10-07 14:20:25','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=17
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '9';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 9, 0, 0
                    , 1400.00, 4, 0, 0, 1, '2026-10-07 14:20:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-4, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:20:25' ; -- id=5
UPDATE storemovement SET  buyPricesHistoryBookData = "4*2026-10-07*1400.00," WHERE transferproductid = 17;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '1', '4', '1', '17', 'تحويل منتجات من المخزن', 'storemovementController.php', '4', '0', '1', '2026-10-07','0','0'); -- id=53
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('9', '4', '4', '1', '2026-10-07'); -- id=27
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 4, 9, 0, 0
                    , 1400.00, 4, 0, 0, 1, '2026-10-07 14:20:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:20:25' ; -- id=40
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '4', '4', '0', '17', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '4', '1', '2026-10-07','0','0'); -- id=54
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', '4', '10', '3', '2026-10-07', '1', '0','3','0','0','2026-10-07 14:20:25','0','','0','hide','0','0','0','','','','0','0','','0'); -- id=18
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '10';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 10, 0, 0
                    , 1550.00, 3, 0, 0, 1, '2026-10-07 14:20:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-3, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:20:25' ; -- id=6
UPDATE storemovement SET  buyPricesHistoryBookData = "3*2026-10-07*1550.00," WHERE transferproductid = 18;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '1', '3', '1', '18', 'تحويل منتجات من المخزن', 'storemovementController.php', '3', '0', '1', '2026-10-07','0','0'); -- id=55
INSERT INTO storedetail (productid, storeid, productquantity, userid, storedetaildate) VALUES ('10', '4', '3', '1', '2026-10-07'); -- id=28
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 4, 10, 0, 0
                    , 1550.00, 3, 0, 0, 1, '2026-10-07 14:20:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+3, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:20:25' ; -- id=42
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '4', '3', '0', '18', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '3', '1', '2026-10-07','0','0'); -- id=56
UPDATE storedetail SET inUse = 0 WHERE storedetailid=5;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=6;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=7;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=8;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=9;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=10;
COMMIT;
BEGIN;
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '93330', '93330', '2026-10-07', '1', '0', '0', '2026-10-07 14:20:25','تحويل من مخزن المخزن الرئيسي الى مخزن مخزن الزقازيق','1','0',null,'0','3','storemovementController.php?do=show&operationnum=3'); -- id=8
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('8', '427', '93330', '','0'); -- id=8
UPDATE accountstree SET name = 'مخزن الزقازيق', customName = 'مخزن الزقازيق', customNameEn = 'مخزن الزقازيق', nameEn = 'مخزن الزقازيق', parent = '49', accountNature = '0', theValue = '93330', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 14:18:53' WHERE id = '427';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('8', '382', '93330', '','0'); -- id=8
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '18700', 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 =8 WHERE operationnum = 3;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:50:26";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:20:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:20:26', '1', 'editshow', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=editshow&operationnum=3'); -- id=106
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:50:35";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:20:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 14:20:35', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=107
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:51:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:21:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:21:50', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=add'); -- id=108
BEGIN;
CALL insertUniqueOptNum(5,2,1,5,12,'2026-10-07',1,0, '' , '' ,0,0,0,0,0,'2026-10-07 14:21:50',0,'',0,'','hide',0,@id,@optnum);
UPDATE storedetail SET  productquantity = '-2', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '11';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 5, 0, 0
                    , 1150.00, 10, 0, 0, 1, '2026-10-07 14:21:50')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-10, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:21:50' ; -- id=8
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 5, 0, 0
                    , 1150.00, -2, 0, 0, 1, '2026-10-07 14:21:50')
                ON DUPLICATE KEY UPDATE buyprice = 1150.00,
                        buyQuantity =buyQuantity+-2, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:21:50' ; -- id=8
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-07*1150.00,2*2026-10-07*1150.00," WHERE transferproductid = 19;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '2', '12', '1', '19', 'تحويل منتجات من المخزن', 'storemovementController.php', '10', '-2', '1', '2026-10-07','0','0'); -- id=57
UPDATE storedetail SET  productquantity = '12', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '5';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 5, 0, 0
                    , 1150.00, 10, 0, 0, 1, '2026-10-07 14:21:50')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:21:50' ; -- id=1
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 5, 0, 0
                    , 1150.00, 2, 0, 0, 1, '2026-10-07 14:21:50')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+2, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:21:50' ; -- id=1
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '12', '0', '19', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '12', '1', '2026-10-07','0','0'); -- id=58
UPDATE storedetail SET inUse = 0 WHERE storedetailid=11;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=5;
COMMIT;
BEGIN;
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '13800', '13800', '2026-10-07', '1', '0', '0', '2026-10-07 14:21:50','تحويل من مخزن مخزن المتاجر الى مخزن المخزن الرئيسي','1','0',null,'0','5','storemovementController.php?do=show&operationnum=5'); -- id=9
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('9', '382', '13800', '','0'); -- id=9
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '32500', theOrder = '0', layingOrder = '120202', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2022-05-08 23:13:11' WHERE id = '382';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('9', '421', '13800', '','0'); -- id=9
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '60650', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 13:19:12' WHERE id = '421';
COMMIT;
COMMIT;
UPDATE storemovement SET  dailyentryid =9 WHERE operationnum = 5;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:51:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:21:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:21:50', '1', 'editshow', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=editshow&operationnum=5'); -- id=109
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:53:38";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:23:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:23:38', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=show'); -- id=110
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:53:46";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:23:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:23:46', '1', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=edit&id=5'); -- id=111
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:54:07";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:24:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:24:07', '1', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=edit&id=3'); -- id=112
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:58:28";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:58:30";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:28:30", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:58:31";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 14:28:31", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:58:38";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:28:38", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:58:56";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:28:56", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:59:02";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:29:02", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:59:15";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:29:15", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:59:16";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:29:16", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:59:24";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:29:24", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:59:27";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:29:27", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:59:36";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:29:36", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 10:59:44";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:29:44", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:00:20";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:30:20", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:00:41";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:30:41", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:01:19";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:31:19", deviceType = "DESKTOP" WHERE userid = -1;
BEGIN;
CALL insertUniqueOptNum(6,1,2,5,2,'2026-10-07',-1,0, '' , '' ,0,0,0,0,0,'2026-10-07 14:31:19',0,'',0,'','hide',0,@id,@optnum);
UPDATE storedetail SET  productquantity = '10', userid = '-1', storedetaildate = '2026-10-07' WHERE storedetailid = '5';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 5, 0, 0
                    , 1150.00, 2, 0, 0, 1, '2026-10-07 14:31:19')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-2, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:31:19' ; -- id=1
UPDATE storemovement SET  buyPricesHistoryBookData = "2*2026-10-07*1150.00," WHERE transferproductid = 20;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '2', '1', '20', 'تحويل منتجات من المخزن', 'storemovementController.php', '12', '10', '-1', '2026-10-07','0','0'); -- id=59
UPDATE storedetail SET  productquantity = '0', userid = '-1', storedetaildate = '2026-10-07' WHERE storedetailid = '11';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 5, 0, 0
                    , 1150.00, 2, 0, 0, -1, '2026-10-07 14:31:19')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+2, sellQuantity = sellQuantity+0,
                        del = 0,userid = -1,sysDate = '2026-10-07 14:31:19' ; -- id=8
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '2', '2', '0', '20', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '-2', '0', '-1', '2026-10-07','0','0'); -- id=60
UPDATE storedetail SET inUse = 0 WHERE storedetailid=5;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=11;
COMMIT;
BEGIN;
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '2300', '2300', '2026-10-07', '-1', '0', '0', '2026-10-07 14:31:19','تحويل من مخزن المخزن الرئيسي الى مخزن مخزن المتاجر','1','0',null,'0','6','storemovementController.php?do=show&operationnum=6'); -- id=10
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('10', '421', '2300', '','0'); -- id=10
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '62950', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 13:19:12' WHERE id = '421';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('10', '382', '2300', '','0'); -- id=10
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '30200', 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 =10 WHERE operationnum = 6;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:01:20";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:31:20", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:01:26";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:31:26", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:01:38";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:31:38", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:02:36";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:32:36", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:02:40";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:32:40", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:02:55";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:32:55", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE usergroup SET storenegative=0 WHERE usergroupid = 1;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:02:55";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:32:55", deviceType = "DESKTOP" WHERE userid = -1;
UPDATE user SET loginip = "" WHERE userid = -1;
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:03:32";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:33:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 14:33:32', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=113
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:03:32";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 14:33:32', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=114
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:04:16";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:34:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:34:16', '1', 'add', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=add'); -- id=115
BEGIN;
CALL insertUniqueOptNum(7,1,2,5,14,'2026-10-07',1,0, '' , '' ,0,0,0,0,0,'2026-10-07 14:34:16',0,'',0,'','hide',0,@id,@optnum);
UPDATE storedetail SET  productquantity = '-4', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '5';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 5, 0, 0
                    , 1150.00, 10, 0, 0, 1, '2026-10-07 14:34:16')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-10, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:34:16' ; -- id=1
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 1, 5, 0, 0
                    , 1150.00, -4, 0, 0, 1, '2026-10-07 14:34:16')
                ON DUPLICATE KEY UPDATE buyprice = 1150.00,
                        buyQuantity =buyQuantity+-4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:34:16' ; -- id=1
UPDATE storemovement SET  buyPricesHistoryBookData = "10*2026-10-07*1150.00,4*2026-10-07*1150.00," WHERE transferproductid = 21;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '1', '14', '1', '21', 'تحويل منتجات من المخزن', 'storemovementController.php', '10', '-4', '1', '2026-10-07','0','0'); -- id=61
UPDATE storedetail SET  productquantity = '14', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '11';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 5, 0, 0
                    , 1150.00, 10, 0, 0, 1, '2026-10-07 14:34:16')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+10, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:34:16' ; -- id=8
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2026-10-07', 2, 5, 0, 0
                    , 1150.00, 4, 0, 0, 1, '2026-10-07 14:34:16')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+4, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2026-10-07 14:34:16' ; -- id=8
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('5', '2', '14', '0', '21', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0', '14', '1', '2026-10-07','0','0'); -- id=62
UPDATE storedetail SET inUse = 0 WHERE storedetailid=5;
UPDATE storedetail SET inUse = 0 WHERE storedetailid=11;
COMMIT;
BEGIN;
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '16100', '16100', '2026-10-07', '1', '0', '0', '2026-10-07 14:34:16','تحويل من مخزن المخزن الرئيسي الى مخزن مخزن المتاجر','1','0',null,'0','7','storemovementController.php?do=show&operationnum=7'); -- id=11
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('11', '421', '16100', '','0'); -- id=11
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '79050', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 13:19:12' WHERE id = '421';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('11', '382', '16100', '','0'); -- id=11
UPDATE accountstree SET name = 'مخزن1', customName = 'المخزن الرئيسي', customNameEn = 'مخزن1', nameEn = 'مخزن1', parent = '49', accountNature = '0', theValue = '14100', 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 =11 WHERE operationnum = 7;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:04:17";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:34:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:34:17', '1', 'sucess', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=sucess'); -- id=116
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:04:21";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:34:21", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:34:21', '1', 'show', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=show'); -- id=117
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:04:25";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 14:34:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 14:34:25', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php?do=edit&id=7'); -- id=118
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:07:56";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:37:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 14:37:56', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=119
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:07:56";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 14:37:56', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=120
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:07:57";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:37:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 14:37:57', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=121
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:07:57";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 14:37:57', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=122
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:24:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:54:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-07 14:54:25', '1', 'o.royalgt4.com:443/erp/controllers/supplierPayedDeptController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/supplierPayedDeptController.php'); -- id=123
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:25:02";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 14:55:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-07 14:55:02', '1', 'o.royalgt4.com:443/erp/controllers/supplierPayedDeptController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/supplierPayedDeptController.php'); -- id=124
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:30:20";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:00:20", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 15:00:20', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=125
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:30:20";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 15:00:20', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=126
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:34:40";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:04:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storedetailController.php', '2026-10-07 15:04:40', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storedetailController.php?do=show'); -- id=127
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:40:50";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:41:00";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:11:00", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 15:11:00', '4', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=128
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:41:01";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 15:11:01", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 15:11:01', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=129
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:41:12";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:11:12", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:11:12', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=130
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:41:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:11:15", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:11:15', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=131
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:41:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:11:15", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:11:15', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=132
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:41:17";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:11:17", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:11:17', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=133
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:41:19";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:11:19", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:11:19', '4', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=134
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:41:23";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:11:23", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:11:23', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=135
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:41:57";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:11:57", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:11:57', '4', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=136
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:43:39";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:13:39", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:13:39', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=137
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:43:55";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:13:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:13:55', '1', 'edit', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=edit&userid=4'); -- id=138
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:44:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:14:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:14:05', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=update'); -- id=139
UPDATE user SET username = 'محمود', password = '123', usergroupid = '3', employeename = 'محمود', currentdate = '2026-10-07', conditions = '0', saveid = '2'  , userstoreid ='2' ,awardrate = '0' ,searchinonesave = '1', branchId = '-1', question = '', answer = '',blockedByLimits = '0',directSaveBills = '0',userstoreidDef='2',empid='0',obygyDoctorId = '0',lang = '',viewclients = '1',viewbills = '1',storeSupervisor='0',storeSupervisorStores='',projectids='0',bankids='0',saveids='-1,2',searchinonestorebalance='0',storeids='2',webApiId='0',closeSavid='2',charityids='0',laterNakdiUserIds='-1,-1',awardrategomla = '0',awardratehalf = '0', dellaternakdipayed='1',accountids='0',treeId='0' WHERE userid = '4';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:44:06";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:14:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:14:06', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=sucess'); -- id=140
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:44:09";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:14:09", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:14:09', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=141
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:44:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:14:15", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:14:15', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=142
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:44:17";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:14:17", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:14:17', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=143
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:44:59";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:14:59", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:14:59', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=144
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:45:01";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:15:01", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:15:01', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=145
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:46:00";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:16:00", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:16:00', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=146
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:48:58";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:18:58", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:18:58', '4', 'addAndRetuen', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=147

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac63800a92ca
-- ----------------------------------------------------------------------------------------------------

BEGIN;
INSERT INTO sellbill (sellbilldate, sellbillserial, sellbillclientid, sellbilltotaldeptbefor, sellbilltotaldeptafter, sellbilldiscount, sellbilldiscounttype, sellbilltotalbill, sellbillaftertotalbill, sellbilltotalpayed, sellbillfinalbill, sellbillstoreid, sellbillsysdate,comment, userid, conditions, sellbillclientname, sellbillsaveid, sellbildirectpayment, billnameid, sellerid, tempclientName, sellQuantity,tax ,carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,obygyVisitId,onlineOrderId,delbyuserid,delivery,totalafterdelivery,billReservation,billReservationDate,webApiId,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal,taxBillNumber,collectionType,collectionDate,qrerpid,qrerpids,autoSaveFlag,ereason,estatus,epdf,obgyBillType,billoperationid,datestarting,pricetype,currencyId,knownwayId,travelDriverId,travelBusId,travelPathId,travelTripId,travelTripTypeId,travelTripDateId,totalprodiscount,manage_ex,med_hallmark,pay_rec_no,pay_rec_val,decisionNo,decisionValue,sellToSupplier,supplierbuybillid,sellbilltypeclientid,shipfrom,shipto,paymethodshipping,whatShippingCost,clientaddress,tagids,obgyRefDoc,addressid,couponid,paymenttypeid,paymentdetails) VALUES ('2026-10-07 15:18:58', '06ac63800a92ca', '1', '0.00', '0', '0', '1', '3400.00', '3400', '3400', '0', '2', '2026-10-07 15:18:58', '', '4', '0', 'نقدي', '2', '0', '3', '0', 'نقدي', '2' ,'0','','','','','-1','0','0','0','0','0','3400','0','','0','1','3400','0','0','0','0','0','0','0','0','','','','0','','0','','0','-1','2026-10-07','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','','','0','0','0',''); -- id=1
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','اضافة فاتورة مبيعات','1', '0', '2026-10-07 15:18:58', '4', 'sellbillController.php', 'اضافة فاتورة مبيعات', '3400', '0', null, '0', null, null,'', '0','1','1','0','1','2026-10-07 15:18:58','0','0','',''); -- id=1
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 where id = 10;
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 ('1250','00006', '1', '4', '6', '1', '1600', '1600', '0', '', '0', '2026-10-07 15:18:58', '6', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','10-1,','1','1','0','0','1600','1600','0','','0','0.00','0','0','0','0'); -- id=1
UPDATE sellbilldetail SET  lastbuyprice = 1250.00 , meanbuyprice = 1250.00, lastbuyprice_withDiscount = 1250.00, meanbuyprice_withDiscount = 1250.00
        , lastbuyprice_withTax = 1250, meanbuyprice_withTax = 1250, lastbuyprice_withDiscountAndTax = 1250
                where sellbilldetailid = 1;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (6, '2026-10-07', 1600, 1250, 1250
                    , 1250, 1250, 1250, 1250
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 1250, 1250, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1600, sellCostBuyPrice =sellCostBuyPrice+1250
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1250, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1250
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1250, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1250
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1250
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1250
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1250
                        , returnSellVal = returnSellVal+0, 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-07', 1600, 1250, 1250
                    , 1250, 1250, 1250, 1250
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1250, 1250, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1600, sellCostBuyPrice =sellCostBuyPrice+1250
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1250, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1250
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1250, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1250
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1250
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1250
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1250
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '9', userid = '4', storedetaildate = '2026-10-07 15:18:58' WHERE storedetailid = '12';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('6', '2', '1', '1', '1', 'اضافة فاتورة مبيعات', 'sellbillController.php', '10', '9', '4', '2026-10-07 15:18:58','0','0'); -- id=63
UPDATE buypriceshistorybook set sellQuantity = sellQuantity+1 where id = 16;
INSERT INTO sellbilldetail (buyprice, parcode, sellbillid, sellbilldetailcatid, sellbilldetailproductid, sellbilldetailquantity, sellbilldetailprice, sellbilldetailtotalprice, discountvalue, note, pricetype, sellbilldetaildate, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,onlineOrderId,pricetypepro,playstationPlayId,soldSerialsInDetails,buyPricesHistoryBookIdQuantity,proHeight,proWidth,lastbuyprice_withTax,meanbuyprice_withTax,sellbilldetailpriceC,sellbilldetailtotalpriceC,discountvalueC,proSellTrackingSerial,travelBrokerId,categorydiscount,lastbuyprice_withDiscountAndTax,prosellDiscountPer,prosellDiscountPerType,prosellDiscountVal) VALUES ('1400','00009', '1', '4', '9', '1', '1800', '1800', '0', '', '0', '2026-10-07 15:18:58', '9', '0.00', '-1', '2','0.00','','','0','0','0','0','0','0','0','0','','16-1,','1','1','0','0','1800','1800','0','','0','0.00','0','0','0','0'); -- id=2
UPDATE sellbilldetail SET  lastbuyprice = 1400.00 , meanbuyprice = 1400.00, lastbuyprice_withDiscount = 1400.00, meanbuyprice_withDiscount = 1400.00
        , lastbuyprice_withTax = 1400, meanbuyprice_withTax = 1400, lastbuyprice_withDiscountAndTax = 1400
                where sellbilldetailid = 2;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (9, '2026-10-07', 1800, 1400, 1400
                    , 1400, 1400, 1400, 1400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0, 1400, 1400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1800, sellCostBuyPrice =sellCostBuyPrice+1400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0
                        , netQuantity = netQuantity+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-07', 1800, 1400, 1400
                    , 1400, 1400, 1400, 1400
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1400, 1400, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+1800, sellCostBuyPrice =sellCostBuyPrice+1400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+1400, sellCostMeanBuyPrice = sellCostMeanBuyPrice+1400
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+1400, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+1400
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+1400
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+1400
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+1400
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
UPDATE storedetail SET  productquantity = '9', userid = '4', storedetaildate = '2026-10-07 15:18:58' WHERE storedetailid = '15';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '2', '1', '1', '1', 'اضافة فاتورة مبيعات', 'sellbillController.php', '10', '9', '4', '2026-10-07 15:18:58','0','0'); -- id=64
CALL saveInUse(2,@saveidis,@savecurrentvalueis,@currencyIdis,@treeIdis,@conversionFactoris);
UPDATE save SET  savecurrentvalue = '3400',  userid = '4' WHERE saveid = '2';
UPDATE save SET  inUse = 0 where saveid = 2;
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note,clientdebtchangeidfk) VALUES ('0','3400', '0', '2', 'اضافة فاتورة مبيعات', '1', '3400', '2026-10-07 15:18:58', '4',  'sellbillController.php','1','','0'); -- id=3
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '3400', '3400', '2026-10-07', '4', '0', '0', '2026-10-07 15:18:58','اضافة فاتورة مبيعات رقم 1','1','0',null,'0','1','sellbillController.php?do=showDetail&sellbillid=1'); -- id=12
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('12', '419', '3400', '','0'); -- id=12
UPDATE accountstree SET name = 'خزنة المتاجر', customName = 'خزنة المتاجر', customNameEn = 'خزنة المتاجر', nameEn = 'خزنة المتاجر', parent = '40', accountNature = '0', theValue = '3400', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 13:18:11' WHERE id = '419';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('12', '143', '3400', '','0'); -- id=12
UPDATE accountstree SET name = 'ايرادات المبيعات ', customName = 'ايرادات المبيعات ', customNameEn = 'Revenue of Sales', nameEn = 'Revenue of Sales', parent = '142', accountNature = '1', theValue = '3400', 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 ( '2650', '2650', '2026-10-07', '4', '0', '0', '2026-10-07 15:18:58','اضافة فاتورة مبيعات رقم 1 - صرف البضاعة من المخزن','1','0',null,'0','1','sellbillController.php?do=showDetail&sellbillid=1'); -- id=13
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('13', '402', '2650', '','0'); -- id=13
UPDATE accountstree SET name = 'تكلفة التشغيل', customName = 'تكلفة التشغيل', customNameEn = '', nameEn = '', parent = '160', accountNature = '0', theValue = '2650', 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 ('13', '421', '2650', '','0'); -- id=13
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '76400', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 13:19:12' WHERE id = '421';
update sellbill set dailyentryid='12,0,13' where sellbillid=1;
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES ('2026-10-07', 3400, 2650, 2650
                    , 2650, 2650, 2650, 2650
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,2650, 2650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3400, sellCostBuyPrice =sellCostBuyPrice+2650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2650
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                            , returnSellCostLastBuyPricewithTax = returnSellCostLastBuyPricewithTax+0
                            , returnSellCostMeanBuyPricewithTax = returnSellCostMeanBuyPricewithTax+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice,sellCostLastBuyPricewithTax,sellCostMeanBuyPricewithTax,returnSellCostLastBuyPricewithTax,returnSellCostMeanBuyPricewithTax)
                    VALUES (1, '2026-10-07', 3400, 2650, 2650
                    , 2650, 2650, 2650, 2650
                    , 0, 0, 0, 0
                    , 0, 0, 0 ,2650, 2650, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+3400, sellCostBuyPrice =sellCostBuyPrice+2650
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+2650, sellCostMeanBuyPrice = sellCostMeanBuyPrice+2650
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+2650, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+2650
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+2650
                            , sellCostLastBuyPricewithTax = sellCostLastBuyPricewithTax+2650
                            , sellCostMeanBuyPricewithTax = sellCostMeanBuyPricewithTax+2650
                        , returnSellVal = returnSellVal+0, 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, 3400, 2650, 2650
                    , 2650, 2650, 2650, 2650, 2650, 2650)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+3400, netSellCostBuyPrice = netSellCostBuyPrice+2650
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+2650
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+2650
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+2650
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+2650
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+2650
                , netSellCostLastBuyPricewithTax = netSellCostLastBuyPricewithTax+2650
                , netSellCostMeanBuyPricewithTax = netSellCostMeanBuyPricewithTax+2650;
COMMIT;

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

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:48:58";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:18:58", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:18:58', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=148
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:49:14";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:19:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('menuurController.php', '2026-10-07 15:19:14', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/menuurController.php?do=show'); -- id=149
UPDATE menuurl SET urltitle = 'فواتير المبيعات للتعديل', menuurl = 'sellbillController.php?do=show', urlimage = 'd4b5efa18fbf59dedcf68c7418174984.png', usergroupid = '-1,1,3' , orderno = '29' WHERE menuurlid = '29';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:49:37";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:19:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('menuurController.php', '2026-10-07 15:19:37', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/menuurController.php?do=show'); -- id=150
UPDATE menuurl SET urltitle = 'فاتورة مبيعات', menuurl = 'sellbillController.php?do=addsellBill&billnameid=3', urlimage = '1dc95e15daed93ba0013692122c4a11e.png', usergroupid = '-1,1,3' , orderno = '0' WHERE menuurlid = '1';
UPDATE menuurl SET urltitle = 'فاتورة مردود بيع', menuurl = 'sellbillController.php?do=addsellBill&billnameid=5', urlimage = '6448eefd3d761edfe44f104d192e85e5.png', usergroupid = '-1,1,3' , orderno = '0' WHERE menuurlid = '2';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:50:02";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:20:02", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:20:02', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=151
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:50:04";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:20:04", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:20:04', '4', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=show'); -- id=152
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:50:07";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:20:07", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:20:07', '4', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=show'); -- id=153
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:50:09";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:20:09", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:20:09', '4', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=show'); -- id=154
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:50:15";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:20:15", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:20:15', '4', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=show'); -- id=155
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:50:18";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:20:18", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:20:18', '4', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=show'); -- id=156
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:50:41";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:20:41", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:20:41', '4', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=show'); -- id=157
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:50:45";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:20:45", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:20:45', '4', 'editsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=editsellBill&sellbillid=1'); -- id=158
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:54:10";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:24:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:24:10', '1', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=159
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:54:11";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:24:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:24:11', '1', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=160
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:55:01";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:25:01", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:25:01', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=161
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:55:29";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:25:29", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:25:29', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=162
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:55:34";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:25:34", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:25:34', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=5'); -- id=163
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:56:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:26:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 15:26:25', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=164
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-10-07', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '0',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '0' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '1' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '0' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '0' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '0' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '0' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:56:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:26:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 15:26:25', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=165
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 11:56:29";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:26:29", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:26:29', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=166
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:00:34";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:30:34", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:30:34', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=167
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:01:14";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:31:14", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:31:14', '4', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=show'); -- id=168
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:01:17";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:31:17", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:31:17', '4', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=show'); -- id=169
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:01:26";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:31:26", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:31:26', '4', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=show'); -- id=170
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:01:44";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:31:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('transfermoneyController.php', '2026-10-07 15:31:44', '1', 'o.royalgt4.com:443/erp/controllers/transfermoneyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/transfermoneyController.php'); -- id=171
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:02:09";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:32:09", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('savedailyController.php', '2026-10-07 15:32:09', '4', 'o.royalgt4.com:443/erp/controllers/savedailyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/savedailyController.php'); -- id=172
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:03:33";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:33:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankAccountOpController.php', '2026-10-07 15:33:33', '1', 'o.royalgt4.com:443/erp/controllers/bankAccountOpController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankAccountOpController.php'); -- id=173
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:03:37";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:33:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('bankAccountOpController.php', '2026-10-07 15:33:37', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/bankAccountOpController.php?do=show'); -- id=174
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:03:52";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:33:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('transfermoneyController.php', '2026-10-07 15:33:52', '1', 'o.royalgt4.com:443/erp/controllers/transfermoneyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/transfermoneyController.php'); -- id=175
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:05:37";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:35:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('transfermoneyController.php', '2026-10-07 15:35:37', '1', 'o.royalgt4.com:443/erp/controllers/transfermoneyController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/transfermoneyController.php'); -- id=176
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:14:18";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:44:18", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('supplierPayedDeptController.php', '2026-10-07 15:44:18', '1', 'o.royalgt4.com:443/erp/controllers/supplierPayedDeptController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/supplierPayedDeptController.php'); -- id=177
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:15:27";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:15:30";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 15:45:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 15:45:30', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=178
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:15:30";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 15:45:30', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=179
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:15:35";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 15:45:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('usergroupController.php', '2026-10-07 15:45:35', '1', 'edit', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/usergroupController.php?do=edit&id=1'); -- id=180
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:15:49";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 15:45:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 15:45:49', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=181
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:15:50";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 15:45:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 15:45:50', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=182
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:15:50";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 15:45:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 15:45:50', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=183
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:15:52";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 15:45:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 15:45:52', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=184
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:15:52";
UPDATE user SET loginip = "81.10.55.229", lastactivetime = "2026-10-07 15:45:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('storemovementController.php', '2026-10-07 15:45:52', '1', 'o.royalgt4.com:443/erp/controllers/storemovementController.php', '81.10.55.229', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/storemovementController.php'); -- id=185
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:16:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:46:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('cashTransferController.php', '2026-10-07 15:46:05', '1', 'o.royalgt4.com:443/erp/controllers/cashTransferController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/cashTransferController.php'); -- id=186
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:18:08";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:48:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 15:48:08', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=187
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:18:08";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 15:48:08', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=188
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:20:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:50:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-07 15:50:05', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=189
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '16';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('10', '2', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '3', '4', '1', '2026-10-07','0','0'); -- id=65
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '1550', '1550', '2026-10-07', '1', '0', '0', '2026-10-07 15:50:05','اعادة جرد للمنتج : (جاكت 268809/جاكت) فى مخزن : (مخزن المتاجر) بالكمية : 4','1','0',null,'0','65','inventoryController.php?do=details&id=65'); -- id=14
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('14', '421', '1550', '','0'); -- id=14
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '77950', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 13:19:12' WHERE id = '421';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('14', '188', '1550', '','0'); -- id=14
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-20250', 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-07 12:20:07";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:50:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('inventoryController.php', '2026-10-07 15:50:07', '1', 'autosave', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/inventoryController.php?do=autosave'); -- id=190
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2026-10-07' WHERE storedetailid = '15';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('9', '2', '5', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '9', '4', '1', '2026-10-07','0','0'); -- id=66
BEGIN;
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid,isopeningentry,operationId,operationDetailLink) VALUES ( '7000', '7000', '2026-10-07', '1', '0', '0', '2026-10-07 15:50:07','اعادة جرد للمنتج : (جاكت 8631/جاكت) فى مخزن : (مخزن المتاجر) بالكمية : 4','1','0',null,'0','66','inventoryController.php?do=details&id=66'); -- id=15
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('15', '188', '7000', '','0'); -- id=15
UPDATE accountstree SET name = 'عجز وزيادة المخزون', customName = 'عجز وزيادة المخزون', customNameEn = '', nameEn = '', parent = '159', accountNature = '0', theValue = '-13250', theOrder = '0', layingOrder = '5302', reportid = '2', listId = '2', notes = '', itemfrom = '1', itemtype = '5', itemtype2 = '0', itemtype3 = '', userid = '-1', del = '0', sysdate = '2023-07-11 01:08:03' WHERE id = '188';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('15', '421', '7000', '','0'); -- id=15
UPDATE accountstree SET name = 'مخزن المتاجر', customName = 'مخزن المتاجر', customNameEn = 'مخزن المتاجر', nameEn = 'مخزن المتاجر', parent = '49', accountNature = '0', theValue = '70950', theOrder = '0', layingOrder = '', reportid = '1', listId = '1', notes = '', itemfrom = '0', itemtype = '3', itemtype2 = '1', itemtype3 = '', userid = '1', del = '0', sysdate = '2026-10-07 13:19:12' WHERE id = '421';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:25:47";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:55:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:55:47', '1', 'add', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=add'); -- id=191
INSERT INTO user (username, password, usergroupid, employeename, currentdate, conditions, saveid,userstoreid ,awardrate,searchinonesave, branchId,question, answer,blockedByLimits,directSaveBills,userstoreidDef,empid,obygyDoctorId,lang,viewclients,viewbills,storeSupervisor,storeSupervisorStores,projectids,bankids,saveids,searchinonestorebalance,storeids,webApiId,closeSavid,charityids,laterNakdiUserIds,awardrategomla,awardratehalf,dellaternakdipayed,accountids,treeId) VALUES ('BN', '123', '2', 'رياض', '2026-10-07', '0', '2', '2' ,'0' ,'1','-1','','','0','0','2','0','0','','1','1','0','','0','0','2','0','2','0','2','-1,','-1,-1','0','0','1','0',''); -- id=5
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:25:47";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:55:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userController.php', '2026-10-07 15:55:47', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userController.php?do=sucess'); -- id=192
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:26:38";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:56:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 15:56:38', '1', 'update', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=update'); -- id=193
UPDATE billname SET name = 'فاتورة مبيعات', userid = '1', conditions = '0', billnamedate = '2026-10-07', billtype = '0' , billtype2 = '0' ,ordertype = '0' ,saveeffect = '0',productAndQuantityOnly = '1' ,posFlag = '0',posCode = '0',posType = '0',posWeightPrice = '0',checkDigit = '0',goodsReceiptApproval = '',parcodeType = '0',defVisaAccount = '0',defVisaAccountSelect = '0',isBankAccountTransfer = '0',taxOfDiscountVal='0',taxOfDiscountPrint='1',extraDiscountPlace='0',extraDiscountFixed = '0',extraDiscountPer='0',storeeffect='0',taxname='ضريبه القيمة المضافة'  WHERE billnameid = '3';
UPDATE billsettings SET billnameid = '3', billpropertyid = '1', billsettingsvalue = '1' WHERE billsettingsid = '29';
UPDATE billsettings SET billnameid = '3', billpropertyid = '2', billsettingsvalue = '0' WHERE billsettingsid = '30';
UPDATE billsettings SET billnameid = '3', billpropertyid = '3', billsettingsvalue = '0' WHERE billsettingsid = '31';
UPDATE billsettings SET billnameid = '3', billpropertyid = '4', billsettingsvalue = '0' WHERE billsettingsid = '32';
UPDATE billsettings SET billnameid = '3', billpropertyid = '5', billsettingsvalue = '0' WHERE billsettingsid = '33';
UPDATE billsettings SET billnameid = '3', billpropertyid = '6', billsettingsvalue = '0' WHERE billsettingsid = '34';
UPDATE billsettings SET billnameid = '3', billpropertyid = '7', billsettingsvalue = '1' WHERE billsettingsid = '35';
UPDATE billsettings SET billnameid = '3', billpropertyid = '8', billsettingsvalue = '1' WHERE billsettingsid = '36';
UPDATE billsettings SET billnameid = '3', billpropertyid = '9', billsettingsvalue = '1' WHERE billsettingsid = '37';
UPDATE billsettings SET billnameid = '3', billpropertyid = '10', billsettingsvalue = '1' WHERE billsettingsid = '38';
UPDATE billsettings SET billnameid = '3', billpropertyid = '11', billsettingsvalue = '0' WHERE billsettingsid = '39';
UPDATE billsettings SET billnameid = '3', billpropertyid = '12', billsettingsvalue = '0' WHERE billsettingsid = '40';
UPDATE billsettings SET billnameid = '3', billpropertyid = '13', billsettingsvalue = '1' WHERE billsettingsid = '41';
UPDATE billsettings SET billnameid = '3', billpropertyid = '15', billsettingsvalue = '1' WHERE billsettingsid = '42';
UPDATE billsettings SET billnameid = '3', billpropertyid = '16', billsettingsvalue = '0' WHERE billsettingsid = '143';
UPDATE billsettings SET billnameid = '3', billpropertyid = '17', billsettingsvalue = '0' WHERE billsettingsid = '144';
UPDATE billsettings SET billnameid = '3', billpropertyid = '18', billsettingsvalue = '0' WHERE billsettingsid = '145';
UPDATE billsettings SET billnameid = '3', billpropertyid = '20', billsettingsvalue = '0' WHERE billsettingsid = '147';
UPDATE billsettings SET billnameid = '3', billpropertyid = '21', billsettingsvalue = '0' WHERE billsettingsid = '148';
UPDATE billsettings SET billnameid = '3', billpropertyid = '22', billsettingsvalue = '1' WHERE billsettingsid = '149';
UPDATE billsettings SET billnameid = '3', billpropertyid = '23', billsettingsvalue = '1' WHERE billsettingsid = '150';
UPDATE billsettings SET billnameid = '3', billpropertyid = '24', billsettingsvalue = '1' WHERE billsettingsid = '151';
UPDATE billsettings SET billnameid = '3', billpropertyid = '25', billsettingsvalue = '1' WHERE billsettingsid = '152';
UPDATE billsettings SET billnameid = '3', billpropertyid = '26', billsettingsvalue = '0' WHERE billsettingsid = '153';
UPDATE billsettings SET billnameid = '3', billpropertyid = '29', billsettingsvalue = '1' WHERE billsettingsid = '244';
UPDATE billsettings SET billnameid = '3', billpropertyid = '30', billsettingsvalue = '0' WHERE billsettingsid = '256';
UPDATE billsettings SET billnameid = '3', billpropertyid = '31', billsettingsvalue = '0' WHERE billsettingsid = '257';
UPDATE billsettings SET billnameid = '3', billpropertyid = '32', billsettingsvalue = '0' WHERE billsettingsid = '258';
UPDATE billsettings SET billnameid = '3', billpropertyid = '33', billsettingsvalue = '0' WHERE billsettingsid = '259';
UPDATE billsettings SET billnameid = '3', billpropertyid = '34', billsettingsvalue = '1' WHERE billsettingsid = '309';
UPDATE billsettings SET billnameid = '3', billpropertyid = '35', billsettingsvalue = '1' WHERE billsettingsid = '310';
UPDATE billsettings SET billnameid = '3', billpropertyid = '36', billsettingsvalue = '0' WHERE billsettingsid = '311';
UPDATE billsettings SET billnameid = '3', billpropertyid = '37', billsettingsvalue = '0' WHERE billsettingsid = '326';
UPDATE billsettings SET billnameid = '3', billpropertyid = '38', billsettingsvalue = '1' WHERE billsettingsid = '333';
UPDATE billsettings SET billnameid = '3', billpropertyid = '39', billsettingsvalue = '1' WHERE billsettingsid = '340';
UPDATE billsettings SET billnameid = '3', billpropertyid = '40', billsettingsvalue = '1' WHERE billsettingsid = '347';
UPDATE billsettings SET billnameid = '3', billpropertyid = '41', billsettingsvalue = '1' WHERE billsettingsid = '354';
UPDATE billsettings SET billnameid = '3', billpropertyid = '42', billsettingsvalue = '1' WHERE billsettingsid = '361';
UPDATE billsettings SET billnameid = '3', billpropertyid = '43', billsettingsvalue = '0' WHERE billsettingsid = '368';
UPDATE billsettings SET billnameid = '3', billpropertyid = '44', billsettingsvalue = '0' WHERE billsettingsid = '375';
UPDATE billsettings SET billnameid = '3', billpropertyid = '45', billsettingsvalue = '0' WHERE billsettingsid = '382';
UPDATE billsettings SET billnameid = '3', billpropertyid = '46', billsettingsvalue = '1' WHERE billsettingsid = '389';
UPDATE billsettings SET billnameid = '3', billpropertyid = '47', billsettingsvalue = '2' WHERE billsettingsid = '396';
UPDATE billsettings SET billnameid = '3', billpropertyid = '48', billsettingsvalue = '1' WHERE billsettingsid = '403';
UPDATE billsettings SET billnameid = '3', billpropertyid = '49', billsettingsvalue = '0' WHERE billsettingsid = '650';
UPDATE billsettings SET billnameid = '3', billpropertyid = '50', billsettingsvalue = '0' WHERE billsettingsid = '651';
UPDATE billsettings SET billnameid = '3', billpropertyid = '51', billsettingsvalue = '0' WHERE billsettingsid = '652';
UPDATE billsettings SET billnameid = '3', billpropertyid = '52', billsettingsvalue = '0' WHERE billsettingsid = '653';
UPDATE billsettings SET billnameid = '3', billpropertyid = '53', billsettingsvalue = '0' WHERE billsettingsid = '654';
UPDATE billsettings SET billnameid = '3', billpropertyid = '54', billsettingsvalue = '0' WHERE billsettingsid = '685';
UPDATE billsettings SET billnameid = '3', billpropertyid = '56', billsettingsvalue = '0' WHERE billsettingsid = '690';
UPDATE billsettings SET billnameid = '3', billpropertyid = '57', billsettingsvalue = '0' WHERE billsettingsid = '700';
UPDATE billsettings SET billnameid = '3', billpropertyid = '58', billsettingsvalue = '0' WHERE billsettingsid = '703';
UPDATE billsettings SET billnameid = '3', billpropertyid = '59', billsettingsvalue = '0' WHERE billsettingsid = '752';
UPDATE billsettings SET billnameid = '3', billpropertyid = '60', billsettingsvalue = '0' WHERE billsettingsid = '756';
UPDATE billsettings SET billnameid = '3', billpropertyid = '61', billsettingsvalue = '0' WHERE billsettingsid = '759';
UPDATE billsettings SET billnameid = '3', billpropertyid = '62', billsettingsvalue = '0' WHERE billsettingsid = '782';
UPDATE billsettings SET billnameid = '3', billpropertyid = '63', billsettingsvalue = '0' WHERE billsettingsid = '787';
UPDATE billsettings SET billnameid = '3', billpropertyid = '64', billsettingsvalue = '0' WHERE billsettingsid = '794';
UPDATE billsettings SET billnameid = '3', billpropertyid = '65', billsettingsvalue = '1' WHERE billsettingsid = '867';
UPDATE billsettings SET billnameid = '3', billpropertyid = '66', billsettingsvalue = '0' WHERE billsettingsid = '875';
UPDATE billsettings SET billnameid = '3', billpropertyid = '67', billsettingsvalue = '0' WHERE billsettingsid = '876';
UPDATE billsettings SET billnameid = '3', billpropertyid = '68', billsettingsvalue = '0' WHERE billsettingsid = '885';
UPDATE billsettings SET billnameid = '3', billpropertyid = '69', billsettingsvalue = '0' WHERE billsettingsid = '898';
UPDATE billsettings SET billnameid = '3', billpropertyid = '71', billsettingsvalue = '0' WHERE billsettingsid = '900';
UPDATE billsettings SET billnameid = '3', billpropertyid = '72', billsettingsvalue = '0' WHERE billsettingsid = '901';
UPDATE billsettings SET billnameid = '3', billpropertyid = '73', billsettingsvalue = '1' WHERE billsettingsid = '902';
UPDATE billsettings SET billnameid = '3', billpropertyid = '74', billsettingsvalue = '1' WHERE billsettingsid = '903';
UPDATE billsettings SET billnameid = '3', billpropertyid = '75', billsettingsvalue = '0' WHERE billsettingsid = '904';
UPDATE billsettings SET billnameid = '3', billpropertyid = '76', billsettingsvalue = '0' WHERE billsettingsid = '905';
UPDATE billsettings SET billnameid = '3', billpropertyid = '77', billsettingsvalue = '0' WHERE billsettingsid = '936';
UPDATE billsettings SET billnameid = '3', billpropertyid = '78', billsettingsvalue = '0' WHERE billsettingsid = '937';
UPDATE billsettings SET billnameid = '3', billpropertyid = '79', billsettingsvalue = '1' WHERE billsettingsid = '938';
UPDATE billsettings SET billnameid = '3', billpropertyid = '80', billsettingsvalue = '1' WHERE billsettingsid = '939';
UPDATE billsettings SET billnameid = '3', billpropertyid = '81', billsettingsvalue = '0' WHERE billsettingsid = '940';
UPDATE billsettings SET billnameid = '3', billpropertyid = '82', billsettingsvalue = '1' WHERE billsettingsid = '941';
UPDATE billsettings SET billnameid = '3', billpropertyid = '83', billsettingsvalue = '0' WHERE billsettingsid = '961';
UPDATE billsettings SET billnameid = '3', billpropertyid = '84', billsettingsvalue = '1' WHERE billsettingsid = '966';
UPDATE billsettings SET billnameid = '3', billpropertyid = '85', billsettingsvalue = '0' WHERE billsettingsid = '974';
UPDATE billsettings SET billnameid = '3', billpropertyid = '86', billsettingsvalue = '0' WHERE billsettingsid = '975';
UPDATE billsettings SET billnameid = '3', billpropertyid = '87', billsettingsvalue = '0' WHERE billsettingsid = '976';
UPDATE billsettings SET billnameid = '3', billpropertyid = '88', billsettingsvalue = '1' WHERE billsettingsid = '977';
UPDATE billsettings SET billnameid = '3', billpropertyid = '89', billsettingsvalue = '1' WHERE billsettingsid = '990';
UPDATE billsettings SET billnameid = '3', billpropertyid = '90', billsettingsvalue = '0' WHERE billsettingsid = '991';
UPDATE billsettings SET billnameid = '3', billpropertyid = '91', billsettingsvalue = '0' WHERE billsettingsid = '992';
UPDATE billsettings SET billnameid = '3', billpropertyid = '92', billsettingsvalue = '0' WHERE billsettingsid = '993';
UPDATE billsettings SET billnameid = '3', billpropertyid = '93', billsettingsvalue = '0' WHERE billsettingsid = '994';
UPDATE billsettings SET billnameid = '3', billpropertyid = '94', billsettingsvalue = '0' WHERE billsettingsid = '995';
UPDATE billsettings SET billnameid = '3', billpropertyid = '95', billsettingsvalue = '1' WHERE billsettingsid = '996';
UPDATE billsettings SET billnameid = '3', billpropertyid = '96', billsettingsvalue = '0' WHERE billsettingsid = '997';
UPDATE billsettings SET billnameid = '3', billpropertyid = '97', billsettingsvalue = '1' WHERE billsettingsid = '998';
UPDATE billsettings SET billnameid = '3', billpropertyid = '98', billsettingsvalue = '1' WHERE billsettingsid = '999';
UPDATE billsettings SET billnameid = '3', billpropertyid = '99', billsettingsvalue = '0' WHERE billsettingsid = '1041';
UPDATE billsettings SET billnameid = '3', billpropertyid = '100', billsettingsvalue = '1' WHERE billsettingsid = '1032';
UPDATE billsettings SET billnameid = '3', billpropertyid = '101', billsettingsvalue = '0' WHERE billsettingsid = '1042';
UPDATE billsettings SET billnameid = '3', billpropertyid = '102', billsettingsvalue = '0' WHERE billsettingsid = '1043';
UPDATE billsettings SET billnameid = '3', billpropertyid = '103', billsettingsvalue = '0' WHERE billsettingsid = '1044';
UPDATE billsettings SET billnameid = '3', billpropertyid = '104', billsettingsvalue = '0' WHERE billsettingsid = '1045';
UPDATE billsettings SET billnameid = '3', billpropertyid = '105', billsettingsvalue = '1' WHERE billsettingsid = '1071';
UPDATE billsettings SET billnameid = '3', billpropertyid = '106', billsettingsvalue = '1' WHERE billsettingsid = '1091';
UPDATE billsettings SET billnameid = '3', billpropertyid = '107', billsettingsvalue = '0' WHERE billsettingsid = '1118';
UPDATE billsettings SET billnameid = '3', billpropertyid = '108', billsettingsvalue = '1' WHERE billsettingsid = '1092';
UPDATE billsettings SET billnameid = '3', billpropertyid = '109', billsettingsvalue = '0' WHERE billsettingsid = '1119';
UPDATE billsettings SET billnameid = '3', billpropertyid = '110', billsettingsvalue = '0' WHERE billsettingsid = '1120';
UPDATE billsettings SET billnameid = '3', billpropertyid = '111', billsettingsvalue = '0' WHERE billsettingsid = '1121';
UPDATE billsettings SET billnameid = '3', billpropertyid = '112', billsettingsvalue = '1' WHERE billsettingsid = '1074';
UPDATE billsettings SET billnameid = '3', billpropertyid = '113', billsettingsvalue = '1' WHERE billsettingsid = '1075';
UPDATE billsettings SET billnameid = '3', billpropertyid = '114', billsettingsvalue = '1' WHERE billsettingsid = '1076';
UPDATE billsettings SET billnameid = '3', billpropertyid = '115', billsettingsvalue = '0' WHERE billsettingsid = '1077';
UPDATE billsettings SET billnameid = '3', billpropertyid = '116', billsettingsvalue = '1' WHERE billsettingsid = '1078';
UPDATE billsettings SET billnameid = '3', billpropertyid = '117', billsettingsvalue = '0' WHERE billsettingsid = '1122';
UPDATE billsettings SET billnameid = '3', billpropertyid = '118', billsettingsvalue = '0' WHERE billsettingsid = '1123';
UPDATE billsettings SET billnameid = '3', billpropertyid = '119', billsettingsvalue = '0' WHERE billsettingsid = '1124';
UPDATE billsettings SET billnameid = '3', billpropertyid = '120', billsettingsvalue = '0' WHERE billsettingsid = '1125';
UPDATE billsettings SET billnameid = '3', billpropertyid = '121', billsettingsvalue = '0' WHERE billsettingsid = '1126';
UPDATE billsettings SET billnameid = '3', billpropertyid = '122', billsettingsvalue = '0' WHERE billsettingsid = '1127';
UPDATE billsettings SET billnameid = '3', billpropertyid = '123', billsettingsvalue = '0' WHERE billsettingsid = '1128';
UPDATE billsettings SET billnameid = '3', billpropertyid = '124', billsettingsvalue = '0' WHERE billsettingsid = '1129';
UPDATE billsettings SET billnameid = '3', billpropertyid = '125', billsettingsvalue = '0' WHERE billsettingsid = '1130';
UPDATE billsettings SET billnameid = '3', billpropertyid = '126', billsettingsvalue = '0' WHERE billsettingsid = '1131';
UPDATE billsettings SET billnameid = '3', billpropertyid = '127', billsettingsvalue = '0' WHERE billsettingsid = '1132';
UPDATE billsettings SET billnameid = '3', billpropertyid = '128', billsettingsvalue = '0' WHERE billsettingsid = '1133';
UPDATE billsettings SET billnameid = '3', billpropertyid = '129', billsettingsvalue = '0' WHERE billsettingsid = '1134';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:26:38";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:56:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('billsettingsController.php', '2026-10-07 15:56:38', '1', 'sucess', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/billsettingsController.php?do=sucess'); -- id=194
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:26:47";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:56:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:56:47', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=195
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:26:48";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:56:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:56:48', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=196
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:27:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:57:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:57:50', '1', 'addAndRetuen', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addAndRetuen'); -- id=197

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 06ac641906ad5e
-- ----------------------------------------------------------------------------------------------------

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

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

UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:27:50";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:57:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 15:57:50', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=198
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:27:58";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:57:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userratereportController.php', '2026-10-07 15:57:58', '1', 'o.royalgt4.com:443/erp/controllers/userratereportController.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userratereportController.php'); -- id=199
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:27:58";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:57:58", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userratereportController.php', '2026-10-07 15:57:58', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userratereportController.php?do=show'); -- id=200
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:28:19";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 15:58:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('userratereportController.php', '2026-10-07 15:58:19', '1', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/userratereportController.php?do=show'); -- id=201
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:31:59";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 16:01:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:01:59', '1', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=202
UPDATE user SET loginip = "" WHERE userid = 4;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:33:10";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:33:17";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 16:03:17", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 16:03:17', '4', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=203
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:33:17";
UPDATE user SET loginip = "51.89.20.165", lastactivetime = "2026-10-07 16:03:17", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 16:03:17', '4', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=204
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:33:21";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 16:03:21", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:03:21', '4', 'addsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=205
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:34:25";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 16:04:25", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:04:25', '4', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=show'); -- id=206
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:34:27";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 16:04:27", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:04:27', '4', 'show', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=show'); -- id=207
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:34:31";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 16:04:31", deviceType = "DESKTOP" WHERE userid = 4;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:04:31', '4', 'editsellBill', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=editsellBill&sellbillid=1'); -- id=208
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:35:33";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 16:05:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 16:05:33', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=209
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:35:33";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 16:05:33', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=210
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:36:00";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:36:08";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:44:27";
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
update user set blockedByLimits = 0;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties; -- id=0
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties; -- id=0
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:46:05";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 16:16:05", deviceType = "MOBILE" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('index.php', '2026-10-07 16:16:05', '1', 'o.royalgt4.com:443/erp/controllers/index.php', '156.207.130.177', '', 'MOBILE','https://abdo.royalgt4.com/erp/controllers/index.php'); -- id=211
UPDATE product SET lastbuyprice=productBuyPrice,lastbuyprice_withDiscount=productBuyPrice,meanbuyprice=productBuyPrice,meanbuyprice_withDiscount=productBuyPrice where lastbuyprice is null;
UPDATE programsettings SET companyname = 'GT4', address = 'القاهرة - المقطم - شارع 9 ', specializtion = 'برمجيات - مواقع انترنت - تطبيقات موبايل', phone = '0111007088', faxnumber = '', email = 'mousa_maged@hotmail.com', website = '', logo = '3f52022081b9a1a89c6f3246463c2d62.jpg', roundnumbers = '1', saveprinting = '1', deptprinting = '1', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '2',clientsearchvalue = '2', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '123456789123', commercialregistration = '1234', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '1', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2026-10-07',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='57a85883346811cbf7076a51c5bd887a2e96bf2df777a95668d34a3537aceedfe3f238b684c96d789642405e6f69293dbb311716d957a5ac40fe5570cf297eaf',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='0' , date='1' , limitamount = '0' , measuringunit = '1' , print_amount = '0' , billid = '0' , precentages = '1' , realprice = '1' ,delegate_seller = '0' , storeserial = '1' ,clientfieldrequired ='0' , clientcodname='0' , colortype = '0' , nakdyOnly = '0' , nakdyKashf = '0' , discount_pres_direct = '0' , general_discount = '0' , sells_return = '0' ,scunitname ='0',vatValue = '0.00',syncstructure = '1',showPrevPrices = '0',isOpticProg='1',reportsPlusHours = '2' , showM5zon = '1',restaurantStoreId = '1',restuarantPrintTimeout = '8',sumSameProductForStore = '0', editAllPrice = '0', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '1' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='last_discount',Profitevaluation='last_discount' , delivery='0',premiums = '1',operationnumEdit = '0',noOfDecimalPlaces = '2',unReviewBills = '0', unReviewBillsPass = '123',billReviewNote = '',tamweenBakery = '0',three_months = '0',six_months = '0',twelve_months = '0',eighteen_months = '0',twentyfour_months = '0',thirty_months = '0',sixthirty_months = '0',fortytwo_months = '0',fortyeight_months = '0',mandobCollectionRatio='0',takeAwayClient = '0',restaurantServiceOn = ',0,0,0,',earlyrepayment = '0',visaPay = '0',headerPrint='38e56bc84e0c8adff190ee376e986bbd.png',headerPrintSand='',printSand='0',makeDailyEntry='1',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='0',incomeclient='1',showserial='1',editservice='1',showCurrency='0',qrerp='1',valueadded='0',qrcodesh='0',printfoot='',sellorder='0',numberprint='0',valueaddedbuy='0',simpleAddClientInBill='0',licenseNo='',maintenance='0',showPrevDiscount='0',vatvalueqr='0.13043479',imgprinthide='0',parcodeprinttype = 'C128A',parcodeprintwidth='160',parcodeprinttextsize='14',parcodeprintCurr='L.E',sizecolorDigits='3',searchBarcodeInBill='0',allowMobileLogin='0',lanAllowType='0',wanAllowType='0',sendBillToRestaurant='0',obgyPharmacyGroups='',updateProUnitPricesOnPriceUpdate='0',ebill='0',valueaddeddiscount='0',clientdetail='1',showPrevPricesRet='0',showPrevDiscountRet='0',eunitInTax='',showStoreToDetail='0',showBuyPriceAtProductddl='0',specialexpenses='1',ratioshow='0',defaultUnitPriceAtBill='0',rulers='0',quantitynew='0',showBillOperationSearch='0',obygyFolder='',clientsell='0',
                preorderperiod='0',useListPrice='0',ebillclient='0',importproduct='0',realestateunits='0',expensesupplier='0',changeOrderproduct='0',searchlimit='0',typebill='',roundnumbersbilltotal='0',noOfDecimalPlacesBillTotal='0',dailyEntryCostprice='last_discount',storeRecieveType='0',clientPhoneReq='0',addServiceToBill='0',realestatedev='1',showprice4='0',showprice5='0',showprice6='0',showprice7='0',showprice8='0',showpriceall='1',showpricehalf='1',showpriceunit='1',showbillstatus='0',showbilldeliverydate='0',enablequantityfractions='1',addclienttoproduct='0',closingcustomeraccount='0',serial2='',
                shownameE='0',showprocode='0',showpartnumber='0',showtype='0',showcompany='0',showweight='0',showorigin='0',showhscode='0',showexpire='0',showgrantduration='0',showonline='0',showminappear='0',showonlinecat='0',showsellpercentage='0',showbuydiscount='0',preparingStore='0',sellordername='0',showsearchfilter='0',unitPriceAtsalesreport='0',medExCat='0',laterNakdiClientId='0',headerPrint12Right='',headerPrint12Left='',halfPriceStart='0',allPriceStart='0',checkretsellclient='1',webApiId='0',noBillEditTillPay='0',showDataOfficialContract='0',showprice9='0',showprice10='0',showprice11='0',showprice12='0',showprice13='0',serial3='d8e8b5c60f052e4ebda8d82e0b9100dc11a84ef03edeb9797d96c7a6ebd4c9564de730611cd294869324ba98f93605380df3ecbedb03e012f6ee2094b75a5e61',associatedtags='0',commentClientChasis='0',dollarExType='0',saudielectronicinvoice='0',saudielectronicinvoclient='0',productDiscount='0'
                ,reviewRecords='',reviewRecordsLastDate='0000-00-00',showepayrestaurant='0',showSellAllPriceInStoreDetail='0',medicalFeeCollection='0',clientorpatient='0',beforeOrAfterDiscount='1',suppSettlementDiscount='0' WHERE programsettingsid = '1';
UPDATE product
                JOIN (
                       select productingredients.productId
                              ,sum(productnumber * quantity * productBuyPrice) as productBuyPrice
                              ,sum(productnumber * quantity * lastbuyprice) as lastbuyprice
                              ,sum(productnumber * quantity * lastbuyprice_withDiscount) as lastbuyprice_withDiscount
                              ,sum(productnumber * quantity * meanbuyprice) as meanbuyprice
                              ,sum(productnumber * quantity * meanbuyprice_withDiscount) as meanbuyprice_withDiscount
                              ,sum(productnumber * quantity * overAllAveragePrice) as overAllAveragePrice
                      from product
                      join productingredients on product.productId = productingredients.ingridientId
                      join productunit on productunit.productunitid = productingredients.unitId
                      group by productingredients.productId
                    ) as ingridientPrice ON ingridientPrice.productId =  product.productId
                SET product.productBuyPrice = ingridientPrice.productBuyPrice,
                        product.lastbuyprice = ingridientPrice.lastbuyprice,
                    product.lastbuyprice_withDiscount = ingridientPrice.lastbuyprice_withDiscount,
                    product.meanbuyprice = ingridientPrice.meanbuyprice,
                    product.meanbuyprice_withDiscount = ingridientPrice.meanbuyprice_withDiscount,
                    product.overAllAveragePrice = ingridientPrice.overAllAveragePrice;
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:46:06";
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('playStationCardController.php', '2026-10-07 16:16:06', '1', 'handleExpiredCards', '51.89.20.165', '', 'DESKTOP','https://abdo.royalgt4.com/erp/controllers/playStationCardController.php?do=handleExpiredCards'); -- id=212
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 12:46:49";
UPDATE user SET loginip = "156.207.130.177", lastactivetime = "2026-10-07 16:16:49", deviceType = "MOBILE" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType,completeURL) VALUES ('sellbillController.php', '2026-10-07 16:16:49', '1', 'addsellBill', '156.207.130.177', '', 'MOBILE','https://abdo.royalgt4.com/erp/controllers/sellbillController.php?do=addsellBill&billnameid=3'); -- id=213
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:03:57";
UPDATE user SET loginip = "" WHERE lastactivetime < "2026-10-07 17:04:20";
