# [27-Aug-2025 10:08:17] /elitcar/www/bg/ajax/banners/pos_0.html?_=1756278497423 108.61.209.243

set names utf8

SELECT
                `ID`,
                `Image`,
                `Title`,
                `Target`,
                `Position`
            FROM
                `elitcar_store`.`banners`
            WHERE
                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                `Image` != '' AND
                `Position` = 0 AND
                `Visible` = 1 AND
                `Domain` & 1
        ORDER BY `PostDate` DESC

UPDATE `elitcar_store`.`banners` SET `Impressions` = `Impressions` + 1 WHERE `ID` IN (198)
# [27-Aug-2025 10:08:17] /elitcar/www/bg/ajax/banners/pos_1.html?_=1756278497424 108.61.209.243

set names utf8

SELECT
                `ID`,
                `Image`,
                `Title`,
                `Target`,
                `Position`
            FROM
                `elitcar_store`.`banners`
            WHERE
                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                `Image` != '' AND
                `Position` = 1 AND
                `Visible` = 1 AND
                `Domain` & 1
        ORDER BY RAND() LIMIT 1
# [27-Aug-2025 10:08:17] /elitcar/www/bg/ajax/banners/pos_2.html?_=1756278497424 108.61.209.243

set names utf8

SELECT
                `ID`,
                `Image`,
                `Title`,
                `Target`,
                `Position`
            FROM
                `elitcar_store`.`banners`
            WHERE
                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                `Image` != '' AND
                `Position` = 2 AND
                `Visible` = 1 AND
                `Domain` & 1
        ORDER BY RAND() LIMIT 3
# [27-Aug-2025 10:08:17] /elitcar/www/bg/ajax/promo.html?_=1756278497424 108.61.209.243
# [27-Aug-2025 10:08:17] /elitcar/www/bg/ajax/promo.html?_=1756278497424 108.61.209.243

SELECT TOP 5
                Item_Id
            FROM
                N_SalesPrice
            WHERE
                Comp_id = '001' AND
                _promotype = 1 AND
                (StartingDate <= GETDATE() OR StartingDate IS NULL) AND
                (EndingDate >= GETDATE() OR EndingDate IS NULL)
            ORDER BY NEWID()

set names utf8

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'TEKTINO RCC-8A-1234YF'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'TEKTINO RCC-8A-1234YF'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'TEKTINO RCC-8A-1234YF'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'ECS OP101'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'ECS OP101'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'ECS OP101'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'TEKTINO RCC-8A'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'TEKTINO RCC-8A'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'TEKTINO RCC-8A'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'UNITE U2011-380V'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'UNITE U2011-380V'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'UNITE 71031940'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'UNITE 71031940'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'UNITE 71031940'
            ORDER BY N_Item.Id

SELECT TOP 5
                Item_Id
            FROM
                N_SalesPrice
            WHERE
                Comp_id = '001' AND
                _promotype = 2 AND
                (StartingDate <= GETDATE() OR StartingDate IS NULL) AND
                (EndingDate >= GETDATE() OR EndingDate IS NULL)
            ORDER BY NEWID()

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'UNITE SG-2P'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'UNITE SG-2P'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'UNITE SG-2P'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'UNITE GD-515'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'UNITE GD-515'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'UNITE GD-515'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'UNITE U-DP7'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'UNITE U-DP7'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'UNITE U-DP7'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'UNITE DS-500'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'UNITE DS-500'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'UNITE DS-500'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'OSRAM OSP1000'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'OSRAM OSP1000'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'OSRAM OSP1000'
            ORDER BY N_Item.Id

SELECT TOP 5
                Item_Id
            FROM
                N_SalesPrice
            WHERE
                Comp_id = '001' AND
                _promotype = 3 AND
                (StartingDate <= GETDATE() OR StartingDate IS NULL) AND
                (EndingDate >= GETDATE() OR EndingDate IS NULL)
            ORDER BY NEWID()

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BGS 447'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BGS 447'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BGS 447'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BGS 6058'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BGS 6058'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BGS 6058'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BGS 4831'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BGS 4831'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BGS 4831'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BGS 5335'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BGS 5335'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BGS 5335'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BGS 1110'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BGS 1110'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BGS 1110'
            ORDER BY N_Item.Id

SELECT TOP 5
                Item_Id
            FROM
                N_SalesPrice
            WHERE
                Comp_id = '001' AND
                _promotype = 4 AND
                (StartingDate <= GETDATE() OR StartingDate IS NULL) AND
                (EndingDate >= GETDATE() OR EndingDate IS NULL)
            ORDER BY NEWID()
# [27-Aug-2025 10:08:22] /elitcar/www/bg/ajax/users/login.html?_=1756278502588 108.61.209.243

SELECT
                    [ID]
                FROM
                    [N_ContragentEShopSettings]
                WHERE
                    [UserName] = 'lubo' AND
                    ([Password] = '35833583' OR [_HASHPassword] = '0XA385B0911A18B75E7AE9C867CA60E22687F533FD' OR [_HASHPassword] LIKE '0XA385B0911A18B75E7AE9C867CA60E22687F533FD%' OR [_HASHPassword] LIKE '%0XA385B0911A18B75E7AE9C867CA60E22687F533FD')

Successfully disconnected from the database!
# [27-Aug-2025 10:08:22] /elitcar/www/ 108.61.209.243

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH F 026 C00 466'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH F 026 C00 466'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BOSCH F 026 C00 466'
            ORDER BY N_Item.Id

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH F 026 C00 467'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH F 026 C00 467'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BOSCH F 026 C00 467'
            ORDER BY N_Item.Id

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH F 026 C00 469'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH F 026 C00 469'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BOSCH F 026 C00 469'
            ORDER BY N_Item.Id

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH F 026 C00 468'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH F 026 C00 468'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BOSCH F 026 C00 468'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'ECS 14716-7.4'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'ECS 14716-7.4'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'ECS 14716-7.4'
            ORDER BY N_Item.Id

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

Successfully disconnected from the database!
# [27-Aug-2025 10:08:23] /elitcar/www/ 108.61.209.243

set names utf8

SELECT * FROM `elitcar_store`.`history_autos` WHERE `MonetaUser` = 'lubo' AND `Language` = 'bg' ORDER BY PostDate DESC LIMIT 30

SELECT * FROM `elitcar_store`.`history_vin` WHERE `MonetaUser` = 'lubo' ORDER BY PostDate DESC LIMIT 30

Successfully disconnected from the database!
# [27-Aug-2025 10:08:23] /elitcar/www/bg/ajax/banners/pos_1.html?_=1756278504290 108.61.209.243
# [27-Aug-2025 10:08:23] /elitcar/www/bg/ajax/banners/pos_0.html?_=1756278504289 108.61.209.243
# [27-Aug-2025 10:08:23] /elitcar/www/bg/ajax/banners/pos_2.html?_=1756278504290 108.61.209.243
# [27-Aug-2025 10:08:23] /elitcar/www/bg/ajax/promo.html?_=1756278504291 108.61.209.243
# [27-Aug-2025 10:08:23] /elitcar/www/bg/ajax/promo.html?_=1756278504291 108.61.209.243
# [27-Aug-2025 10:08:23] /elitcar/www/bg/ajax/history/parts.html?_=1756278504291 108.61.209.243
# [27-Aug-2025 10:08:23] /elitcar/www/bg/ajax/users/bar.html?_=1756278504338 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'
# [27-Aug-2025 10:08:24] /elitcar/www/bg/ajax/banners/pos_1.html?_=1756278504290 108.61.209.243

set names utf8

SELECT
                `ID`,
                `Image`,
                `Title`,
                `Target`,
                `Position`
            FROM
                `elitcar_store`.`banners`
            WHERE
                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                `Image` != '' AND
                `Position` = 1 AND
                `Visible` = 1 AND
                `Domain` & 1
        ORDER BY RAND() LIMIT 1

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

SELECT TOP 5
                Item_Id
            FROM
                N_SalesPrice
            WHERE
                Comp_id = '001' AND
                _promotype = 1 AND
                (StartingDate <= GETDATE() OR StartingDate IS NULL) AND
                (EndingDate >= GETDATE() OR EndingDate IS NULL)
            ORDER BY NEWID()
# [27-Aug-2025 10:08:24] /elitcar/www/bg/ajax/banners/pos_0.html?_=1756278504289 108.61.209.243

set names utf8

SELECT
                `ID`,
                `Image`,
                `Title`,
                `Target`,
                `Position`
            FROM
                `elitcar_store`.`banners`
            WHERE
                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                `Image` != '' AND
                `Position` = 0 AND
                `Visible` = 1 AND
                `Domain` & 1
        ORDER BY `PostDate` DESC

UPDATE `elitcar_store`.`banners` SET `Impressions` = `Impressions` + 1 WHERE `ID` IN (198)

Successfully disconnected from the database!
# [27-Aug-2025 10:08:24] /elitcar/www/bg/ajax/banners/pos_2.html?_=1756278504290 108.61.209.243

set names utf8

SELECT
                `ID`,
                `Image`,
                `Title`,
                `Target`,
                `Position`
            FROM
                `elitcar_store`.`banners`
            WHERE
                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                `Image` != '' AND
                `Position` = 2 AND
                `Visible` = 1 AND
                `Domain` & 1
        ORDER BY RAND() LIMIT 3

Successfully disconnected from the database!
# [27-Aug-2025 10:08:24] /elitcar/www/bg/ajax/users/bar.html?_=1756278504338 108.61.209.243

set names utf8

SELECT `Qty` FROM `elitcar_store`.`basket` WHERE `UserName` = 'lubo' AND `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' LIMIT 1

SELECT COUNT(*) FROM `elitcar_store`.`offers` WHERE `UserID` = 'E0B87CBDAA694AC480BCD81D96D4ABBB' AND `Status` = 0

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

Successfully disconnected from the database!
# [27-Aug-2025 10:08:24] /elitcar/www/bg/ajax/history/parts.html?_=1756278504291 108.61.209.243

set names utf8

SELECT * FROM `elitcar_store`.`history_parts` WHERE `MonetaUser` = 'lubo' AND `Language` = 'bg' ORDER BY PostDate DESC LIMIT 30

Successfully disconnected from the database!
# [27-Aug-2025 10:08:25] /elitcar/www/bg/groups/39849642.html 108.61.209.243

set names utf8

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 39849642
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`
# [27-Aug-2025 10:08:25] /elitcar/www/bg/groups/39849642.html 108.61.209.243

set names utf8

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'UNITE U823S'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'UNITE U823S'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'ECS OP101'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'ECS OP101'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'ECS OP101'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'TEKTINO RCC-6S-ID'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'TEKTINO RCC-6S-ID'
            LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'TEKTINO RCC-8A'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'TEKTINO RCC-8A'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'TEKTINO RCC-8A'
            ORDER BY N_Item.Id

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'UNITE U256'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'UNITE U256'
            LIMIT 1

SELECT TOP 5
                Item_Id
            FROM
                N_SalesPrice
            WHERE
                Comp_id = '001' AND
                _promotype = 2 AND
                (StartingDate <= GETDATE() OR StartingDate IS NULL) AND
                (EndingDate >= GETDATE() OR EndingDate IS NULL)
            ORDER BY NEWID()

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

SELECT
                *
            FROM
                `elitcar_store`.`history_autokelly`
            WHERE
                `MonetaUser` = 'lubo' AND
                `NodeID` = 39850140 AND
                `Language` = 'bg'
            ORDER BY
                PostDate DESC
            LIMIT 30

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 51224611
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38979037
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38979167
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38957081
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38957087
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 40064029
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38957089
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38908614
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 40064028
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT * FROM `elitcar_store`.`history_autos` WHERE `MonetaUser` = 'lubo' AND `Language` = 'bg' ORDER BY PostDate DESC LIMIT 30

SELECT * FROM `elitcar_store`.`history_vin` WHERE `MonetaUser` = 'lubo' ORDER BY PostDate DESC LIMIT 30

Successfully disconnected from the database!

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'OSRAM OSP1000'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'OSRAM OSP1000'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'OSRAM OSP1000'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'UNITE CR-3M'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'UNITE CR-3M'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'UNITE CR-3M'
            ORDER BY N_Item.Id
# [27-Aug-2025 10:08:27] /elitcar/www/bg/ajax/history/parts.html?_=1756278507485 108.61.209.243
# [27-Aug-2025 10:08:27] /elitcar/www/bg/ajax/users/bar.html?_=1756278507534 108.61.209.243

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'UNITE GD-515'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'UNITE GD-515'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'UNITE GD-515'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'UNITE U-DP7'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'UNITE U-DP7'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'UNITE U-DP7'
            ORDER BY N_Item.Id

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'UNITE SG-2P'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'UNITE SG-2P'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'UNITE SG-2P'
            ORDER BY N_Item.Id

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT TOP 5
                Item_Id
            FROM
                N_SalesPrice
            WHERE
                Comp_id = '001' AND
                _promotype = 3 AND
                (StartingDate <= GETDATE() OR StartingDate IS NULL) AND
                (EndingDate >= GETDATE() OR EndingDate IS NULL)
            ORDER BY NEWID()

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'
# [27-Aug-2025 10:08:27] /elitcar/www/bg/ajax/history/parts.html?_=1756278507485 108.61.209.243

set names utf8

SELECT * FROM `elitcar_store`.`history_parts` WHERE `MonetaUser` = 'lubo' AND `Language` = 'bg' ORDER BY PostDate DESC LIMIT 30

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'
# [27-Aug-2025 10:08:27] /elitcar/www/bg/ajax/users/bar.html?_=1756278507534 108.61.209.243

set names utf8

SELECT `Qty` FROM `elitcar_store`.`basket` WHERE `UserName` = 'lubo' AND `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' LIMIT 1

SELECT COUNT(*) FROM `elitcar_store`.`offers` WHERE `UserID` = 'E0B87CBDAA694AC480BCD81D96D4ABBB' AND `Status` = 0

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

Successfully disconnected from the database!
# [27-Aug-2025 10:08:27] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1756278508321 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BGS 15216'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BGS 15216'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BGS 15216'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BGS 5335'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BGS 5335'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BGS 5335'
            ORDER BY N_Item.Id

Successfully disconnected from the database!

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BGS 62605'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BGS 62605'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BGS 62605'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BGS 1192'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BGS 1192'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BGS 1192'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BGS 4114'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BGS 4114'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BGS 4114'
            ORDER BY N_Item.Id

SELECT TOP 5
                Item_Id
            FROM
                N_SalesPrice
            WHERE
                Comp_id = '001' AND
                _promotype = 4 AND
                (StartingDate <= GETDATE() OR StartingDate IS NULL) AND
                (EndingDate >= GETDATE() OR EndingDate IS NULL)
            ORDER BY NEWID()

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'ECS 14716-7.4'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'ECS 14716-7.4'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'ECS 14716-7.4'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH F 026 C00 469'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH F 026 C00 469'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BOSCH F 026 C00 469'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH F 026 C00 468'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH F 026 C00 468'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BOSCH F 026 C00 468'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH F 026 C00 466'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH F 026 C00 466'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BOSCH F 026 C00 466'
            ORDER BY N_Item.Id

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'BOSCH F 026 C00 467'

SELECT
                `autokelly`.`product`.`Id` AS `ProductId`,
                `autokelly`.`codeprimary`.`CodeValue`,
                `autokelly`.`brand`.`Name` AS `BrandName`,
                `autokelly`.`producttextname`.`BG` AS `ProductTitle`,
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`ProducerId`,
                `elitcar_store`.`moneta`.`ProducerCode`
            FROM
                `autokelly`.`product`
                INNER JOIN `autokelly`.`brand` ON `autokelly`.`brand`.`Id` =  `autokelly`.`product`.`BrandId`
                INNER JOIN `autokelly`.`codeprimary` ON `autokelly`.`codeprimary`.`ProductId` =  `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextnameconversion` ON `autokelly`.`producttextnameconversion`.`ProductId` = `autokelly`.`product`.`Id`
                INNER JOIN `autokelly`.`producttextname` ON `autokelly`.`producttextname`.`ProductTextNameConversionId` = `autokelly`.`producttextnameconversion`.`Id`
                LEFT JOIN `elitcar_store`.`moneta` ON `elitcar_store`.`moneta`.`ProductId` = `autokelly`.`product`.`Id`
            WHERE
                `autokelly`.`product`.`Id` = 0
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'BOSCH F 026 C00 467'
            LIMIT 1

SELECT
                N_Item.Id,
                N_Item.No2,
                N_Item.FullSearch_Id,
                N_Item.FullSearchTecDoc_Id,
                N_Producer.SUP_ID,
                N_Producer.SUP_BRAND,
                N_Producer.BRA_ID,
                N_Producer.BRA_BRAND,
                N_Item.Description,
                N_Item.C_Datetime,
                N_Item.VendorNo,
                N_Item.VendorItemNo,
                N_Item.Blocked,
                N_Item._TecDocNo,
                N_Item.ReusableGroup_Id,
                N_Producer.Name,
                N_Producer._Name2,
                N_Producer.WithoutQty
            FROM
                N_Item WITH(NOLOCK)
                INNER JOIN N_Producer WITH(NOLOCK) ON (N_Producer.Id = N_Item.Producer_code)
            WHERE
                N_Item.Comp_Id = '001' AND
                N_Item.Id = 'BOSCH F 026 C00 467'
            ORDER BY N_Item.Id

Successfully disconnected from the database!
# [27-Aug-2025 10:09:40] /elitcar/www/bg/groups/39849642.html 108.61.209.243

set names utf8

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 39849642
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`
# [27-Aug-2025 10:09:40] /elitcar/www/bg/groups/39849642.html 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

SELECT
                *
            FROM
                `elitcar_store`.`history_autokelly`
            WHERE
                `MonetaUser` = 'lubo' AND
                `NodeID` = 39850140 AND
                `Language` = 'bg'
            ORDER BY
                PostDate DESC
            LIMIT 30

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 51224611
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38979037
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38979167
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38957081
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38957087
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 40064029
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38957089
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38908614
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 40064028
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT * FROM `elitcar_store`.`history_autos` WHERE `MonetaUser` = 'lubo' AND `Language` = 'bg' ORDER BY PostDate DESC LIMIT 30

SELECT * FROM `elitcar_store`.`history_vin` WHERE `MonetaUser` = 'lubo' ORDER BY PostDate DESC LIMIT 30

Successfully disconnected from the database!
# [27-Aug-2025 10:09:42] /elitcar/www/bg/ajax/history/parts.html?_=1756278582431 108.61.209.243
# [27-Aug-2025 10:09:42] /elitcar/www/bg/ajax/users/bar.html?_=1756278582480 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'
# [27-Aug-2025 10:09:42] /elitcar/www/bg/ajax/users/bar.html?_=1756278582480 108.61.209.243

set names utf8

SELECT `Qty` FROM `elitcar_store`.`basket` WHERE `UserName` = 'lubo' AND `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' LIMIT 1

SELECT COUNT(*) FROM `elitcar_store`.`offers` WHERE `UserID` = 'E0B87CBDAA694AC480BCD81D96D4ABBB' AND `Status` = 0

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

Successfully disconnected from the database!
# [27-Aug-2025 10:09:42] /elitcar/www/bg/ajax/history/parts.html?_=1756278582431 108.61.209.243

set names utf8

SELECT * FROM `elitcar_store`.`history_parts` WHERE `MonetaUser` = 'lubo' AND `Language` = 'bg' ORDER BY PostDate DESC LIMIT 30

Successfully disconnected from the database!
# [27-Aug-2025 10:09:42] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1756278583188 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

Successfully disconnected from the database!
# [27-Aug-2025 10:14:43] /elitcar/www/bg/ajax/history/parts.html?_=1756278883384 108.61.209.243
# [27-Aug-2025 10:14:43] /elitcar/www/bg/ajax/users/bar.html?_=1756278883452 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'
# [27-Aug-2025 10:14:43] /elitcar/www/bg/ajax/history/parts.html?_=1756278883384 108.61.209.243

set names utf8

SELECT * FROM `elitcar_store`.`history_parts` WHERE `MonetaUser` = 'lubo' AND `Language` = 'bg' ORDER BY PostDate DESC LIMIT 30

Successfully disconnected from the database!
# [27-Aug-2025 10:14:43] /elitcar/www/bg/ajax/users/bar.html?_=1756278883452 108.61.209.243

set names utf8

SELECT `Qty` FROM `elitcar_store`.`basket` WHERE `UserName` = 'lubo' AND `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' LIMIT 1

SELECT COUNT(*) FROM `elitcar_store`.`offers` WHERE `UserID` = 'E0B87CBDAA694AC480BCD81D96D4ABBB' AND `Status` = 0

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

Successfully disconnected from the database!
# [27-Aug-2025 10:14:43] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1756278884131 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

Successfully disconnected from the database!
# [27-Aug-2025 10:16:54] /elitcar/www/bg/uni/bg/activities/list.html 108.61.209.243

SELECT
                        [N_ContragentEShopSettings].[ID],
                        [N_ContragentEShopSettings].[UserName],
                        [N_ContragentEShopSettings].[Password],
                        [N_ContragentEShopSettings].[Name],
                        [N_ContragentEShopSettings].[OELogin],
                        [N_ContragentEShopSettings].[_User_Id],
                        [N_ContragentEShopSettings].[Contragent_Id],
                        [N_ContragentEShopSettings].[ServiceBG_Id],
                        [N_ContragentEShopSettings].[Blocked],
                        [N_ContragentEShopSettings].[BlockOrders],
                        [N_ContragentEShopSettings].[_Comp_type],
                        [N_Contragent].[Comp_Id],
                        [N_Contragent].[_Route],
                        [N_Contragent].[Name2] AS ContragentName,
                        [N_Contragent].[Address] AS ContragentAddress,
                        [N_Contragent].[BULSTAT] AS ContragentBulstat,
                        [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                        [N_Contragent].[Contact] AS ContragentContact,
                        [N_Businessgroup].[IpAddressBG],
                        [N_Contragent].[PricesIncludingVAT],
                        [N_Contragent].[VATBus_PostingGroup] AS VAT,
                        [N_Contragent].[Currency_Id]
                    FROM
                        [N_ContragentEShopSettings]
                        INNER JOIN [N_Contragent] ON [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                        LEFT JOIN [N_Businessgroup] ON
                            [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                            [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                    WHERE
                        [N_ContragentEShopSettings].[UserName] = 'web0rder' AND
                        [N_ContragentEShopSettings].[Password] = 'web0rder'

Successfully disconnected from the database!
# [27-Aug-2025 10:16:56] /elitcar/www/bg/ajax/history/parts.html?_=1756279014360 108.61.209.243
# [27-Aug-2025 10:16:56] /elitcar/www/bg/ajax/users/bar.html?_=1756279014370 108.61.209.243

SELECT
                        [N_ContragentEShopSettings].[ID],
                        [N_ContragentEShopSettings].[UserName],
                        [N_ContragentEShopSettings].[Password],
                        [N_ContragentEShopSettings].[Name],
                        [N_ContragentEShopSettings].[OELogin],
                        [N_ContragentEShopSettings].[_User_Id],
                        [N_ContragentEShopSettings].[Contragent_Id],
                        [N_ContragentEShopSettings].[ServiceBG_Id],
                        [N_ContragentEShopSettings].[Blocked],
                        [N_ContragentEShopSettings].[BlockOrders],
                        [N_ContragentEShopSettings].[_Comp_type],
                        [N_Contragent].[Comp_Id],
                        [N_Contragent].[_Route],
                        [N_Contragent].[Name2] AS ContragentName,
                        [N_Contragent].[Address] AS ContragentAddress,
                        [N_Contragent].[BULSTAT] AS ContragentBulstat,
                        [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                        [N_Contragent].[Contact] AS ContragentContact,
                        [N_Businessgroup].[IpAddressBG],
                        [N_Contragent].[PricesIncludingVAT],
                        [N_Contragent].[VATBus_PostingGroup] AS VAT,
                        [N_Contragent].[Currency_Id]
                    FROM
                        [N_ContragentEShopSettings]
                        INNER JOIN [N_Contragent] ON [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                        LEFT JOIN [N_Businessgroup] ON
                            [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                            [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                    WHERE
                        [N_ContragentEShopSettings].[UserName] = 'web0rder' AND
                        [N_ContragentEShopSettings].[Password] = 'web0rder'

SELECT
                        [N_ContragentEShopSettings].[ID],
                        [N_ContragentEShopSettings].[UserName],
                        [N_ContragentEShopSettings].[Password],
                        [N_ContragentEShopSettings].[Name],
                        [N_ContragentEShopSettings].[OELogin],
                        [N_ContragentEShopSettings].[_User_Id],
                        [N_ContragentEShopSettings].[Contragent_Id],
                        [N_ContragentEShopSettings].[ServiceBG_Id],
                        [N_ContragentEShopSettings].[Blocked],
                        [N_ContragentEShopSettings].[BlockOrders],
                        [N_ContragentEShopSettings].[_Comp_type],
                        [N_Contragent].[Comp_Id],
                        [N_Contragent].[_Route],
                        [N_Contragent].[Name2] AS ContragentName,
                        [N_Contragent].[Address] AS ContragentAddress,
                        [N_Contragent].[BULSTAT] AS ContragentBulstat,
                        [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                        [N_Contragent].[Contact] AS ContragentContact,
                        [N_Businessgroup].[IpAddressBG],
                        [N_Contragent].[PricesIncludingVAT],
                        [N_Contragent].[VATBus_PostingGroup] AS VAT,
                        [N_Contragent].[Currency_Id]
                    FROM
                        [N_ContragentEShopSettings]
                        INNER JOIN [N_Contragent] ON [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                        LEFT JOIN [N_Businessgroup] ON
                            [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                            [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                    WHERE
                        [N_ContragentEShopSettings].[UserName] = 'web0rder' AND
                        [N_ContragentEShopSettings].[Password] = 'web0rder'

Successfully disconnected from the database!

Successfully disconnected from the database!
# [27-Aug-2025 10:21:42] /elitcar/www/bg/uni/bg/autopark/list.html 108.61.209.243

SELECT
                        [N_ContragentEShopSettings].[ID],
                        [N_ContragentEShopSettings].[UserName],
                        [N_ContragentEShopSettings].[Password],
                        [N_ContragentEShopSettings].[Name],
                        [N_ContragentEShopSettings].[OELogin],
                        [N_ContragentEShopSettings].[_User_Id],
                        [N_ContragentEShopSettings].[Contragent_Id],
                        [N_ContragentEShopSettings].[ServiceBG_Id],
                        [N_ContragentEShopSettings].[Blocked],
                        [N_ContragentEShopSettings].[BlockOrders],
                        [N_ContragentEShopSettings].[_Comp_type],
                        [N_Contragent].[Comp_Id],
                        [N_Contragent].[_Route],
                        [N_Contragent].[Name2] AS ContragentName,
                        [N_Contragent].[Address] AS ContragentAddress,
                        [N_Contragent].[BULSTAT] AS ContragentBulstat,
                        [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                        [N_Contragent].[Contact] AS ContragentContact,
                        [N_Businessgroup].[IpAddressBG],
                        [N_Contragent].[PricesIncludingVAT],
                        [N_Contragent].[VATBus_PostingGroup] AS VAT,
                        [N_Contragent].[Currency_Id]
                    FROM
                        [N_ContragentEShopSettings]
                        INNER JOIN [N_Contragent] ON [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                        LEFT JOIN [N_Businessgroup] ON
                            [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                            [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                    WHERE
                        [N_ContragentEShopSettings].[UserName] = 'web0rder' AND
                        [N_ContragentEShopSettings].[Password] = 'web0rder'

Successfully disconnected from the database!
# [27-Aug-2025 10:21:44] /elitcar/www/bg/ajax/history/parts.html?_=1756279302144 108.61.209.243
# [27-Aug-2025 10:21:44] /elitcar/www/bg/ajax/users/bar.html?_=1756279302154 108.61.209.243

SELECT
                        [N_ContragentEShopSettings].[ID],
                        [N_ContragentEShopSettings].[UserName],
                        [N_ContragentEShopSettings].[Password],
                        [N_ContragentEShopSettings].[Name],
                        [N_ContragentEShopSettings].[OELogin],
                        [N_ContragentEShopSettings].[_User_Id],
                        [N_ContragentEShopSettings].[Contragent_Id],
                        [N_ContragentEShopSettings].[ServiceBG_Id],
                        [N_ContragentEShopSettings].[Blocked],
                        [N_ContragentEShopSettings].[BlockOrders],
                        [N_ContragentEShopSettings].[_Comp_type],
                        [N_Contragent].[Comp_Id],
                        [N_Contragent].[_Route],
                        [N_Contragent].[Name2] AS ContragentName,
                        [N_Contragent].[Address] AS ContragentAddress,
                        [N_Contragent].[BULSTAT] AS ContragentBulstat,
                        [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                        [N_Contragent].[Contact] AS ContragentContact,
                        [N_Businessgroup].[IpAddressBG],
                        [N_Contragent].[PricesIncludingVAT],
                        [N_Contragent].[VATBus_PostingGroup] AS VAT,
                        [N_Contragent].[Currency_Id]
                    FROM
                        [N_ContragentEShopSettings]
                        INNER JOIN [N_Contragent] ON [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                        LEFT JOIN [N_Businessgroup] ON
                            [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                            [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                    WHERE
                        [N_ContragentEShopSettings].[UserName] = 'web0rder' AND
                        [N_ContragentEShopSettings].[Password] = 'web0rder'

SELECT
                        [N_ContragentEShopSettings].[ID],
                        [N_ContragentEShopSettings].[UserName],
                        [N_ContragentEShopSettings].[Password],
                        [N_ContragentEShopSettings].[Name],
                        [N_ContragentEShopSettings].[OELogin],
                        [N_ContragentEShopSettings].[_User_Id],
                        [N_ContragentEShopSettings].[Contragent_Id],
                        [N_ContragentEShopSettings].[ServiceBG_Id],
                        [N_ContragentEShopSettings].[Blocked],
                        [N_ContragentEShopSettings].[BlockOrders],
                        [N_ContragentEShopSettings].[_Comp_type],
                        [N_Contragent].[Comp_Id],
                        [N_Contragent].[_Route],
                        [N_Contragent].[Name2] AS ContragentName,
                        [N_Contragent].[Address] AS ContragentAddress,
                        [N_Contragent].[BULSTAT] AS ContragentBulstat,
                        [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                        [N_Contragent].[Contact] AS ContragentContact,
                        [N_Businessgroup].[IpAddressBG],
                        [N_Contragent].[PricesIncludingVAT],
                        [N_Contragent].[VATBus_PostingGroup] AS VAT,
                        [N_Contragent].[Currency_Id]
                    FROM
                        [N_ContragentEShopSettings]
                        INNER JOIN [N_Contragent] ON [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                        LEFT JOIN [N_Businessgroup] ON
                            [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                            [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                    WHERE
                        [N_ContragentEShopSettings].[UserName] = 'web0rder' AND
                        [N_ContragentEShopSettings].[Password] = 'web0rder'

Successfully disconnected from the database!

Successfully disconnected from the database!
# [27-Aug-2025 10:29:50] /elitcar/www/bg/groups/39849642.html 108.61.209.243

set names utf8

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 39849642
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`
# [27-Aug-2025 10:29:50] /elitcar/www/bg/groups/39849642.html 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

SELECT
                *
            FROM
                `elitcar_store`.`history_autokelly`
            WHERE
                `MonetaUser` = 'lubo' AND
                `NodeID` = 39850140 AND
                `Language` = 'bg'
            ORDER BY
                PostDate DESC
            LIMIT 30

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 51224611
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38979037
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38979167
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38957081
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38957087
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 40064029
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38957089
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38908614
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 40064028
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT * FROM `elitcar_store`.`history_autos` WHERE `MonetaUser` = 'lubo' AND `Language` = 'bg' ORDER BY PostDate DESC LIMIT 30

SELECT * FROM `elitcar_store`.`history_vin` WHERE `MonetaUser` = 'lubo' ORDER BY PostDate DESC LIMIT 30

Successfully disconnected from the database!
# [27-Aug-2025 10:29:50] /elitcar/www/bg/ajax/history/parts.html?_=1756279791045 108.61.209.243
# [27-Aug-2025 10:29:50] /elitcar/www/bg/ajax/users/bar.html?_=1756279791123 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'
# [27-Aug-2025 10:29:51] /elitcar/www/bg/ajax/history/parts.html?_=1756279791045 108.61.209.243

set names utf8

SELECT * FROM `elitcar_store`.`history_parts` WHERE `MonetaUser` = 'lubo' AND `Language` = 'bg' ORDER BY PostDate DESC LIMIT 30

Successfully disconnected from the database!
# [27-Aug-2025 10:29:51] /elitcar/www/bg/ajax/users/bar.html?_=1756279791123 108.61.209.243

set names utf8

SELECT `Qty` FROM `elitcar_store`.`basket` WHERE `UserName` = 'lubo' AND `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' LIMIT 1

SELECT COUNT(*) FROM `elitcar_store`.`offers` WHERE `UserID` = 'E0B87CBDAA694AC480BCD81D96D4ABBB' AND `Status` = 0

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

Successfully disconnected from the database!
# [27-Aug-2025 10:29:51] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1756279792159 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

Successfully disconnected from the database!
# [27-Aug-2025 10:52:25] /elitcar/www/bg/groups/39849642.html 108.61.209.243

set names utf8

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 39849642
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`
# [27-Aug-2025 10:52:25] /elitcar/www/bg/groups/39849642.html 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

SELECT
                *
            FROM
                `elitcar_store`.`history_autokelly`
            WHERE
                `MonetaUser` = 'lubo' AND
                `NodeID` = 39850140 AND
                `Language` = 'bg'
            ORDER BY
                PostDate DESC
            LIMIT 30

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 51224611
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38979037
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38979167
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38957081
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38957087
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 40064029
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38957089
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 38908614
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT
                `autokelly`.`catalog`.`Id`,
                `autokelly`.`catalog`.`Type`,
                `autokelly`.`catalog`.`TecDocId`,
                `autokelly`.`structure`.`ParentId`,
                `autokelly`.`catalogname`.`CatalogNameConversionId`,
                `autokelly`.`catalogname`.`BG` AS `NodeName`,
                `autokelly`.`catalogimages`.*,
                IF(`autokelly`.`catalogvisible`.`Unvisible` IS NULL, 1, 0) AS `Visible`,
                IF(`S`.`ParentId` IS NULL, 0, 1) AS `ChildNodes`
            FROM
                `autokelly`.`structure`
                INNER JOIN `autokelly`.`catalognameconversion` ON `autokelly`.`catalognameconversion`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                INNER JOIN `autokelly`.`catalogname` ON `autokelly`.`catalogname`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id`
                INNER JOIN `autokelly`.`catalog` ON `autokelly`.`catalog`.`Id` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogimages` ON `autokelly`.`catalogimages`.`CatalogId` = `autokelly`.`structure`.`CatalogId`
                LEFT JOIN `autokelly`.`catalogvisible` ON
                    `autokelly`.`catalogvisible`.`CatalogNameConversionId` = `autokelly`.`catalognameconversion`.`Id` AND
                    `autokelly`.`catalogvisible`.`ParentId` = `autokelly`.`structure`.`ParentId`
                LEFT JOIN `autokelly`.`structure` AS `S` ON `S`.`ParentId` = `autokelly`.`catalog`.`Id`
            WHERE
                `autokelly`.`structure`.`ParentId` = 40064028
        
            GROUP BY
                `autokelly`.`catalog`.`Id`
            ORDER BY
                `autokelly`.`catalogimages`.`FileName` DESC,
                `autokelly`.`structure`.`Order`,
                `autokelly`.`catalogname`.`BG`

SELECT * FROM `elitcar_store`.`history_autos` WHERE `MonetaUser` = 'lubo' AND `Language` = 'bg' ORDER BY PostDate DESC LIMIT 30

SELECT * FROM `elitcar_store`.`history_vin` WHERE `MonetaUser` = 'lubo' ORDER BY PostDate DESC LIMIT 30

Successfully disconnected from the database!
# [27-Aug-2025 10:52:26] /elitcar/www/bg/ajax/history/parts.html?_=1756281146508 108.61.209.243
# [27-Aug-2025 10:52:26] /elitcar/www/bg/ajax/users/bar.html?_=1756281146621 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)

Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'
# [27-Aug-2025 10:52:26] /elitcar/www/bg/ajax/users/bar.html?_=1756281146621 108.61.209.243

set names utf8

SELECT `Qty` FROM `elitcar_store`.`basket` WHERE `UserName` = 'lubo' AND `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' LIMIT 1

SELECT COUNT(*) FROM `elitcar_store`.`offers` WHERE `UserID` = 'E0B87CBDAA694AC480BCD81D96D4ABBB' AND `Status` = 0

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

Successfully disconnected from the database!
# [27-Aug-2025 10:52:26] /elitcar/www/bg/ajax/history/parts.html?_=1756281146508 108.61.209.243

set names utf8

SELECT * FROM `elitcar_store`.`history_parts` WHERE `MonetaUser` = 'lubo' AND `Language` = 'bg' ORDER BY PostDate DESC LIMIT 30

Successfully disconnected from the database!
# [27-Aug-2025 10:52:27] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1756281147350 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

Successfully disconnected from the database!
# [27-Aug-2025 11:00:55] /elitcar/www/bg/ajax/history/parts.html?_=1756281655828 108.61.209.243
# [27-Aug-2025 11:00:55] /elitcar/www/bg/ajax/users/bar.html?_=1756281655885 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'
# [27-Aug-2025 11:00:56] /elitcar/www/bg/ajax/history/parts.html?_=1756281655828 108.61.209.243

set names utf8

SELECT * FROM `elitcar_store`.`history_parts` WHERE `MonetaUser` = 'lubo' AND `Language` = 'bg' ORDER BY PostDate DESC LIMIT 30

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'
# [27-Aug-2025 11:00:56] /elitcar/www/bg/ajax/users/bar.html?_=1756281655885 108.61.209.243

set names utf8

SELECT `Qty` FROM `elitcar_store`.`basket` WHERE `UserName` = 'lubo' AND `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' LIMIT 1

SELECT COUNT(*) FROM `elitcar_store`.`offers` WHERE `UserID` = 'E0B87CBDAA694AC480BCD81D96D4ABBB' AND `Status` = 0

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

Successfully disconnected from the database!
# [27-Aug-2025 11:00:56] /elitcar/www/admin/bg/ajax/groups/bar.html?_=1756281656794 108.61.209.243

SELECT
                                [N_ContragentEShopSettings].[ID],
                                [N_ContragentEShopSettings].[UserName],
                                [N_ContragentEShopSettings].[Password],
                                [N_ContragentEShopSettings].[Name],
                                [N_ContragentEShopSettings].[OELogin],
                                [N_ContragentEShopSettings].[_User_Id],
                                [N_ContragentEShopSettings].[Contragent_Id],
                                [N_ContragentEShopSettings].[ServiceBG_Id],
                                [N_ContragentEShopSettings].[Blocked],
                                [N_ContragentEShopSettings].[BlockOrders],
                                [N_ContragentEShopSettings].[_Comp_type],
                                [N_Contragent].[Comp_Id],
                                [N_DeliveryAddress].[Route_Id] AS _Route,
                                [N_Contragent].[Name2] AS ContragentName,
                                [N_Contragent].[Address] AS ContragentAddress,
                                [N_Contragent].[BULSTAT] AS ContragentBulstat,
                                [N_Contragent].[VATRegistrationNo] AS ContragentVAT,
                                [N_Contragent].[Contact] AS ContragentContact,
                                [N_Businessgroup].[IpAddressBG],
                                [N_Businessgroup].[FaxNo] AS ObjectPhone,
                                [N_Contragent].[VATBus_PostingGroup] AS VAT,
                                [N_Contragent].[Currency_Id],
                                [N_Contragent].CreditLimit_LCY AS Creditlimit,
                                [N_Contragent].PaymentTermsCode  AS PaymentTerms,
                                [N_Contragent].PaymentMethodCode  AS PaymentMethodCode,
                                COALESCE([N_DeliveryAddress]._TransportType, [N_Contragent].TransportType) AS TransportType,
                                -- [N_DeliveryAddress].Route_Id AS TransportType,
                                COALESCE([N_DeliveryAddress]._SubDocument_Code, [N_Contragent]._SaleDocSubType_EK) AS SaleDocSubType,
                                COALESCE([N_DeliveryAddress]._DefaultPrintForm, [N_Contragent]._DefaultPrintForm) AS DefaultPrintForm
                            FROM
                                [N_ContragentEShopSettings] WITH(NOLOCK)
                            INNER JOIN [N_Contragent] WITH(NOLOCK) ON
                                [N_Contragent].[Id] = [N_ContragentEShopSettings].[Contragent_Id]
                            LEFT JOIN [N_DeliveryAddress] WITH(NOLOCK) ON
                                [N_Contragent].[Comp_Id] = [N_DeliveryAddress].[Comp_Id] AND
                                [N_Contragent].[Id] = [N_DeliveryAddress].[Contragent_Id] AND
                                [N_ContragentEShopSettings].[ServiceBG_Id] = [N_DeliveryAddress].[ServiceBG_Id]
                            LEFT JOIN [N_Businessgroup] WITH(NOLOCK) ON
                                [N_Businessgroup].[Id] = [N_ContragentEShopSettings].[ServiceBG_Id] AND
                                [N_Businessgroup].[Comp_Id] = [N_ContragentEShopSettings].[Comp_Id]
                            WHERE
                                [N_ContragentEShopSettings].[ID] = 'E0B87CBDAA694AC480BCD81D96D4ABBB'

SELECT
                                    _User_Id,
                                    _ChangeBlockedCntr
                                FROM
                                    N_ContragentEShopSettings
                                    INNER JOIN N_Users ON N_Users.Id = N_ContragentEShopSettings._User_Id
                                WHERE
                                    N_ContragentEShopSettings._User_Id = :sUser_Id /*това ти е променливата, която прочиташ при логване*/
                                    AND  N_Users.Is_Active = 1
Array
(
    [:sUser_Id] => ЛЮБОМИР НАЧКОВ
)


SELECT * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2025-08-27', '00'

Successfully disconnected from the database!
