# [05-Oct-2025 06:48:01] /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
# [05-Oct-2025 06:48:15] /finance/root/bg/invoices.html?from=01.10.2024&to=31.10.2024&keyword= 167.99.142.201

set names utf8

SELECT * FROM `invoices` AS `Inv` WHERE `Inv`.`Type` > 0 AND `Inv`.`PostDate` BETWEEN '2024-10-01 00:00:00' AND '2024-10-31 23:59:59'  ORDER BY `Inv`.`PostDate` DESC, `Inv`.`ID` DESC
# [05-Oct-2025 06:48:22] /finance/root/bg/invoices/2349.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` = 2349
            LIMIT 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Oct') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
# [05-Oct-2025 06:48:58] /finance/root/bg/ajax/invoices/form/clone/2349.html?pid=2349&_=1759636138794 167.99.142.201

set names utf8

SELECT
                *
            FROM
                `invoices`
            WHERE
                `ID` = 2349
            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
