# [24-Oct-2023 14:13:34] /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
# [24-Oct-2023 14:13:56] /finance/root/bg/invoices.html?from=&to=&keyword=the 167.99.142.201

set names utf8

SELECT * FROM `invoices` AS `Inv` WHERE `Inv`.`Type` > 0 AND `Inv`.`SearchKey` LIKE '%wrvCn8OYw%' ORDER BY `Inv`.`PostDate` DESC, `Inv`.`ID` DESC
# [24-Oct-2023 14:13:59] /finance/root/bg/invoices.html?from=&to=&keyword=smar 167.99.142.201

set names utf8

SELECT * FROM `invoices` AS `Inv` WHERE `Inv`.`Type` > 0 AND `Inv`.`SearchKey` LIKE '%wrrCisKhw5bCsM%' ORDER BY `Inv`.`PostDate` DESC, `Inv`.`ID` DESC
# [24-Oct-2023 14:14:03] /finance/root/bg/invoices/2114.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` = 2114
            LIMIT 1

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