# [14-Nov-2025 13:49:49] /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
# [14-Nov-2025 13:49:56] /finance/root/bg/ajax/invoices/form.html?_=1763120995622 167.99.142.201

set names utf8

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
# [14-Nov-2025 13:50:42] /finance/root/bg/ajax/invoices/insert.html?_=1763121042084 167.99.142.201

set names utf8

SELECT
                *
            FROM
                `clients`
            WHERE
                `ID` = 2 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` = '2592', `Language` = 'bg', `PostDate` = '2025-11-14', `LastUpdate` = '2025-11-14 13:50:42', `Type` = '1', `ParentID` = 0, `Data` = 'PqCXuTMUlQqndv25E2TR5LP4tfBazS9R-_psIUlWfhwnvCXC1WapQWeCz2TgK9JimmeuhOlF58WzCU5_O2V3UOslejH0HzED_a2AroBT2IZEfV1U8z-08dwL3y-P7-l6FlylmvzPvIUNUo-V9ha9q77XrclUi5Tb3txNMNAtd6vEspOE58eDHA_gyBAzybdDZtlwdroA2QwtX59dCoEGw4F7Yu7lDKDdBmsZy61bb2fen_Qrf_vumo_pZxClzAq2AkJ6nC8Oupr2ARWcDk8YBQeF20DAlfRIosi2S2JrcLaoT4v5XKpTYpGo-MiGHsbqFR8BOE1vwuHyBzw1nvSMHcVmx5ZtqLTrZ976sBZQT1NcwCiB8c2cPCPNuBeCTgtq2PFekOKSl-ZB00Qn_3lJB5xuSUV96f5lkRAp9z8ZyG1YyVkb00aquC7IWczV8ORVkwPni1RQjVHdCqZbJihr87bIjx_hoJuYWjiNrz8od-9kKrLUDEzmc-KMBStTf_4jgiM-BbBNcU1ScyUk9KYDHWCKH7p1iqiyLyFVYiwYiArYoYIk5AOBzh4LrUmD8StmW_VvmF-NDGpAOXrpgJHLOqGTI6S38fPAYx_NogCnuCzPL9WUmREts7GD2nI6w4zRrTE43P8a37UuMr1XFcn8dNTBZwLs8_87-rbQikmlRWiocDYJVfBnR46joFp_4Bg767a-SBZOy4JPFNtpweg3Kzp8aLmcmBCmK2ARP8NKbrh2CGcyTRJOASh0JQnQ0p5WSKR96bcQyB4fSqoA2IxcpBK7cIGHaNgMrzdPk_w6OBsNLKTusngr0y8nl7ae8Y0fcfnSs-FN_hsRrzrl9fqkfrWz1hj-v35TejbKGR7K5lS9oMQPcbNiaB_tMg3RI2WK_SG-QjrmAvAOggUYa-HEG4tfgUmO7UCHDI7Keb6TjuNPmS2IoYrnFC4M4_m4x4KxsHaiNi5pYaKqcSgjM4cKBLQwRDmL2vO7xvuWN1BcfhPn72S-9bmYWojn0hSz3GRkFOfYEWnMLMCNNIMy3cwAGw', `SearchKey` = 'wofCpMOiwrDg8OgwqCrMKDwqTDi8Ksw4Dn8KhwrLChMKuw4TCvcOIwwofCscK8wrDgsK6wqCqcKDwqTDwofCpMOIwrDg8OgwqCocKDwqTCwrDCisKpw6LCsMK0w4LCpMKtwrDCtsKKwrDgsKgwwofCpMK0wrDgMOgwqDq8KDwqTCn8Ksw4zDj8KdwpzChMKhwp7CvMOXwwofCpMOPwrDgsKlwqDq8KDwrHDmsKrw5jCucKdwqjChMKhwwofCpMO'
# [14-Nov-2025 13:50:42] /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
# [14-Nov-2025 13:50:46] /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
# [14-Nov-2025 13:51:04] /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
# [14-Nov-2025 13:51:06] /finance/root/bg/invoices/2592.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` = 2592
            LIMIT 1

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