# [30-Oct-2025 09:03:40] /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
# [30-Oct-2025 09:03:44] /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
# [30-Oct-2025 09:03:49] /finance/root/bg/ajax/invoices/form/clone/10469.html?pid=10469&_=1761807829188 167.99.142.201

set names utf8

SELECT
                *
            FROM
                `invoices`
            WHERE
                `ID` = 10469
            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
# [30-Oct-2025 09:04:08] /finance/root/bg/ajax/invoices/insert.html?_=1761807847986 167.99.142.201

set names utf8

SELECT
                *
            FROM
                `clients`
            WHERE
                `ID` = 81 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` = '10474', `Language` = 'bg', `PostDate` = '2025-10-30', `LastUpdate` = '2025-10-30 09:04:08', `Type` = '0', `ParentID` = 0, `Data` = '0GWTY3U8zDKk1iy3MjZOfOSES_qeZ65Qv30-m-PCDMppUmsSdu_SbW-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2yRvAsItrEpOT0PynqdPc0HUJk8OLLqvB5CvXQJ5nvGO51XX_3r5OwD9Y', `SearchKey` = 'wofCpMOPwrDgcOQwrPCt8KDwqTDnsKrw5vDwofCpMK0wrDg8OQwqDrsKDwqTDhMKrw5rCpMKdwpzChMKhwwofCpMK4wrDgMwofCpMOIwrDg8OgwqCocKDwqTCwrrCn8OGwp7CrsKewqXDnMK1w4XDkMOGw4fCssKTwwofCscOAwrDg8KlwrPCtcKDwqTCsMKrw5jDn8KdwqbChMKhwqrCvMOXw5TCiMKHwp3DgMwofCpMKjwrDgMwofCscK0wrD'
# [30-Oct-2025 09:04:08] /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
# [30-Oct-2025 09:04:16] /finance/root/bg/invoices/10474.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` = 10474
            LIMIT 1

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