# [06-Dec-2023 13:35: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
# [06-Dec-2023 13:36:05] /finance/root/bg/invoices.html?from=&to=&keyword=ХЕВИ 167.99.142.201

set names utf8

SELECT * FROM `invoices` AS `Inv` WHERE `Inv`.`Type` > 0 AND `Inv`.`SearchKey` LIKE '%wofCscOIwrDgcOQwqDrcKDwqTD%' ORDER BY `Inv`.`PostDate` DESC, `Inv`.`ID` DESC
# [06-Dec-2023 13:36:12] /finance/root/bg/invoices/2118.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` = 2118
            LIMIT 1

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