set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'FEBI 03345', 'МАРШРУТ  М2', null);

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gQ09SVEVDTyA0OTQ3MjAxM10%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gRkVCSSAwMzM0NV0%'
            LIMIT 1

Successfully disconnected from the database!
# [07-Apr-2026 17:13:22] /elitcar/www/bg/ajax/prices/W00gQVVUTyBLRUxMWSBYUyAwNDcxMDk2NzVBXQ.html?_=1775571201798 108.61.209.243

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gU1RBUkxJTkUgR0EgNjUwNl0%'
            LIMIT 1

Successfully disconnected from the database!

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 * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

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

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

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'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

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_EShopItemInfo_New('CORTECO 49472013', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('STARLINE GA 6511', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('CORTECO 12014584', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

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

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('CORTECO 49472013', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('STARLINE GA 6511', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('CORTECO 12014584', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'STARLINE GA 6511'
            GROUP BY fComp_Id,fItem_Id

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'CORTECO 49472013'
            GROUP BY fComp_Id,fItem_Id

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'CORTECO 12014584'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:13:23] /elitcar/www/bg/ajax/prices/W00gQ09SVEVDTyA0OTQ3MjAxM10.html?_=1775571201794 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'CORTECO 49472013', 'МАРШРУТ  М2', null);
# [07-Apr-2026 17:13:23] /elitcar/www/bg/ajax/prices/W00gU1RBUkxJTkUgR0EgNjUxMV0.html?_=1775571201797 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'STARLINE GA 6511', 'МАРШРУТ  М2', null);
# [07-Apr-2026 17:13:23] /elitcar/www/bg/ajax/prices/W00gQ09SVEVDTyAxMjAxNDU4NF0.html?_=1775571201796 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gQ09SVEVDTyAxMjAxNDU4NF0%'
            LIMIT 1

Successfully disconnected from the database!

SELECT * FROM  fn_EShopItemInfo_New('AUTO KELLY XS 047109675A', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gQ09SVEVDTyA0OTQ3MjAxM10%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gU1RBUkxJTkUgR0EgNjUxMV0%'
            LIMIT 1

Successfully disconnected from the database!

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('AUTO KELLY XS 047109675A', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'AUTO KELLY XS 047109675A'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:13:23] /elitcar/www/bg/ajax/prices/W00gQVVUTyBLRUxMWSBYUyAwNDcxMDk2NzVBXQ.html?_=1775571203060 108.61.209.243
# [07-Apr-2026 17:13:23] /elitcar/www/bg/ajax/prices/W00gUEVVR0VPVCAxNjA3NDI3MjgwXQ.html?_=1775571203061 108.61.209.243
# [07-Apr-2026 17:13:23] /elitcar/www/bg/ajax/prices/W00gQUpVU0EgMTIwMDA3MDBd.html?_=1775571203061 108.61.209.243
# [07-Apr-2026 17:13:23] /elitcar/www/bg/ajax/prices/W00gQVVUTyBLRUxMWSBYUyAwNDcxMDk2NzVBXQ.html?_=1775571201798 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'AUTO KELLY XS 047109675A', 'МАРШРУТ  М2', null);

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gQVVUTyBLRUxMWSBYUyAwNDcxMDk2NzVBXQ%'
            LIMIT 1

Successfully disconnected from the database!

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 * 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, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

SELECT * FROM  fn_EShopItemInfo_New('PEUGEOT 1607427280', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('AUTO KELLY XS 047109675A', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('AJUSA 12000700', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('AUTO KELLY XS 047109675A', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('AJUSA 12000700', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('PEUGEOT 1607427280', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'AJUSA 12000700'
            GROUP BY fComp_Id,fItem_Id

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'AUTO KELLY XS 047109675A'
            GROUP BY fComp_Id,fItem_Id

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'PEUGEOT 1607427280'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:13:24] /elitcar/www/bg/ajax/prices/W00gQVVUTyBLRUxMWSBYUyAwNDcxMDk2NzVBXQ.html?_=1775571203060 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC
# [07-Apr-2026 17:13:24] /elitcar/www/bg/ajax/prices/W00gUEVVR0VPVCAxNjA3NDI3MjgwXQ.html?_=1775571203061 108.61.209.243
# [07-Apr-2026 17:13:24] /elitcar/www/bg/ajax/prices/W00gQUpVU0EgMTIwMDA3MDBd.html?_=1775571203061 108.61.209.243

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'AUTO KELLY XS 047109675A', 'МАРШРУТ  М2', null);

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gQUpVU0EgMTIwMDA3MDBd%'
            LIMIT 1

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'PEUGEOT 1607427280', 'МАРШРУТ  М2', null);

Successfully disconnected from the database!
# [07-Apr-2026 17:13:24] /elitcar/www/bg/ajax/prices/W00gUEVVR0VPVCAxNjA3NDI3MjgwXQ.html?_=1775571204177 108.61.209.243
# [07-Apr-2026 17:13:24] /elitcar/www/bg/ajax/prices/W00gR09FVFpFIDUwLTMwNjY3MC01MF0.html?_=1775571204178 108.61.209.243
# [07-Apr-2026 17:13:24] /elitcar/www/bg/ajax/prices/W00gUEFZRU4gSFI1Njld.html?_=1775571204178 108.61.209.243
# [07-Apr-2026 17:13:24] /elitcar/www/bg/ajax/prices/W00gUEFZRU4gSFI2MTVd.html?_=1775571204180 108.61.209.243

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gQVVUTyBLRUxMWSBYUyAwNDcxMDk2NzVBXQ%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gUEVVR0VPVCAxNjA3NDI3MjgwXQ%'
            LIMIT 1

Successfully disconnected from the database!

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 * 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, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

SELECT * FROM  fn_EShopItemInfo_New('GOETZE 50-306670-50', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('PEUGEOT 1607427280', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('PAYEN HR569', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('PAYEN HR615', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('PEUGEOT 1607427280', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('PAYEN HR569', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('GOETZE 50-306670-50', 'EE1D040DB23B48A6B8712B899CBA8660', '00')
# [07-Apr-2026 17:13:25] /elitcar/www/bg/ajax/prices/W00gR09FVFpFIDUwLTMwNjY3MC01MF0.html?_=1775571205127 108.61.209.243
# [07-Apr-2026 17:13:25] /elitcar/www/bg/ajax/prices/W00gUEFZRU4gSFI1Njld.html?_=1775571205129 108.61.209.243

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'PEUGEOT 1607427280'
            GROUP BY fComp_Id,fItem_Id

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'PAYEN HR569'
            GROUP BY fComp_Id,fItem_Id

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('PAYEN HR615', 'EE1D040DB23B48A6B8712B899CBA8660', '00')
# [07-Apr-2026 17:13:25] /elitcar/www/bg/ajax/prices/W00gUEVVR0VPVCAxNjA3NDI3MjgwXQ.html?_=1775571204177 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC
# [07-Apr-2026 17:13:25] /elitcar/www/bg/ajax/prices/W00gUEFZRU4gSFI1Njld.html?_=1775571204178 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'PEUGEOT 1607427280', 'МАРШРУТ  М2', null);

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gUEFZRU4gSFI1Njld%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'GOETZE 50-306670-50'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:13:25] /elitcar/www/bg/ajax/prices/W00gUEFZRU4gSFI2MTVd.html?_=1775571205131 108.61.209.243
# [07-Apr-2026 17:13:25] /elitcar/www/bg/ajax/prices/W00gR09FVFpFIDUwLTMwNjY3MC01MF0.html?_=1775571204178 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gR09FVFpFIDUwLTMwNjY3MC01MF0%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'PAYEN HR615'
            GROUP BY fComp_Id,fItem_Id

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gUEVVR0VPVCAxNjA3NDI3MjgwXQ%'
            LIMIT 1

Successfully disconnected from the database!
# [07-Apr-2026 17:13:25] /elitcar/www/bg/ajax/prices/W00gUEFZRU4gSFI4MDVd.html?_=1775571205132 108.61.209.243
# [07-Apr-2026 17:13:25] /elitcar/www/bg/ajax/prices/W00gUEFZRU4gSFI2MTVd.html?_=1775571204180 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gUEFZRU4gSFI2MTVd%'
            LIMIT 1

Successfully disconnected from the database!
# [07-Apr-2026 17:13:25] /elitcar/www/bg/ajax/prices/W00gRFQgMTEuMTA1NzBd.html?_=1775571205132 108.61.209.243
# [07-Apr-2026 17:13:25] /elitcar/www/bg/ajax/prices/W00gQ09SVEVDTyAxMjAxNjg1MF0.html?_=1775571205133 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
                                [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 * FROM fn_GetNextRouteForClient('001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', 0)

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
                                [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)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

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, '2026-04-07', '00'

SELECT * FROM  fn_EShopItemInfo_New('PAYEN HR569', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

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

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

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

SELECT * FROM  fn_EShopItemInfo_New('GOETZE 50-306670-50', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('PAYEN HR569', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT * FROM  fn_EShopItemInfo_New('PAYEN HR615', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('GOETZE 50-306670-50', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'PAYEN HR569'
            GROUP BY fComp_Id,fItem_Id

SELECT * FROM  fn_EShopItemInfo_New('PAYEN HR805', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'
# [07-Apr-2026 17:13:26] /elitcar/www/bg/ajax/prices/W00gUEFZRU4gSFI1Njld.html?_=1775571205129 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gUEFZRU4gSFI1Njld%'
            LIMIT 1

Successfully disconnected from the database!

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('PAYEN HR615', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT * FROM  fn_EShopItemInfo_New('DT 11.10570', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');
# [07-Apr-2026 17:13:26] /elitcar/www/bg/ajax/prices/W00gQUpVU0EgNTcwMDUwMDBd.html?_=1775571205134 108.61.209.243

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'GOETZE 50-306670-50'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:13:26] /elitcar/www/bg/ajax/prices/W00gR09FVFpFIDUwLTMwNjY3MC01MF0.html?_=1775571205127 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gR09FVFpFIDUwLTMwNjY3MC01MF0%'
            LIMIT 1

SELECT * FROM  fn_EShopItemInfo_New('CORTECO 12016850', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

Successfully disconnected from the database!

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('PAYEN HR805', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'PAYEN HR615'
            GROUP BY fComp_Id,fItem_Id

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('DT 11.10570', 'EE1D040DB23B48A6B8712B899CBA8660', '00')
# [07-Apr-2026 17:13:26] /elitcar/www/bg/ajax/prices/W00gUEFZRU4gSFI2MTVd.html?_=1775571205131 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gUEFZRU4gSFI2MTVd%'
            LIMIT 1

Successfully disconnected from the database!

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('CORTECO 12016850', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'PAYEN HR805'
            GROUP BY fComp_Id,fItem_Id

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'DT 11.10570'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:13:26] /elitcar/www/bg/ajax/prices/W00gUEFZRU4gSFI4MDVd.html?_=1775571205132 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gUEFZRU4gSFI4MDVd%'
            LIMIT 1

Successfully disconnected from the database!
# [07-Apr-2026 17:13:26] /elitcar/www/bg/ajax/prices/W00gRFQgMTEuMTA1NzBd.html?_=1775571205132 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gRFQgMTEuMTA1NzBd%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'CORTECO 12016850'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:13:26] /elitcar/www/bg/ajax/prices/W00gQ09SVEVDTyAxMjAxNjg1MF0.html?_=1775571205133 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gQ09SVEVDTyAxMjAxNjg1MF0%'
            LIMIT 1

Successfully disconnected from the database!

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, '2026-04-07', '00'

SELECT * FROM  fn_EShopItemInfo_New('AJUSA 57005000', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('AJUSA 57005000', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'AJUSA 57005000'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:13:27] /elitcar/www/bg/ajax/prices/W00gQUpVU0EgNTcwMDUwMDBd.html?_=1775571205134 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gQUpVU0EgNTcwMDUwMDBd%'
            LIMIT 1

Successfully disconnected from the database!
# [07-Apr-2026 17:28:37] /elitcar/www/bg/ajax/tecdoc/criteria/WzE0MF1bNDk0NzIwMTNd.html?_=1775572116883 108.61.209.243

set names utf8

SELECT
                `BrandID`,
                `Gallery`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `BrandID` = 140 AND
                `SearchNumber` = '49472013'
            LIMIT 1
# [07-Apr-2026 17:28:57] /elitcar/www/bg/ajax/substitutes/WzE0MF1bNDk0NzIwMTNd.html?_=1775572137064 108.61.209.243

set names utf8

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '23467tf' AND `ProducerId` = 317

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '420468' AND `ProducerId` = 355

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

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '1110570' AND `ProducerId` = 355

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

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '553190' AND `ProducerId` = 10

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

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '294110' AND `ProducerId` = 10

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

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '1656040' AND `ProducerId` = 237

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '03345' AND `ProducerId` = 101

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

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '28u8003jpn' AND `ProducerId` = 6985

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '30002' AND `ProducerId` = 331

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '4s021v' AND `ProducerId` = 4936

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '30340001' AND `ProducerId` = 151

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'SWAG 30 34 0001'
            LIMIT 1

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '100207' AND `ProducerId` = 301

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '100254' AND `ProducerId` = 301

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg2313523' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg1191852' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg2134435' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg1004626' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg2134504' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg2293193' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg1092239' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg2293068' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg2293069' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg2293072' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg2134433' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg1223307' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg2134434' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg2134452' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg2308257' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg1103709' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg1087866' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg1087868' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg1092228' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg1450653' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = 'wg2308258' AND `ProducerId` = 4832

SELECT `MonetaId` FROM `elitcar_store`.`moneta` WHERE `FullSearchTecDocId` = '49472013' AND `ProducerId` = 140

SELECT `ProductId` FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'CORTECO 49472013' LIMIT 1

SELECT * FROM `elitcar_store`.`moneta` WHERE `MonetaId` = 'CORTECO 49472013' LIMIT 1

SELECT
                *
            FROM
                `elitcar_store`.`moneta`
            WHERE
                `ReusableGroupId` = 'B975FCE6DA3249339C216FDFA6DB75F7' AND
                `QtyAll` > 0
            ORDER BY
                `Sales`  DESC,
                `Qty`  DESC,
                `QtyAll`  DESC

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'REINZ 70-25837-00'
            LIMIT 1

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'REINZ 12-25837-01'
            LIMIT 1

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'REINZ 70-22737-00'
            LIMIT 1

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

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'STARLINE GA 6506'
            LIMIT 1

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

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

SELECT
                `BrandID`,
                `Gallery`,
                `Title`,
                `Content`
            FROM
                `elitcar_store`.`products`
            WHERE
                `MonetaID` = 'PEUGEOT 1607427280'
            LIMIT 1
# [07-Apr-2026 17:28:58] /elitcar/www/bg/ajax/moneta/sort.html?_=1775572138296 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, '2026-04-07', '00'
# [07-Apr-2026 17:28:59] /elitcar/www/bg/ajax/moneta/sort.html?_=1775572138296 108.61.209.243

set names utf8

SELECT
                `elitcar_store`.`moneta`.`MonetaId`,
                `elitcar_store`.`moneta`.`Sales`,
                `elitcar_store`.`moneta`.`Qty`,
                `elitcar_store`.`moneta`.`QtyAll`,
                `elitcar_store`.`moneta`.`FullSearchTecDocId`
            FROM
                `elitcar_store`.`moneta`
                LEFT JOIN `elitcar_store`.`availabilities` ON `elitcar_store`.`moneta`.`MonetaId` = `elitcar_store`.`availabilities`.`MonetaId` AND `elitcar_store`.`availabilities`.`BusinessGroupID` = '00'
            WHERE
                `elitcar_store`.`moneta`.`MonetaId` IN('DT 4.20468','DT 11.10570','ELRING 553.190','ELRING 294.110','FEBI 03345','SWAG 30 34 0001','ELRING 553.190','REINZ 70-25837-00','REINZ 12-25837-01','REINZ 70-22737-00','DPH 45720','DPH 1272960','STARLINE GA 6506','FEBI 03345','CORTECO 12014584','PEUGEOT 1607427280')
            ORDER BY
                `elitcar_store`.`availabilities`.`Qty` DESC,
                `elitcar_store`.`moneta`.`Qty` DESC,
                `elitcar_store`.`moneta`.`QtyAll` DESC,
                `elitcar_store`.`moneta`.`Sales` DESC

Successfully disconnected from the database!
# [07-Apr-2026 17:28:59] /elitcar/www/bg/ajax/prices/W00gRUxSSU5HIDU1My4xOTBd.html?_=1775572139180 108.61.209.243
# [07-Apr-2026 17:28:59] /elitcar/www/bg/ajax/prices/W00gUkVJTlogNzAtMjU4MzctMDBd.html?_=1775572139183 108.61.209.243
# [07-Apr-2026 17:28:59] /elitcar/www/bg/ajax/prices/W00gUkVJTlogMTItMjU4MzctMDFd.html?_=1775572139184 108.61.209.243
# [07-Apr-2026 17:28:59] /elitcar/www/bg/ajax/prices/W00gRFBIIDQ1NzIwXQ.html?_=1775572139182 108.61.209.243
# [07-Apr-2026 17:28:59] /elitcar/www/bg/ajax/prices/W00gUkVJTlogNzAtMjI3MzctMDBd.html?_=1775572139183 108.61.209.243
# [07-Apr-2026 17:28:59] /elitcar/www/bg/ajax/prices/W00gRFBIIDEyNzI5NjBd.html?_=1775572139185 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
                                [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 * 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
                                    _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)

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

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

SELECT * FROM  fn_EShopItemInfo_New('ELRING 553.190', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('ELRING 553.190', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT * FROM  fn_EShopItemInfo_New('DPH 45720', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('REINZ 70-22737-00', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('REINZ 12-25837-01', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('REINZ 70-25837-00', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('DPH 1272960', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'ELRING 553.190'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:29:00] /elitcar/www/bg/ajax/prices/W00gRUxSSU5HIDU1My4xOTBd.html?_=1775572139180 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'ELRING 553.190', 'МАРШРУТ  М2', null);

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('DPH 45720', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('REINZ 12-25837-01', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('REINZ 70-22737-00', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('REINZ 70-25837-00', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('DPH 1272960', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gRUxSSU5HIDU1My4xOTBd%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'DPH 45720'
            GROUP BY fComp_Id,fItem_Id

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'REINZ 12-25837-01'
            GROUP BY fComp_Id,fItem_Id

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'REINZ 70-22737-00'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:29:00] /elitcar/www/bg/ajax/prices/W00gU1RBUkxJTkUgR0EgNjUwNl0.html?_=1775572139185 108.61.209.243
# [07-Apr-2026 17:29:00] /elitcar/www/bg/ajax/prices/W00gRFBIIDQ1NzIwXQ.html?_=1775572139182 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC
# [07-Apr-2026 17:29:00] /elitcar/www/bg/ajax/prices/W00gUkVJTlogNzAtMjI3MzctMDBd.html?_=1775572139183 108.61.209.243

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'DPH 45720', 'МАРШРУТ  М2', null);
# [07-Apr-2026 17:29:00] /elitcar/www/bg/ajax/prices/W00gUkVJTlogMTItMjU4MzctMDFd.html?_=1775572139184 108.61.209.243

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'REINZ 70-25837-00'
            GROUP BY fComp_Id,fItem_Id

set names utf8

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'REINZ 70-22737-00', 'МАРШРУТ  М2', null);

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'REINZ 12-25837-01', 'МАРШРУТ  М2', null);

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'DPH 1272960'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:29:00] /elitcar/www/bg/ajax/prices/W00gUkVJTlogNzAtMjU4MzctMDBd.html?_=1775572139183 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'REINZ 70-25837-00', 'МАРШРУТ  М2', null);

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gRFBIIDQ1NzIwXQ%'
            LIMIT 1

Successfully disconnected from the database!
# [07-Apr-2026 17:29:00] /elitcar/www/bg/ajax/prices/W00gRFBIIDEyNzI5NjBd.html?_=1775572139185 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'DPH 1272960', 'МАРШРУТ  М2', null);

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gUkVJTlogNzAtMjI3MzctMDBd%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gUkVJTlogMTItMjU4MzctMDFd%'
            LIMIT 1

Successfully disconnected from the database!
# [07-Apr-2026 17:29:00] /elitcar/www/bg/ajax/prices/W00gRkVCSSAwMzM0NV0.html?_=1775572139186 108.61.209.243

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gUkVJTlogNzAtMjU4MzctMDBd%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gRFBIIDEyNzI5NjBd%'
            LIMIT 1

Successfully disconnected from the database!

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
                                [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 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, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

SELECT * FROM  fn_EShopItemInfo_New('STARLINE GA 6506', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('FEBI 03345', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('STARLINE GA 6506', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('FEBI 03345', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'STARLINE GA 6506'
            GROUP BY fComp_Id,fItem_Id

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'FEBI 03345'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:29:01] /elitcar/www/bg/ajax/prices/W00gU1RBUkxJTkUgR0EgNjUwNl0.html?_=1775572139185 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'STARLINE GA 6506', 'МАРШРУТ  М2', null);
# [07-Apr-2026 17:29:01] /elitcar/www/bg/ajax/prices/W00gRkVCSSAwMzM0NV0.html?_=1775572139186 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'FEBI 03345', 'МАРШРУТ  М2', null);

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gU1RBUkxJTkUgR0EgNjUwNl0%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gRkVCSSAwMzM0NV0%'
            LIMIT 1

Successfully disconnected from the database!
# [07-Apr-2026 17:29:02] /elitcar/www/bg/ajax/prices/W00gQ09SVEVDTyAxMjAxNDU4NF0.html?_=1775572142633 108.61.209.243
# [07-Apr-2026 17:29:02] /elitcar/www/bg/ajax/prices/W00gRFQgNC4yMDQ2OF0.html?_=1775572142634 108.61.209.243
# [07-Apr-2026 17:29:02] /elitcar/www/bg/ajax/prices/W00gUEVVR0VPVCAxNjA3NDI3MjgwXQ.html?_=1775572142634 108.61.209.243
# [07-Apr-2026 17:29:02] /elitcar/www/bg/ajax/prices/W00gRFQgMTEuMTA1NzBd.html?_=1775572142635 108.61.209.243
# [07-Apr-2026 17:29:02] /elitcar/www/bg/ajax/prices/W00gRUxSSU5HIDI5NC4xMTBd.html?_=1775572142636 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
                                    _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)
# [07-Apr-2026 17:29:03] /elitcar/www/bg/ajax/prices/W00gUEVVR0VPVCAxNjA3NDI3MjgwXQ.html?_=1775572143275 108.61.209.243

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

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

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

SELECT * FROM  fn_EShopItemInfo_New('CORTECO 12014584', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('ELRING 294.110', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

SELECT * FROM  fn_EShopItemInfo_New('DT 11.10570', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('DT 4.20468', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('PEUGEOT 1607427280', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('ELRING 294.110', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('CORTECO 12014584', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('DT 11.10570', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('DT 4.20468', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'ELRING 294.110'
            GROUP BY fComp_Id,fItem_Id

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'CORTECO 12014584'
            GROUP BY fComp_Id,fItem_Id

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('PEUGEOT 1607427280', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'DT 11.10570'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:29:03] /elitcar/www/bg/ajax/prices/W00gRUxSSU5HIDI5NC4xMTBd.html?_=1775572142636 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gRUxSSU5HIDI5NC4xMTBd%'
            LIMIT 1

Successfully disconnected from the database!
# [07-Apr-2026 17:29:03] /elitcar/www/bg/ajax/prices/W00gQ09SVEVDTyAxMjAxNDU4NF0.html?_=1775572142633 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gQ09SVEVDTyAxMjAxNDU4NF0%'
            LIMIT 1

Successfully disconnected from the database!
# [07-Apr-2026 17:29:03] /elitcar/www/bg/ajax/prices/W00gRFQgMTEuMTA1NzBd.html?_=1775572142635 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gRFQgMTEuMTA1NzBd%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'DT 4.20468'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:29:03] /elitcar/www/bg/ajax/prices/W00gRFQgMTEuMTA1NzBd.html?_=1775572143275 108.61.209.243
# [07-Apr-2026 17:29:03] /elitcar/www/bg/ajax/prices/W00gRUxSSU5HIDI5NC4xMTBd.html?_=1775572143276 108.61.209.243

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'PEUGEOT 1607427280'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:29:03] /elitcar/www/bg/ajax/prices/W00gU1dBRyAzMCAzNCAwMDAxXQ.html?_=1775572143276 108.61.209.243
# [07-Apr-2026 17:29:03] /elitcar/www/bg/ajax/prices/W00gRFQgNC4yMDQ2OF0.html?_=1775572142634 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'DT 4.20468', 'МАРШРУТ  М2', null);

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'
# [07-Apr-2026 17:29:03] /elitcar/www/bg/ajax/prices/W00gUEVVR0VPVCAxNjA3NDI3MjgwXQ.html?_=1775572142634 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'PEUGEOT 1607427280', 'МАРШРУТ  М2', null);

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
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gRFQgNC4yMDQ2OF0%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gUEVVR0VPVCAxNjA3NDI3MjgwXQ%'
            LIMIT 1

Successfully disconnected from the database!

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

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

SELECT * FROM  fn_EShopItemInfo_New('PEUGEOT 1607427280', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

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 AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('PEUGEOT 1607427280', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

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
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'PEUGEOT 1607427280'
            GROUP BY fComp_Id,fItem_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] => ЛЮБОМИР НАЧКОВ
)

# [07-Apr-2026 17:29:04] /elitcar/www/bg/ajax/prices/W00gUEVVR0VPVCAxNjA3NDI3MjgwXQ.html?_=1775572143275 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LToday','LTomorrow','LMonday','LTuesday','LWednesday','LThursday','LFriday','LSaturday','LSunday','LFor','LQty','LUntil','LOClock','LInStock','LDeliveryTime','LAvailability','LOrderDeadline','LForToday','LForTomorrow') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT * FROM fn_GetDeliveryTS_ElitCar('001', '00', 'PEUGEOT 1607427280', 'МАРШРУТ  М2', null);

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
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gUEVVR0VPVCAxNjA3NDI3MjgwXQ%'
            LIMIT 1

Successfully disconnected from the database!

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

exec usp_CheckContragentDue_ElitCar_web 'EE1D040DB23B48A6B8712B899CBA8660', '001', 0, '2026-04-07', '00'

SELECT * FROM  fn_EShopItemInfo_New('SWAG 30 34 0001', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('ELRING 294.110', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT * FROM  fn_EShopItemInfo_New('DT 11.10570', 'EE1D040DB23B48A6B8712B899CBA8660', '00', '');

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('SWAG 30 34 0001', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('ELRING 294.110', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT AuctionDescription FROM fn_EShopItemInfoGiftsAuctionDesc_ElitCar('DT 11.10570', 'EE1D040DB23B48A6B8712B899CBA8660', '00')

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'SWAG 30 34 0001'
            GROUP BY fComp_Id,fItem_Id

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'ELRING 294.110'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:29:04] /elitcar/www/bg/ajax/prices/W00gU1dBRyAzMCAzNCAwMDAxXQ.html?_=1775572143276 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gU1dBRyAzMCAzNCAwMDAxXQ%'
            LIMIT 1

Successfully disconnected from the database!
# [07-Apr-2026 17:29:04] /elitcar/www/bg/ajax/prices/W00gRUxSSU5HIDI5NC4xMTBd.html?_=1775572143276 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gRUxSSU5HIDI5NC4xMTBd%'
            LIMIT 1

Successfully disconnected from the database!

SELECT
                SUM(sQuantity) AS sQuantity
            FROM
                G_LItemEntry_0 E WITH(NOLOCK)
                INNER JOIN N_Businessgroup B WITH(NOLOCK) ON (B.Id=E.fBusinessGroup_Id) AND (B.Comp_Id=E.fComp_Id)
            WHERE
                E.SLevel=3 AND
                E.fComp_Id = '001' AND
                B.IsOuterBG = 1 AND
                E.fBusinessGroup_Id > 74 AND
                e.fItem_Id = 'DT 11.10570'
            GROUP BY fComp_Id,fItem_Id
# [07-Apr-2026 17:29:04] /elitcar/www/bg/ajax/prices/W00gRFQgMTEuMTA1NzBd.html?_=1775572143275 108.61.209.243

set names utf8

SELECT
                `Label`,
                `Value`
            FROM
                `elitcar_store`.`labels`
            WHERE
                `Label` IN ('LPriceForYou','InfoDeposit','LDeposit','InfoDeliveryTaxes','LSevenDays','LAction','LAdd','LReplace','LDeliveryNoReturn','LOutOfStock') AND
                `Language` = 'bg'
             ORDER BY
                `elitcar_store`.`labels`.`Label` ASC

SELECT
                `Items`
            FROM
                `elitcar_store`.`basket`
            WHERE
                `UserName` = 'lubo' AND
                `ContragentID` = 'EE1D040DB23B48A6B8712B899CBA8660' AND
                `Items` LIKE '%W00gRFQgMTEuMTA1NzBd%'
            LIMIT 1

Successfully disconnected from the database!
