# [11-Nov-2025 10:20:58] /finance/root/bg/invoices.html 167.99.142.201

set names utf8

SELECT * FROM `invoices` AS `Inv` WHERE `Inv`.`Type` > 0 ORDER BY `Inv`.`PostDate` DESC, `Inv`.`ID` DESC
# [11-Nov-2025 10:21:00] /finance/root/bg/proforma.html 167.99.142.201

set names utf8

SELECT
                    `Inv`.*,
                    `Original`.`ID` AS `OriginalID`
                FROM
                    `invoices` AS `Inv`
                    LEFT JOIN `invoices` AS `Original` ON `Inv`.`ID` = `Original`.`ParentID`
                WHERE
                    `Inv`.`Type` = 0
             ORDER BY `Inv`.`PostDate` DESC, `Inv`.`ID` DESC
# [11-Nov-2025 10:21:06] /finance/root/bg/ajax/invoices/form/clone/10466.html?pid=10466&_=1762849265962 167.99.142.201

set names utf8

SELECT
                *
            FROM
                `invoices`
            WHERE
                `ID` = 10466
            LIMIT 1

SELECT
                `ID`,
                `Data`
            FROM
                `clients`
            WHERE
         `Type` = 0 AND 
                    `Top` = 1
                ORDER BY
                    `PostDate`
                LIMIT 20

SELECT
                `ID`,
                `Data`
            FROM
                `clients`
            WHERE
         `Type` = 1 AND 
                    `Top` = 1
                ORDER BY
                    `PostDate`
                LIMIT 20
# [11-Nov-2025 10:21:12] /finance/root/bg/ajax/invoices/insert.html?_=1762849271838 167.99.142.201

set names utf8

SELECT
                *
            FROM
                `clients`
            WHERE
                `ID` = 70 AND
                `Visible` = 1
            LIMIT 1

SELECT
                *
            FROM
                `clients`
            WHERE
                `ID` = 1 AND
                `Visible` = 1
            LIMIT 1

SELECT MAX(`ID`) + 1 FROM `invoices` WHERE `Type` > 0 AND `ID` < 1000000000

SELECT * FROM `invoices` LIMIT 1

SHOW COLUMNS FROM `invoices`

INSERT INTO `invoices` SET `ID` = '2591', `Language` = 'bg', `PostDate` = '2025-11-11', `LastUpdate` = '2025-11-11 10:21:12', `Type` = '1', `ParentID` = 10466, `Data` = '0z5VSET1J_8T7fmyM9VDL7voOpIOecCniIxBuaht-7vOJkdVpOborwyHKV36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KDwqTCwofCpMOIwrDg8OgwqCocKDwqTCwrjCn8K2wp7CsMwofCscOIwrDg8OgwrPCtsKDwrHCuMKrw5rCucKdwqjChMKhwwofCpMOEwrDg8OgwqCrMKDwqTDhMKrw5rDj8KdwwrrCi8KwwofCscK4wrDgcOQwrPCtcKDwrHCuMKrw5rCucKhwrTChMKhwrzCvMOWw6TCiMOKwp'
# [11-Nov-2025 10:21:12] /finance/root/bg/proforma.html 167.99.142.201

set names utf8

SELECT
                    `Inv`.*,
                    `Original`.`ID` AS `OriginalID`
                FROM
                    `invoices` AS `Inv`
                    LEFT JOIN `invoices` AS `Original` ON `Inv`.`ID` = `Original`.`ParentID`
                WHERE
                    `Inv`.`Type` = 0
             ORDER BY `Inv`.`PostDate` DESC, `Inv`.`ID` DESC
# [11-Nov-2025 10:21:13] /finance/root/bg/invoices.html 167.99.142.201

set names utf8

SELECT * FROM `invoices` AS `Inv` WHERE `Inv`.`Type` > 0 ORDER BY `Inv`.`PostDate` DESC, `Inv`.`ID` DESC
# [11-Nov-2025 10:21:15] /finance/root/bg/invoices/2591.html 167.99.142.201

set names utf8

SELECT
                `Inv`.*,
                `Original`.`PostDate` AS `OriginalPostDate`
            FROM
                `invoices` AS `Inv`
                LEFT JOIN `invoices` AS `Original` ON `Inv`.`ParentID` = `Original`.`ID`
            WHERE
                `Inv`.`ID` = 2591
            LIMIT 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Nov') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
