INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 05:39:16";
UPDATE user SET loginip = "156.217.164.208", lastactivetime = "2022-09-23 09:09:16", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 09:09:16', '6', '', '156.217.164.208', '', 'DESKTOP');
UPDATE programsettings SET companyname = 'GT4', address = 'المنصورة', specializtion = 'jh', phone = '01002019235', faxnumber = '0502232923', email = 'mrabozied@gt4it.com', website = 'www.gt4host.com', logo = '471502e62c0be89a8d90663028144a83.jpg', roundnumbers = '0', saveprinting = '1', deptprinting = '0', printingpapersize = '0', userid = '1', showPreviousPrice = '0', parcode = '0', priceing = '0', lastprice = '0', searchvalue = '1', updateproductprice = '0', allowfinsldelete = '0', updateclientprice = '0', `partition` = '0', taxcard = '332', commercialregistration = '3213123312', costcenter = '1', clinic = '1', workshop = '1', transport = '1', manufacturing = '0', masterCopy = '0' , dailyentrydate = '2020-04-18' ,updatefiledate = '2022-09-23',workerbetweenstores = '1',workshoptimeout = '24',drivertimeout = '3',currancy = 'جنيه',serial='9c2d4cf4cf5d4e24d5070164705832c3a5d1287f641a2960e48e04ae57a2ad0a5441322ca7cf34efd63003fdb348adbd0b61197c7c87d8dd5bc298c352482bc6',allowdateedit = '0', clientcode = '1' ,clientserial = '1',timezone = 'Africa/Cairo' , expiredate ='1' , production ='1' , description='1' , service ='1' , 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 = '1', isCafe = '0' ,isRestaurent = '0' ,productDays = '0',thereIsRestTax = '0',restTaxVal = '0',restPrintLang = '0',taxNameFlag = '0',parcodeDigits = '5' ,specializedParcodeDigits = '7', clientDefaultDebtLimit = '10000' , clientDefaultDebtLimitControl = '0',usedParcode = '0' ,productbycodeimage = '' ,commentClient='تعليق على العميل ',Inventoryevaluation='first',Profitevaluation='first' , delivery='-2',premiums = '0',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 = ',-2,-1,1,',earlyrepayment = '0',visaPay = '0',headerPrint='',headerPrintSand='',printSand='0',makeDailyEntry='0',clientShowTawla='0',billRest='1',suppIsClientToo='0',isCarBill='0',expensesproduct='1',projectshownew='1',showparcode='0',changeBuyPriceChangeSellInBuyBillCtrl = '0',changeBuyPriceChangeSellInProductCtrl = '0',inventoryvaluation = '1',showBillCollectionSearch='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 < "2022-09-23 05:39:16";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 05:39:23";
UPDATE user SET loginip = "156.217.164.208", lastactivetime = "2022-09-23 09:09:23", deviceType = "DESKTOP" WHERE userid = 6;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 09:09:23', '6', 'addsellBill', '156.217.164.208', '', 'DESKTOP');
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 09:45:38";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 13:15:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 13:15:39', '1', '', '154.180.113.60', '', 'DESKTOP');
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 < "2022-09-23 09:45:39";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 09:45:46";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 13:15:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('storemovementController.php', '2022-09-23 13:15:46', '1', '', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 09:46:24";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 13:16:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('storemovementController.php', '2022-09-23 13:16:24', '1', 'add', '154.180.113.60', '', 'DESKTOP');
DROP PROCEDURE IF EXISTS insertUniqueOptNum;;

CREATE PROCEDURE insertUniqueOptNum(IN optnum INT,IN storeidfrom INT,IN storeidto INT,IN productid INT,IN transferproductamount DECIMAL(10,2),IN transferproductdate DATE,IN userid INT,IN conditions INT,IN `comment` TEXT,IN deloperationnum INT,IN sizeid INT,IN colorid INT,IN driverid INT,IN drivertimeout INT,IN driverdate datetime,IN delivererid INT,IN deliverdate datetime,OUT inserted_id INT,OUT optnum_used INT)
BEGIN
DECLARE n INT DEFAULT 0;
DECLARE id INT DEFAULT 0;
DECLARE lastopt INT DEFAULT 0;


DECLARE EXIT HANDLER FOR SQLEXCEPTION
    BEGIN
    ROLLBACK;
    GET DIAGNOSTICS CONDITION 1 @sqlstate = RETURNED_SQLSTATE,
     @errno = MYSQL_ERRNO, @text = MESSAGE_TEXT;
    SET @full_error = CONCAT("ERROR ", @errno, " (", @sqlstate, "): ", @text);
    SELECT @full_error;
    ROLLBACK;
END;



START TRANSACTION;


SELECT COUNT(*) FROM storemovement WHERE `operationnum` = optnum INTO n;
SELECT DISTINCT operationnum FROM storemovement WHERE operationnum != 0  ORDER BY operationnum DESC limit 1 INTO lastopt;
set lastopt = lastopt+1;

	IF n > 0 THEN


      INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions,comment,operationnum ,deloperationnum,sizeid,colorid,driverid,drivertimeout,driverdate,delivererid,deliverdate)
                VALUES (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,comment ,
                lastopt,
                deloperationnum,sizeid,colorid,driverid,drivertimeout,driverdate,delivererid,deliverdate);
            SELECT LAST_INSERT_ID(),lastopt INTO inserted_id,optnum_used;
ELSE

    INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions,comment,operationnum ,deloperationnum,sizeid,colorid,driverid,drivertimeout,driverdate,delivererid,deliverdate)
                VALUES (storeidfrom, storeidto, productid,transferproductamount, transferproductdate, userid, conditions ,comment
                ,optnum
                ,deloperationnum,sizeid,colorid,driverid,drivertimeout,driverdate,delivererid,deliverdate);
            SELECT LAST_INSERT_ID(),optnum INTO inserted_id,optnum_used;
	END IF;

COMMIT WORK; -- it is mandatory dont wait comit in php.as if sp didnot found comit before reaching the end it will rollback giving no errors at all

End;
;;

;
BEGIN;
CALL insertUniqueOptNum(1085,3,5,934,1,'2022-09-23',1,0, '' ,0,0,0,0,0,'2022-09-23 13:16:25',0,'',@id,@optnum);
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3108';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2022-09-23', 3, 934, 0, 0
                    , 185.00, -1, 0, 0, 1, '2022-09-23 13:16:25')
                ON DUPLICATE KEY UPDATE buyprice = 185.00,
                        buyQuantity =buyQuantity+-1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2022-09-23 13:16:25' ;
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2022-09-23*185.00," WHERE transferproductid = 4637;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('934', '3', '1', '1', '4637', 'تحويل منتجات من المخزن', 'storemovementController.php', '2.00', '1', '1', '2022-09-23','0','0');
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3137';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2022-09-23', 5, 934, 0, 0
                    , 185.00, 1, 0, 0, 1, '2022-09-23 13:16:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2022-09-23 13:16:25' ;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('934', '5', '1', '0', '4637', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '0.00', '1', '1', '2022-09-23','0','0');
INSERT INTO storemovement (storeidfrom, storeidto, productid, transferproductamount, transferproductdate, userid, conditions ,operationnum,driverid,drivertimeout,driverdate,delivererid,deliverdate,storetype,priceType,price,sizeid,colorid) VALUES ('3', '5', '1122', '1', '2022-09-23', '1', '0','1085',null,null,'2022-09-23 13:16:25',null,'','0','hide','0','0','0');
UPDATE storedetail SET  productquantity = '3', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '4112';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2022-08-20', 3, 1122, 0, 0
                    , 210.00, 1, 0, 0, 1, '2022-09-23 13:16:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity-1, sellQuantity = sellQuantity-0,
                        del = 0,userid = 1,sysDate = '2022-09-23 13:16:25' ;
UPDATE storemovement SET  buyPricesHistoryBookData = "1*2022-08-20*210.00," WHERE transferproductid = 4638;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1122', '3', '1', '1', '4638', 'تحويل منتجات من المخزن', 'storemovementController.php', '4.00', '3', '1', '2022-09-23','0','0');
UPDATE storedetail SET  productquantity = '6', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '4118';
INSERT INTO buypriceshistorybook (theDate, storeId, productid, sizeid, colorid, buyprice, buyQuantity, sellQuantity, del, userid, sysDate)
                    VALUES ('2022-08-20', 5, 1122, 0, 0
                    , 210.00, 1, 0, 0, 1, '2022-09-23 13:16:25')
                ON DUPLICATE KEY UPDATE buyQuantity =buyQuantity+1, sellQuantity = sellQuantity+0,
                        del = 0,userid = 1,sysDate = '2022-09-23 13:16:25' ;
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1122', '5', '1', '0', '4638', 'تحويل منتجات إلى المخزن', 'storemovementController.php', '5.00', '6', '1', '2022-09-23','0','0');
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 09:46:25";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 13:16:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('storemovementController.php', '2022-09-23 13:16:25', '1', 'editshow', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 09:46:32";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 13:16:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 13:16:33', '1', 'addsellBill', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 09:46:38";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 13:16:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('storemovementController.php', '2022-09-23 13:16:38', '1', '', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 09:46:46";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 13:16:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('storemovementController.php', '2022-09-23 13:16:46', '1', 'show', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 09:47:08";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 13:17:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('storemovementController.php', '2022-09-23 13:17:08', '1', 'editshowstyle2', '154.180.113.60', '', 'DESKTOP');
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 09:47:23";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 13:17:23", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 13:17:23', '5', '', '154.180.113.60', '', 'DESKTOP');
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 < "2022-09-23 09:47:23";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 09:47:26";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 13:17:26", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 13:17:26', '5', 'addsellBill', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE userid = 5;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 10:35:19";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 14:05:19", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 14:05:19', '5', '', '154.180.113.60', '', 'DESKTOP');
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 < "2022-09-23 10:35:19";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 10:35:23";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 14:05:23", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 14:05:23', '5', 'addsellBill', '154.180.113.60', '', 'DESKTOP');
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 10:36:52";
UPDATE user SET loginip = "197.192.206.197", lastactivetime = "2022-09-23 14:06:52", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 14:06:52', '7', '', '197.192.206.197', '', 'DESKTOP');
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 < "2022-09-23 10:36:53";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 10:36:57";
UPDATE user SET loginip = "197.192.206.197", lastactivetime = "2022-09-23 14:06:57", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 14:06:57', '7', 'addsellBill', '197.192.206.197', '', 'DESKTOP');
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 10:52:46";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 14:22:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 14:22:46', '1', '', '197.35.190.221', '', 'DESKTOP');
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 < "2022-09-23 10:52:46";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 10:54:38";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 14:24:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('transfermoneyController.php', '2022-09-23 14:24:38', '1', '', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 10:55:00";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 14:25:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('transfermoneyController.php', '2022-09-23 14:25:00', '1', 'add', '197.35.190.221', '', 'DESKTOP');
BEGIN;
INSERT INTO transfermoney (saveidfrom, saveidto, transfermoneyvalue, transfermoneydate, userid, conditions, dailyentryid , comment) VALUES ('6','9', '10000', '2022-09-23', '1', '0', '0','');
UPDATE save SET  savecurrentvalue = '4240',  userid = '1' WHERE saveid = '6';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note) VALUES ('14240.00','10000', '1', '6', 'تحويل امول الى الخزنة  [ الشيخ وليد ] ', '339', '4240', '2022-09-23 14:25:00', '1',  'transfermoneyController.php','0','');
UPDATE save SET  savecurrentvalue = '3532730',  userid = '1' WHERE saveid = '9';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note) VALUES ('3522730.00','10000', '0', '9', 'تحويل امول من الخزنة  [ خزينة محل كفر الدوار ] ', '339', '3532730', '2022-09-23 14:25:00', '1',  'transfermoneyController.php','0','');
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid) VALUES ( '10000', '10000', '2022-09-23', '1', '0', '0', '2022-09-23 14:25:00','اضافة تحويل من خزينة محل كفر الدوار الى الشيخ وليد','1','0','0');
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4759', '156', '10000', '','0');
UPDATE accountstree SET name = 'الشيخ وليد', customName = 'الشيخ وليد', parent = '20', itemtype = '3', itemfrom = '0', notes = '', del = '0', userid = '1', mydate = '2021-11-09', itemtype2 = '1', theValue = '3532730', theOrder = '0', layingOrder = '',reportid = '2' WHERE id = '156';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4759', '140', '10000', '','0');
UPDATE accountstree SET name = 'خزينة محل كفر الدوار', customName = 'خزينة محل كفر الدوار', parent = '20', itemtype = '3', itemfrom = '0', notes = '', del = '0', userid = '1', mydate = '2021-11-07', itemtype2 = '1', theValue = '-624265', theOrder = '0', layingOrder = '',reportid = '2' WHERE id = '140';
UPDATE transfermoney SET saveidfrom = '6', saveidto = '9', transfermoneyvalue = '10000.00', transfermoneydate = '2022-09-23', userid = '1', conditions = '0' , dailyentryid = '4759' , comment = '' WHERE transfermoneyid = '339';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 10:55:00";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 14:25:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('transfermoneyController.php', '2022-09-23 14:25:00', '1', 'sucess', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 10:55:02";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 14:25:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('transfermoneyController.php', '2022-09-23 14:25:03', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 10:55:34";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 14:25:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 14:25:34', '1', '', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE userid = 5;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 11:04:55";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 14:34:55", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 14:34:55', '5', '', '154.180.113.60', '', 'DESKTOP');
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 < "2022-09-23 11:04:56";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 11:04:58";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 14:34:58", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 14:34:58', '5', 'addsellBill', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 11:05:16";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 14:35:16", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 14:35:16', '5', 'addsellBill', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 11:05:57";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 14:35:57", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 14:35:57', '5', 'addAndRetuen', '154.180.113.60', '', 'DESKTOP');
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 0632da804e53ae
-- ----------------------------------------------------------------------------------------------------

BEGIN;
CALL clientInUse(72,@clientdebt,@clientname);
INSERT INTO returnsellbill (returnsellbilldate, returnsellbillserial, returnsellbillclientid, returnsellbilltotaldeptbefor, returnsellbilltotaldeptafter, returnsellbilldiscount, returnsellbilldiscounttype, returnsellbilltotalbill, returnsellbillaftertotalbill, returnsellbilltotalpayed, returnsellbillfinalbill, returnsellbillstoreid, returnsellbillsysdate,comment, userid, conditions, returnsellbillclientname, returnsellbillsaveid, returnsellbildirectpayment, billnameid, sellerid, tempclientName, returnsellQuantity,tax, carnumber, cartype, carchase, carmotor,costcenterid,dailyentryid,delbyuserid,billReservation,billReservationDate,visaAccountId,cashPayed,visaPayed,isBankAccountTransfer,extraDiscountPer,extraDiscountVal,taxOfDiscountPer,taxOfDiscountVal) VALUES ('2022-09-23 14:35:16', '0632da804e53ae', '72', '320.00', '160', '0', '1', '160', '160', '0', '-160', '3', '2022-09-23 14:35:57', '', '5', '0', 'ام عبدالله','3', '1', '5', '0', 'ام عبدالله', '1', '0', '', '','','','-1','0','0','0','','0','0','0','0','0','0','0','0');
UPDATE client SET  clientdebt = '160', userid = '5' WHERE clientid = '72';
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 ) VALUES ('72','320.00','160','1','اضافة فاتورة مردوات مبيعات','3047', '160', '2022-09-23 14:35:57', '5', 'returnsellbillController.php', 'اضافة فاتورة مردوات مبيعات', '160', '0', null, '0', null, null,'', '0','1','1','160','1');
UPDATE client SET  inUse = 0 where clientid = 72;
INSERT INTO returnsellbilldetail (buyprice, parcode, returnsellbillid, returnsellbilldetailcatid, returnsellbilldetailproductid, returnsellbilldetailquantity, returnsellbilldetailprice, returnsellbilldetailtotalprice, conditions, note, pricetype, discountvalue, productunitid, buydiscount, buydiscounttype,storeid,discounttype,lastbuyprice,meanbuyprice,lastbuyprice_withDiscount,meanbuyprice_withDiscount,otherdetailquantity,sizeid,colorid,pricetypepro) VALUES ('150.00', '00849', '3047', '1', '849', '1', '160.00', '160', '0', '', '2', '0', '849', '0.00', '0','3','0','','','0','0','0','0','0','2');
UPDATE returnsellbilldetail SET  lastbuyprice = 150.00 , meanbuyprice = 150.00, lastbuyprice_withDiscount = 150.00, meanbuyprice_withDiscount = 150.00
                where returnsellbilldetailid = 6643;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet)
                    VALUES (849, '2022-09-23', 0, 0, 0
                    , 0, 0, 0, 0
                    , 160, 150, 150, 150
                    , 150, 150, 0, 0, 1)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+0, sellCostBuyPrice =sellCostBuyPrice+0
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+0, sellCostMeanBuyPrice = sellCostMeanBuyPrice+0
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+0, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+0
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                        , returnSellVal = returnSellVal+160, returnSellCostBuyPrice = returnSellCostBuyPrice+150, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+150
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+150, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+150
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+150
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0
                        , netQuantity = netQuantity+0
                        , netQuantityRet = netQuantityRet+1;
 INSERT INTO quickprofitstore (storeId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice)
                    VALUES (3, '2022-09-23', 0, 0, 0
                    , 0, 0, 0, 0
                    , 160, 150, 150, 150
                    , 150, 150, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+0, sellCostBuyPrice =sellCostBuyPrice+0
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+0, sellCostMeanBuyPrice = sellCostMeanBuyPrice+0
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+0, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+0
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                        , returnSellVal = returnSellVal+160, returnSellCostBuyPrice = returnSellCostBuyPrice+150, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+150
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+150, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+150
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+150
                        , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0;
UPDATE storedetail SET  productquantity = '1', userid = '5', storedetaildate = '2022-09-23 14:35:57' WHERE storedetailid = '2776';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('849', '3', '1', '0', '3047', 'اضافة فاتورة مردودات مبيعات', 'returnsellbillController.php', '0.00', '1', '5', '2022-09-23 14:35:57','0','0');
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice)
                    VALUES ('2022-09-23', 0, 0, 0
                    , 0, 0, 0, 0
                    , 160, 150, 150, 150
                    , 150, 150, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+0, sellCostBuyPrice =sellCostBuyPrice+0
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+0, sellCostMeanBuyPrice = sellCostMeanBuyPrice+0
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+0, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+0
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                        , returnSellVal = returnSellVal+160, returnSellCostBuyPrice = returnSellCostBuyPrice+150, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+150
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+150, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+150
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+150
                        , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice)
                    VALUES (72, '2022-09-23', 0, 0, 0
                    , 0, 0, 0, 0
                    , 160, 150, 150, 150
                    , 150, 150, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+0, sellCostBuyPrice =sellCostBuyPrice+0
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+0, sellCostMeanBuyPrice = sellCostMeanBuyPrice+0
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+0, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+0
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                        , returnSellVal = returnSellVal+160, returnSellCostBuyPrice = returnSellCostBuyPrice+150, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+150
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+150, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+150
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+150
                        , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice)
                    VALUES (1, -160, -150, -150
                    , -150, -150, -150, 0)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+-160, netSellCostBuyPrice = netSellCostBuyPrice+-150
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+-150
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+-150
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+-150
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+-150
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+0;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 0632da804e53ae and sellbillId = 3047 and returnsellbillId = 3047
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 11:05:58";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 14:35:58", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 14:35:58', '5', 'addsellBill', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 11:06:01";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 14:36:01", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 14:36:01', '5', 'addsellBill', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE userid = 5;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 11:15:12";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 14:45:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 14:45:12', '1', 'addsellBill', '197.35.190.221', '', 'DESKTOP');
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 12:34:21";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 16:04:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 16:04:22', '1', '', '197.35.190.221', '', 'DESKTOP');
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 < "2022-09-23 12:34:22";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 12:34:28";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 16:04:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 16:04:28', '1', 'addsellBill', '197.35.190.221', '', 'DESKTOP');
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 14:51:35";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:21:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 18:21:36', '1', '', '197.35.190.221', '', 'DESKTOP');
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 < "2022-09-23 14:51:36";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 14:52:05";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:22:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 18:22:06', '1', 'addsellBill', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:10:28";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:40:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:40:28', '1', '', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:11:04";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:41:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:41:04', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '2', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '937';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('369', '6', '2', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0.00', '2', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:11:06";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:41:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:41:06', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:12:50";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:42:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:42:50', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '23', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '4016';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('258', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '25.00', '23', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:12:52";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:42:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:42:52', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:14:01";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:44:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:44:01', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2248';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('739', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '22.00', '21', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:14:03";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:44:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:44:03', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:14:50";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:44:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:44:50', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '13', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2245';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('593', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '14.00', '13', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:14:51";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:44:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:44:51', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:15:15";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:45:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:45:15', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '10', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2233';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('638', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '12.00', '10', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:15:17";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:45:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:45:17', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:16:30";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:46:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:46:30', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '23', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '982';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('467', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '25.00', '23', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:16:32";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:46:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:46:32', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:16:47";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:46:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:46:47', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '13', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3608';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1037', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '14.00', '13', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:16:49";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:46:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:46:49', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:17:37";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:47:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:47:37', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '6', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3713';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1060', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '8.00', '6', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:17:39";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:47:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:47:39', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:18:10";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:48:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:48:10', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '12', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3670';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1041', '6', '3', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '9.00', '12', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:18:11";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:48:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:48:11', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:18:39";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:48:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:48:40', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '14', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2622';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('800', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '16.00', '14', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:18:41";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:48:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:48:41', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:19:03";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:49:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:49:04', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '2', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2237';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('662', '6', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '1.00', '2', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:19:06";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:49:06", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:49:06', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:19:56";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:49:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:49:56', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '7', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '4012';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1113', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '8.00', '7', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:19:57";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:49:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:49:57', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:20:17";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:50:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:50:17', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '21', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '4125';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1123', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '23.00', '21', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:20:19";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:50:19", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:50:19', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:20:37";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:50:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:50:37', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '18', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2238';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('647', '6', '5', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '23.00', '18', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:20:39";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:50:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:50:39', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:21:13";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:51:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:51:13', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2624';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('807', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '3.00', '1', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:21:15";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:51:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:51:15', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:22:09";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:52:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:52:09', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '3', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3430';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('996', '6', '3', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '6.00', '3', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:22:11";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:52:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:52:11', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:22:52";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:52:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:52:52', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '3', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2239';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('645', '6', '3', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '6.00', '3', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:22:53";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:52:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:52:54', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:23:15";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:53:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:53:16', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '8', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3513';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1019', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '9.00', '8', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:23:17";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:53:17", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:53:17', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:23:36";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:53:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:53:36', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3429';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('995', '6', '3', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '7.00', '4', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:23:38";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:53:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:53:38', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:23:53";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:53:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:53:53', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '3', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3746';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1062', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '5.00', '3', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:23:55";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:53:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:53:55', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:24:59";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:54:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:54:59', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '8', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '4019';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('242', '6', '2', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '6.00', '8', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:25:01";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:55:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:55:01', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:25:29";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:55:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:55:29', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '2', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '4123';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1122', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '3.00', '2', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:25:31";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:55:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:55:31', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:25:51";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:55:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:55:51', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '3', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '4127';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1128', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '4.00', '3', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:25:53";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:55:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:55:53', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:26:10";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:56:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:56:10', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '6', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3932';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1074', '6', '4', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '10.00', '6', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:26:12";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:56:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:56:12', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:26:41";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:56:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:56:41', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '43', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3934';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1104', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '45.00', '43', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:26:43";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:56:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:56:43', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:27:14";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:57:14", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:57:14', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '12', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '1922';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('181', '6', '5', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '17.00', '12', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:27:16";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:57:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:57:16', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:27:44";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:57:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:57:44', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '41', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3752';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1069', '6', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '40.00', '41', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:27:46";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:57:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:57:46', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:28:01";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:58:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:58:01', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:28:03";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:58:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:58:03', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:29:36";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:59:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:59:36', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '12', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2621';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('525', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '14.00', '12', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:29:38";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 18:59:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 18:59:38', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:30:03";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:00:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:00:03', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '14', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3056';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('7', '6', '4', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '18.00', '14', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:30:05";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:00:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:00:05', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:30:23";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:00:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:00:23', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '24', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2250';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('634', '6', '4', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '20.00', '24', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:30:25";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:00:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:00:25', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:30:41";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:00:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:00:41', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '18', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2227';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('571', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '19.00', '18', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:30:43";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:00:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:00:43', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:31:40";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:01:40", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:01:40', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '2', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3126';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('948', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '3.00', '2', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:31:42";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:01:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:01:42', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:32:02";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:02:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:02:02', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '6', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2252';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('748', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '7.00', '6', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:32:03";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:02:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:02:03', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:32:42";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:02:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:02:42', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '5', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2738';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('852', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '6.00', '5', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:32:44";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:02:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:02:44', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:33:21";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:03:22", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:03:22', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '22', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '1022';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('536', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '24.00', '22', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:33:23";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:03:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:03:24', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:33:38";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:03:38", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:03:38', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '8', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '934';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('376', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '9.00', '8', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:33:40";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:03:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:03:41', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:34:35";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:04:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:04:35', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '12', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '1025';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('497', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '14.00', '12', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:34:37";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:04:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:04:37', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:36:07";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:06:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:06:08', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '19', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '4014';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('781', '6', '2', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '17.00', '19', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:36:09";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:06:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:06:09', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:36:51";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:06:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:06:52', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '25', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '968';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('487', '6', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '24.00', '25', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:36:53";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:06:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:06:54', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:38:43";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:08:43", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:08:43', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '86', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '953';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('397', '6', '16', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '70.00', '86', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:38:45";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:08:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:08:45', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:40:33";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:10:34", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:10:34', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '49', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2627';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('792', '6', '42', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '7.00', '49', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:40:35";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:10:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:10:35', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:41:04";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:11:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:11:05', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '5', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2253';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('765', '6', '3', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '8.00', '5', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:41:07";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:11:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:11:07', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:41:44";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:11:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:11:45', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '9', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3051';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('854', '6', '3', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '12.00', '9', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:41:46";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:11:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:11:47', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:43:02";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:13:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:13:02', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '7', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '4017';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('100', '6', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '6.00', '7', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:43:04";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:13:05", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:13:05', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:43:49";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:13:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:13:49', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '7', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3343';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('281', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '8.00', '7', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:43:51";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:13:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:13:52', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:44:57";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:14:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:14:57', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2629';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('824', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '1.00', '0', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:44:59";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:14:59", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:14:59', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:45:59";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:16:00", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:16:00', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '0', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2649';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('844', '6', '5', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '5.00', '0', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:46:02";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:16:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:16:02', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:47:02";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:17:02", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:17:02', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2625';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('802', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '6.00', '4', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:47:04";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:17:04", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:17:04', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:47:39";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:17:39", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:17:39', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '5', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2779';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('855', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '7.00', '5', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:47:41";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:17:41", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:17:41', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:48:44";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:18:44", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:18:44', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '19', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '4020';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('80', '6', '7', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '12.00', '19', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:48:46";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:18:46", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:18:46', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:49:12";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:19:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:19:13', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '2', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3062';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('940', '6', '2', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0.00', '2', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:49:16";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:19:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:19:17', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:49:33";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:19:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:19:33', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3126';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('948', '6', '2', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '2.00', '4', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:49:35";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:19:36", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:19:36', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:50:50";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:20:50", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:20:51', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '6', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '1026';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('530', '6', '9', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '15.00', '6', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:50:53";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:20:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:20:53', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:51:30";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:21:31", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:21:31', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '3', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3535';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('759', '6', '3', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '6.00', '3', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:51:33";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:21:33", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:21:33', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:51:52";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:21:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:21:53', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3533';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('762', '6', '3', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '4.00', '1', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:51:55";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:21:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:21:57', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:52:46";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:22:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:22:47', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '11', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2249';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('123', '6', '2', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '13.00', '11', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:52:49";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:22:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:22:49', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:53:10";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:23:10", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:23:11', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3549';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1020', '6', '4', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '8.00', '4', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:53:12";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:23:12", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:23:12', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:53:48";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:23:48", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:23:48', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2323';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('713', '6', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0.00', '1', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:53:49";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:23:49", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:23:49', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:54:11";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:24:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:24:11', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3677';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1051', '6', '5', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '6.00', '1', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:54:13";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:24:13", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:24:13', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:54:52";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:24:52", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:24:52', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '5', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2780';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('811', '6', '10', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '-5.00', '5', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:54:54";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:24:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:24:54', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:55:27";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:25:27", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:25:28', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '9', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3678';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('1052', '6', '5', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '14.00', '9', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:55:29";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:25:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:25:30', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:56:26";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:26:26", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:26:26', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '12', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '1015';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('416', '6', '4', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '16.00', '12', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:56:28";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:26:28", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:26:28', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:57:03";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:27:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:27:04', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '22', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2231';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('283', '6', '4', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '26.00', '22', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:57:05";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:27:07", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:27:07', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:57:35";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:27:35", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:27:35', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '4092';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('196', '6', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '3.00', '4', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:57:37";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:27:37", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:27:37', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:57:54";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:27:54", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:27:54', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '6', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3053';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('121', '6', '3', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '9.00', '6', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 15:57:56";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:27:56", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:27:56', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:15:45";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:45:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:45:45', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3068';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('942', '6', '3', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '7.00', '4', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:15:47";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:45:47", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:45:47', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:16:51";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:46:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:46:51', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '1', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '3062';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('940', '6', '1', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '2.00', '1', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:16:53";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:46:53", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:46:53', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:19:23";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:49:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:49:23', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '16', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '1006';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('459', '6', '16', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0.00', '16', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:19:25";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:49:25", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:49:25', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:21:09";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:51:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:51:09', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '9', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2625';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('802', '6', '5', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '4.00', '9', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:21:11";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:51:11", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:51:11', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:21:38";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:51:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:51:43', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '7', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '1040';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('454', '6', '7', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0.00', '7', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:21:45";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:51:45", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:51:45', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:22:08";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:52:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:52:08', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '1039';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('455', '6', '4', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0.00', '4', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:22:29";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:52:29", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:52:29', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:22:55";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:52:55", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:52:55', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '11', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '1050';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('516', '6', '3', '1', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالنقص', 'inventoryController.php', '14.00', '11', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:22:57";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:52:57", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:52:57', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:23:23";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:53:23", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:53:23', '1', 'add', '197.35.190.221', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '4', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '1038';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('453', '6', '4', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '0.00', '4', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:23:24";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:53:24", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 19:53:24', '1', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 16:23:30";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 19:53:30", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 19:53:31', '1', 'addsellBill', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE userid = 1;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 17:52:33";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 21:22:33", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 21:22:33', '5', '', '154.180.113.60', '', 'DESKTOP');
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 < "2022-09-23 17:52:34";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 17:56:17";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 21:26:17", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('savedailyController.php', '2022-09-23 21:26:17', '5', '', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 17:56:20";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 21:26:20", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 21:26:20', '5', 'addsellBill', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE userid = 5;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 17:57:52";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 21:27:53", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 21:27:53', '5', '', '154.180.113.60', '', 'DESKTOP');
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 < "2022-09-23 17:57:53";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 17:57:55";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 21:27:55", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 21:27:55', '5', 'addsellBill', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:07:04";
UPDATE user SET loginip = "154.180.113.60", lastactivetime = "2022-09-23 21:37:04", deviceType = "DESKTOP" WHERE userid = 5;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('savedailyController.php', '2022-09-23 21:37:04', '5', '', '154.180.113.60', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE userid = 5;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:09:51";
UPDATE user SET loginip = "197.192.206.197", lastactivetime = "2022-09-23 21:39:51", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 21:39:51', '7', '', '197.192.206.197', '', 'DESKTOP');
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 < "2022-09-23 18:09:52";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:10:03";
UPDATE user SET loginip = "197.192.206.197", lastactivetime = "2022-09-23 21:40:03", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 21:40:03', '7', '', '197.192.206.197', '', 'DESKTOP');
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 < "2022-09-23 18:10:04";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE userid = 7;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:11:02";
UPDATE user SET loginip = "197.192.206.197", lastactivetime = "2022-09-23 21:41:03", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 21:41:03', '1', '', '197.192.206.197', '', 'DESKTOP');
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 < "2022-09-23 18:11:03";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:11:16";
UPDATE user SET loginip = "197.192.206.197", lastactivetime = "2022-09-23 21:41:16", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 21:41:16', '1', 'addsellBill', '197.192.206.197', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:13:15";
UPDATE user SET loginip = "197.192.206.197", lastactivetime = "2022-09-23 21:43:15", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 21:43:15', '1', '', '197.192.206.197', '', 'DESKTOP');
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:13:42";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 21:43:42", deviceType = "DESKTOP" WHERE userid = 8;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 21:43:42', '8', '', '197.35.190.221', '', 'DESKTOP');
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 < "2022-09-23 18:13:43";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:13:52";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 21:43:52", deviceType = "DESKTOP" WHERE userid = 8;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 21:43:52', '8', '', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:14:28";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 21:44:28", deviceType = "DESKTOP" WHERE userid = 8;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 21:44:28', '8', 'add', '197.35.190.221', '', 'DESKTOP');
BEGIN;
INSERT INTO expenses (expensestypeid, expensesname, expensesdetails, expensesValue, expensesdate, userid, conditions,costcenterid,saveid,dailyentryid,bankid,bankaccountid,checknum,productid) VALUES ('-1', 'جمعيه اودي', '', '4000', '2022-09-23', '8', '0','-1','6','0','0','0','','0');
UPDATE save SET  savecurrentvalue = '240',  userid = '8' WHERE saveid = '6';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note) VALUES ('4240.00','4000', '1', '6', 'إضافة مصروف', '1813', '240', '2022-09-23 21:44:29', '8',  'expensesController.php','0','');
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid) VALUES ( '4000', '4000', '2022-09-23', '8', '0', '0', '2022-09-23 21:44:29','اضافة اسم مصروف( جمعيه اودي )','1','0','-1');
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4760', '160', '4000', '','0');
UPDATE accountstree SET name = '', customName = '', parent = '10', itemtype = '1', itemfrom = '0', notes = '', del = '0', userid = '1', mydate = '2021-12-01', itemtype2 = '1', theValue = '-734355', theOrder = '0', layingOrder = '',reportid = '2' WHERE id = '160';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4760', '140', '4000', '','0');
UPDATE accountstree SET name = 'خزينة محل كفر الدوار', customName = 'خزينة محل كفر الدوار', parent = '20', itemtype = '3', itemfrom = '0', notes = '', del = '0', userid = '1', mydate = '2021-11-07', itemtype2 = '1', theValue = '-628265', theOrder = '0', layingOrder = '',reportid = '2' WHERE id = '140';
UPDATE expenses SET expensestypeid = '-1', expensesname = 'جمعيه اودي', expensesdetails = '', expensesValue = '4000.00', expensesdate = '2022-09-23', userid = '8', conditions = '0',saveid = '6' , dailyentryid = '4760', bankid = '0', bankaccountid = '0', checknum = '', productid = '0' WHERE expensesid = '1813';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:14:29";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 21:44:29", deviceType = "DESKTOP" WHERE userid = 8;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 21:44:29', '8', 'sucess', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:14:31";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 21:44:31", deviceType = "DESKTOP" WHERE userid = 8;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 21:44:31', '8', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:14:32";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 21:44:32", deviceType = "DESKTOP" WHERE userid = 8;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 21:44:32', '8', '', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:14:39";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 21:44:39", deviceType = "DESKTOP" WHERE userid = 8;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 21:44:39', '8', 'add', '197.35.190.221', '', 'DESKTOP');
BEGIN;
INSERT INTO expenses (expensestypeid, expensesname, expensesdetails, expensesValue, expensesdate, userid, conditions,costcenterid,saveid,dailyentryid,bankid,bankaccountid,checknum,productid) VALUES ('-1', 'فطار', '', '10', '2022-09-23', '8', '0','-1','6','0','0','0','','0');
UPDATE save SET  savecurrentvalue = '230',  userid = '8' WHERE saveid = '6';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note) VALUES ('240.00','10', '1', '6', 'إضافة مصروف', '1814', '230', '2022-09-23 21:44:39', '8',  'expensesController.php','0','');
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid) VALUES ( '10', '10', '2022-09-23', '8', '0', '0', '2022-09-23 21:44:39','اضافة اسم مصروف( فطار )','1','0','-1');
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4761', '160', '10', '','0');
UPDATE accountstree SET name = '', customName = '', parent = '10', itemtype = '1', itemfrom = '0', notes = '', del = '0', userid = '1', mydate = '2021-12-01', itemtype2 = '1', theValue = '-734365', theOrder = '0', layingOrder = '',reportid = '2' WHERE id = '160';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4761', '140', '10', '','0');
UPDATE accountstree SET name = 'خزينة محل كفر الدوار', customName = 'خزينة محل كفر الدوار', parent = '20', itemtype = '3', itemfrom = '0', notes = '', del = '0', userid = '1', mydate = '2021-11-07', itemtype2 = '1', theValue = '-628275', theOrder = '0', layingOrder = '',reportid = '2' WHERE id = '140';
UPDATE expenses SET expensestypeid = '-1', expensesname = 'فطار', expensesdetails = '', expensesValue = '10.00', expensesdate = '2022-09-23', userid = '8', conditions = '0',saveid = '6' , dailyentryid = '4761', bankid = '0', bankaccountid = '0', checknum = '', productid = '0' WHERE expensesid = '1814';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:14:39";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 21:44:39", deviceType = "DESKTOP" WHERE userid = 8;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 21:44:40', '8', 'sucess', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:14:41";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 21:44:41", deviceType = "DESKTOP" WHERE userid = 8;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 21:44:41', '8', 'show', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:14:43";
UPDATE user SET loginip = "197.35.190.221", lastactivetime = "2022-09-23 21:44:43", deviceType = "DESKTOP" WHERE userid = 8;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('savedailyController.php', '2022-09-23 21:44:43', '8', '', '197.35.190.221', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:18:32";
UPDATE user SET loginip = "197.192.206.197", lastactivetime = "2022-09-23 21:48:32", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 21:48:32', '1', 'add', '197.192.206.197', '', 'DESKTOP');
UPDATE storedetail SET  productquantity = '16', userid = '1', storedetaildate = '2022-09-23' WHERE storedetailid = '2272';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('678', '5', '1', '0', '-1', 'تم إعادة جرد المنتج بالقيمة الحالية بالزيادة', 'inventoryController.php', '15.00', '16', '1', '2022-09-23','0','0');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:18:51";
UPDATE user SET loginip = "197.192.206.197", lastactivetime = "2022-09-23 21:48:51", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 21:48:51', '1', 'show', '197.192.206.197', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 18:20:09";
UPDATE user SET loginip = "197.192.206.197", lastactivetime = "2022-09-23 21:50:09", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 21:50:09', '1', 'addsellBill', '197.192.206.197', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE userid = 7;
UPDATE user SET loginip = "" WHERE userid = 7;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:15:42";
UPDATE user SET loginip = "197.192.206.197", lastactivetime = "2022-09-23 22:45:42", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('inventoryController.php', '2022-09-23 22:45:42', '1', 'show', '197.192.206.197', '', 'DESKTOP');
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:17:01";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 22:47:01", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 22:47:01', '1', '', '197.192.207.8', '', 'DESKTOP');
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 < "2022-09-23 19:17:01";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:17:08";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 22:47:08", deviceType = "DESKTOP" WHERE userid = 1;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 22:47:08', '1', 'addsellBill', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE userid = 1;
INSERT IGNORE INTO relusergroupproperties (usergroupid, propertyid, propertyvalue, theorder)
                SELECT -1,propertyid , 0,0
                from properties;
INSERT IGNORE INTO usergroupadmin (propertyid, isallowed)
                SELECT propertyid , propertydefault
                from properties;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:50:29";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:20:29", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('index.php', '2022-09-23 23:20:29', '7', '', '197.192.207.8', '', 'DESKTOP');
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 < "2022-09-23 19:50:30";
DROP PROCEDURE IF EXISTS clientInUse;;

CREATE PROCEDURE clientInUse(IN id INT,OUT debtis VARCHAR(256),OUT nameis VARCHAR(256))
BEGIN
DECLARE in_use_flag INT DEFAULT 1;
SELECT inUse FROM client WHERE clientid = id INTO in_use_flag;

    IF in_use_flag = 0 THEN
        update client set inUse=1 where clientid = id;
        SELECT clientdebt,clientname INTO debtis,nameis FROM client WHERE clientid = id ;
    ELSE
        SELECT "in_use","in_use" INTO debtis,nameis;
    END IF;

END

;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:50:40";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:20:41", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 23:20:41', '7', 'addsellBill', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:51:20";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:21:20", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('savedailyController.php', '2022-09-23 23:21:20', '7', '', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:52:46";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:22:46", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 23:22:46', '7', 'addsellBill', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:53:51";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:23:51", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 23:23:51', '7', 'addAndRetuen', '197.192.207.8', '', 'DESKTOP');

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 0632e23a646727
-- ----------------------------------------------------------------------------------------------------

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) VALUES ('2022-09-23 23:22:46', '0632e23a646727', '1', '0.00', '0', '0', '1', '100', '100', '100', '0', '5', '2022-09-23 23:23:51', '', '7', '0', 'نقدي', '5', '0', '3', '0', 'نقدي', '1' ,'0','','','','','-1','0','0','0','0','0','100','0','','0','0','100','0','0','0','0','0','0','0','0','');
UPDATE client SET  clientdebt = '0', userid = '7' 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 ) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','8427', '0', '2022-09-23 23:23:51', '7', 'sellbillController.php', 'اضافة فاتورة مبيعات', '100', '0', null, '0', null, null,'', '0','1','1','0','1');
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) VALUES ('75','00311', '8427', '1', '311', '1', '100', '100', '0', '', '1', '2022-09-23 23:23:52', '311', '0.00', '0', '5','0','','','0','0','0','0','0','0','1','0','','');
UPDATE sellbilldetail SET  lastbuyprice = 75.00 , meanbuyprice = 75.00, lastbuyprice_withDiscount = 75.00, meanbuyprice_withDiscount = 75.00
                where sellbilldetailid = 25105;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet)
                    VALUES (311, '2022-09-23', 100, 75, 75
                    , 75, 75, 75, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+100, sellCostBuyPrice =sellCostBuyPrice+75
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+75, sellCostMeanBuyPrice = sellCostMeanBuyPrice+75
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+75, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+75
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+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)
                    VALUES (5, '2022-09-23', 100, 75, 75
                    , 75, 75, 75, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+100, sellCostBuyPrice =sellCostBuyPrice+75
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+75, sellCostMeanBuyPrice = sellCostMeanBuyPrice+75
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+75, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+75
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                        , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0;
UPDATE storedetail SET  productquantity = '-14', userid = '7', storedetaildate = '2022-09-23 23:23:52' WHERE storedetailid = '884';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('311', '5', '1', '1', '8427', 'اضافة فاتورة مبيعات', 'sellbillController.php', '-13.00', '-14', '7', '2022-09-23 23:23:52','0','0');
UPDATE save SET  savecurrentvalue = '200',  userid = '7' WHERE saveid = '5';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note) VALUES ('100.00','100', '0', '5', 'اضافة فاتورة مبيعات', '8427', '200', '2022-09-23 23:23:52', '7',  'sellbillController.php','1','');
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice)
                    VALUES ('2022-09-23', 100, 75, 75
                    , 75, 75, 75, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+100, sellCostBuyPrice =sellCostBuyPrice+75
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+75, sellCostMeanBuyPrice = sellCostMeanBuyPrice+75
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+75, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+75
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                        , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice)
                    VALUES (1, '2022-09-23', 100, 75, 75
                    , 75, 75, 75, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+100, sellCostBuyPrice =sellCostBuyPrice+75
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+75, sellCostMeanBuyPrice = sellCostMeanBuyPrice+75
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+75, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+75
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                        , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice)
                    VALUES (1, 100, 75, 75
                    , 75, 75, 75, 0)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+100, netSellCostBuyPrice = netSellCostBuyPrice+75
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+75
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+75
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+75
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+75
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+0;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 0632e23a646727 and sellbillId = 8427 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:53:54";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:23:54", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 23:23:54', '7', 'addsellBill', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:54:42";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:24:42", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 23:24:42', '7', 'addAndRetuen', '197.192.207.8', '', 'DESKTOP');

-- ----------------------------------------------------------------------------------------------------
-- bill add start - with serial 0632e23eaa3f72
-- ----------------------------------------------------------------------------------------------------

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) VALUES ('2022-09-23 23:23:54', '0632e23eaa3f72', '1', '0.00', '0', '0', '1', '200', '200', '200', '0', '5', '2022-09-23 23:24:43', '', '7', '0', 'نقدي', '5', '0', '3', '0', 'نقدي', '1' ,'0','','','','','-1','0','0','0','0','0','200','0','','0','0','200','0','0','0','0','0','0','0','0','');
UPDATE client SET  clientdebt = '0', userid = '7' 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 ) VALUES ('1','0.00','0','0','اضافة فاتورة مبيعات','8428', '0', '2022-09-23 23:24:43', '7', 'sellbillController.php', 'اضافة فاتورة مبيعات', '200', '0', null, '0', null, null,'', '0','1','1','0','1');
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) VALUES ('400','00944', '8428', '1', '944', '1', '200.00', '200', '0', '', '0', '2022-09-23 23:24:43', '944', '0.00', '0', '5','0','','','0','0','0','0','0','0','0','0','','');
UPDATE sellbilldetail SET  lastbuyprice = 200.00 , meanbuyprice = 300.00, lastbuyprice_withDiscount = 200.00, meanbuyprice_withDiscount = 300.00
                where sellbilldetailid = 25106;
 INSERT INTO quickprofitproduct (productId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount, returnSellCostOverAllAveragePrice,netQuantity,netQuantityRet)
                    VALUES (944, '2022-09-23', 200, 400, 200
                    , 300, 200, 300, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0, 1, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+200, sellCostBuyPrice =sellCostBuyPrice+400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+200, sellCostMeanBuyPrice = sellCostMeanBuyPrice+300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+200, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                            , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+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)
                    VALUES (5, '2022-09-23', 200, 400, 200
                    , 300, 200, 300, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+200, sellCostBuyPrice =sellCostBuyPrice+400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+200, sellCostMeanBuyPrice = sellCostMeanBuyPrice+300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+200, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                        , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0;
UPDATE storedetail SET  productquantity = '1', userid = '7', storedetaildate = '2022-09-23 23:24:43' WHERE storedetailid = '3045';
INSERT INTO storereport (productid, storeid, productquantity, storereporttype, storereportmodelid, processname, tablename, productbefore, productafter, userid, storereportdate,sizeid,colorid) VALUES ('944', '5', '1', '1', '8428', 'اضافة فاتورة مبيعات', 'sellbillController.php', '2.00', '1', '7', '2022-09-23 23:24:43','0','0');
UPDATE save SET  savecurrentvalue = '400',  userid = '7' WHERE saveid = '5';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note) VALUES ('200.00','200', '0', '5', 'اضافة فاتورة مبيعات', '8428', '400', '2022-09-23 23:24:43', '7',  'sellbillController.php','1','');
 INSERT INTO quickprofitday (theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice)
                    VALUES ('2022-09-23', 200, 400, 200
                    , 300, 200, 300, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+200, sellCostBuyPrice =sellCostBuyPrice+400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+200, sellCostMeanBuyPrice = sellCostMeanBuyPrice+300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+200, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                        , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0;
 INSERT INTO quickprofitclient (clientId, theDate, sellVal, sellCostBuyPrice, sellCostLastBuyPrice, sellCostMeanBuyPrice, sellCostLastBuyPricewithDiscount, sellCostMeanBuyPricewithDiscount, sellCostOverAllAveragePrice, returnSellVal, returnSellCostBuyPrice, returnSellCostLastBuyPrice, returnSellCostMeanBuyPrice, returnSellCostLastBuyPricewithDiscount, returnSellCostMeanBuyPricewithDiscount,returnSellCostOverAllAveragePrice)
                    VALUES (1, '2022-09-23', 200, 400, 200
                    , 300, 200, 300, 0
                    , 0, 0, 0, 0
                    , 0, 0, 0)
                ON DUPLICATE KEY UPDATE sellVal = sellVal+200, sellCostBuyPrice =sellCostBuyPrice+400
                        , sellCostLastBuyPrice = sellCostLastBuyPrice+200, sellCostMeanBuyPrice = sellCostMeanBuyPrice+300
                        , sellCostLastBuyPricewithDiscount = sellCostLastBuyPricewithDiscount+200, sellCostMeanBuyPricewithDiscount = sellCostMeanBuyPricewithDiscount+300
                            , sellCostOverAllAveragePrice = sellCostOverAllAveragePrice+0
                        , returnSellVal = returnSellVal+0, returnSellCostBuyPrice = returnSellCostBuyPrice+0, returnSellCostLastBuyPrice = returnSellCostLastBuyPrice+0
                        , returnSellCostMeanBuyPrice = returnSellCostMeanBuyPrice+0, returnSellCostLastBuyPricewithDiscount = returnSellCostLastBuyPricewithDiscount+0
                        , returnSellCostMeanBuyPricewithDiscount = returnSellCostMeanBuyPricewithDiscount+0
                        , returnSellCostOverAllAveragePrice = returnSellCostOverAllAveragePrice+0;
 INSERT INTO quickprofitgeneral (id, netSellVal, netSellCostBuyPrice, netSellCostLastBuyPrice, netSellCostMeanBuyPrice, netSellCostLastBuyPricewithDiscount, netSellCostMeanBuyPricewithDiscount, netSellCostOverAllAveragePrice)
                    VALUES (1, 200, 400, 200
                    , 300, 200, 300, 0)
                ON DUPLICATE KEY UPDATE netSellVal = netSellVal+200, netSellCostBuyPrice = netSellCostBuyPrice+400
                , netSellCostLastBuyPrice = netSellCostLastBuyPrice+200
                , netSellCostMeanBuyPrice = netSellCostMeanBuyPrice+300
                , netSellCostLastBuyPricewithDiscount = netSellCostLastBuyPricewithDiscount+200
                , netSellCostMeanBuyPricewithDiscount = netSellCostMeanBuyPricewithDiscount+300
                , netSellCostOverAllAveragePrice = netSellCostOverAllAveragePrice+0;
COMMIT;

-- ----------------------------------------------------------------------------------------------------
-- bill add end - with serial 0632e23eaa3f72 and sellbillId = 8428 and returnsellbillId = 
-- ----------------------------------------------------------------------------------------------------

UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:54:43";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:24:43", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 23:24:43', '7', 'addsellBill', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:55:06";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:25:06", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 23:25:06', '7', '', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:55:46";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:25:46", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 23:25:46', '7', 'add', '197.192.207.8', '', 'DESKTOP');
BEGIN;
INSERT INTO expenses (expensestypeid, expensesname, expensesdetails, expensesValue, expensesdate, userid, conditions,costcenterid,saveid,dailyentryid,bankid,bankaccountid,checknum,productid) VALUES ('2', 'عمادحمدي', '', '50', '2022-09-23', '7', '0','-1','5','0','0','0','','0');
UPDATE save SET  savecurrentvalue = '350',  userid = '7' WHERE saveid = '5';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note) VALUES ('400.00','50', '1', '5', 'إضافة مصروف', '1815', '350', '2022-09-23 23:25:46', '7',  'expensesController.php','0','');
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid) VALUES ( '50', '50', '2022-09-23', '7', '0', '0', '2022-09-23 23:25:46','اضافة اسم مصروف( عمادحمدي )','1','0','-1');
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4762', '145', '50', '','0');
UPDATE accountstree SET name = 'مرتبات', customName = 'مرتبات', parent = '14', itemtype = '3', itemfrom = '0', notes = '', del = '0', userid = '1', mydate = '2021-11-08', itemtype2 = '0', theValue = '258735', theOrder = '0', layingOrder = '',reportid = '2' WHERE id = '145';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4762', '139', '50', '','0');
UPDATE accountstree SET name = 'خزينة محل عبدالله', customName = 'خزينة محل عبدالله', parent = '20', itemtype = '3', itemfrom = '0', notes = '', del = '0', userid = '1', mydate = '2022-07-06', itemtype2 = '1', theValue = '-1102464', theOrder = '0', layingOrder = '',reportid = '0' WHERE id = '139';
UPDATE expenses SET expensestypeid = '2', expensesname = 'عمادحمدي', expensesdetails = '', expensesValue = '50.00', expensesdate = '2022-09-23', userid = '7', conditions = '0',saveid = '5' , dailyentryid = '4762', bankid = '0', bankaccountid = '0', checknum = '', productid = '0' WHERE expensesid = '1815';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:55:46";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:25:46", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 23:25:46', '7', 'sucess', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:55:58";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:25:58", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 23:25:58', '7', 'show', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:57:20";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:27:20", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('sellbillController.php', '2022-09-23 23:27:20', '7', 'addsellBill', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:58:32";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:28:32", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 23:28:32', '7', '', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:58:56";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:28:56", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 23:28:56', '7', 'add', '197.192.207.8', '', 'DESKTOP');
BEGIN;
INSERT INTO expenses (expensestypeid, expensesname, expensesdetails, expensesValue, expensesdate, userid, conditions,costcenterid,saveid,dailyentryid,bankid,bankaccountid,checknum,productid) VALUES ('2', 'عبدالله', '', '150', '2022-09-23', '7', '0','-1','5','0','0','0','','0');
UPDATE save SET  savecurrentvalue = '200',  userid = '7' WHERE saveid = '5';
INSERT INTO savedaily (savedailysavebefore, savedailychangeamount, savedailychangetype, saveid, processname, savedailymodelid, savedailysaveafter, savedailydate, userid, tablename,clientid ,note) VALUES ('350.00','150', '1', '5', 'إضافة مصروف', '1816', '200', '2022-09-23 23:28:56', '7',  'expensesController.php','0','');
INSERT INTO dailyentry (totalcreditor, totaldebtor, thedate, userid, `condition`, reverseofid, dDateTime,entryComment,fromFlag,related,branchid) VALUES ( '150', '150', '2022-09-23', '7', '0', '0', '2022-09-23 23:28:56','اضافة اسم مصروف( عبدالله )','1','0','-1');
INSERT INTO dailyentrydebtor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4763', '145', '150', '','0');
UPDATE accountstree SET name = 'مرتبات', customName = 'مرتبات', parent = '14', itemtype = '3', itemfrom = '0', notes = '', del = '0', userid = '1', mydate = '2021-11-08', itemtype2 = '0', theValue = '258885', theOrder = '0', layingOrder = '',reportid = '2' WHERE id = '145';
INSERT INTO dailyentrycreditor (dailyentryid, accountstreeid, value, dComment,costcenterid) VALUES ('4763', '139', '150', '','0');
UPDATE accountstree SET name = 'خزينة محل عبدالله', customName = 'خزينة محل عبدالله', parent = '20', itemtype = '3', itemfrom = '0', notes = '', del = '0', userid = '1', mydate = '2022-07-06', itemtype2 = '1', theValue = '-1102614', theOrder = '0', layingOrder = '',reportid = '0' WHERE id = '139';
UPDATE expenses SET expensestypeid = '2', expensesname = 'عبدالله', expensesdetails = '', expensesValue = '150.00', expensesdate = '2022-09-23', userid = '7', conditions = '0',saveid = '5' , dailyentryid = '4763', bankid = '0', bankaccountid = '0', checknum = '', productid = '0' WHERE expensesid = '1816';
COMMIT;
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:58:56";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:28:56", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 23:28:56', '7', 'sucess', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:59:07";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:29:07", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('expensesController.php', '2022-09-23 23:29:07', '7', 'show', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:59:07";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:29:07", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('savedailyController.php', '2022-09-23 23:29:07', '7', '', '197.192.207.8', '', 'DESKTOP');
UPDATE user SET loginip = "" WHERE lastactivetime < "2022-09-23 19:59:11";
UPDATE user SET loginip = "197.192.207.8", lastactivetime = "2022-09-23 23:29:11", deviceType = "DESKTOP" WHERE userid = 7;
INSERT INTO movementmanage (operationname, movementmanagedate, userid, currentDo, ip, mac, deviceType) VALUES ('savedailyController.php', '2022-09-23 23:29:11', '7', 'showDetail', '197.192.207.8', '', 'DESKTOP');
